Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
21f27f6
Refactor: Refactored several classes such as SessionKeepAliveService,…
Juan-Antonio-Doe Jun 27, 2026
8d6cdc6
Merge branch 'refs/heads/main' into background-persistance-fix-2
Juan-Antonio-Doe Jun 28, 2026
7c25fb0
Merge with main (resolved conflicts in XServerDisplayActivity.java)
Juan-Antonio-Doe Jun 28, 2026
05c4e85
Enhance logging system.
Juan-Antonio-Doe Jul 1, 2026
ffd1d3f
Add translations for the new debug options.
Juan-Antonio-Doe Jul 1, 2026
cb50dfe
Add more logs to several classes.
Juan-Antonio-Doe Jul 1, 2026
d5b422d
Enhance background protection, improve crash logging and fixed some b…
Juan-Antonio-Doe Jul 4, 2026
be70310
Background setting enabled by default.
Juan-Antonio-Doe Jul 5, 2026
5739c6b
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 5, 2026
0e713f4
Fixed some errors after merge with main in Debug and Other Settings m…
Juan-Antonio-Doe Jul 6, 2026
6a42008
Resolved conflicts after merge with main (Steam Friends & Controller …
Juan-Antonio-Doe Jul 10, 2026
4c4b816
Fix wrong flavors that were used in local tests.
Juan-Antonio-Doe Jul 10, 2026
6c27d7c
Cleaning.
Juan-Antonio-Doe Jul 10, 2026
c50ed84
Fix: Uncommented the notificationHelper variable in SteamService (req…
Juan-Antonio-Doe Jul 10, 2026
867ea39
Disabled the Exit button in the notification to close the container/g…
Juan-Antonio-Doe Jul 10, 2026
19ec97a
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 10, 2026
fe42ce1
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 10, 2026
b4b471d
LogManager: Included system tag list and hardcoded tag list in UI Log…
Juan-Antonio-Doe Jul 11, 2026
ade1df9
Merge remote-tracking branch 'origin/background-persistance-fix-2' in…
Juan-Antonio-Doe Jul 11, 2026
40aab66
feat: Android system tags are now highlighted in yellow when selected…
Juan-Antonio-Doe Jul 11, 2026
af0f1b4
Epic and GOG services updated to work with the master foreground serv…
Juan-Antonio-Doe Jul 11, 2026
c626749
Updated store services notification.
Juan-Antonio-Doe Jul 11, 2026
5ef2d68
Optimized crash trace report in LogManager.
Juan-Antonio-Doe Jul 11, 2026
d8b0f9d
Enable WakeLock by default on Android 16+ if it hasn’t been explicitl…
Juan-Antonio-Doe Jul 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ plugins {
alias(libs.plugins.spotless)
}

apply from: rootProject.file('gradle/collectLogTags.gradle')

/*
abstract class InstallVulkanValidationLayerTask extends DefaultTask {
@Input
Expand Down Expand Up @@ -59,6 +61,10 @@ task checkSubmodules {

preBuild.dependsOn(checkSubmodules)

tasks.named('preBuild') {
dependsOn 'collectLogTags'
}

/*
def installVulkanValidationLayer = tasks.register("installVulkanValidationLayer", InstallVulkanValidationLayerTask) {
layerVersion.set("1.4.341.0")
Expand Down Expand Up @@ -200,11 +206,13 @@ android {
sourceSets {
main {
java.srcDirs = [
// 'src/main/java', // Needed for Android Studio
'src/main/app',
'src/main/feature',
'src/main/sharedmemory',
'src/main/runtime',
'src/main/shared'
'src/main/shared',
'build/generated/source/logtags' // Generated by collectLogTags.gradle
]
}
}
Expand All @@ -224,7 +232,7 @@ android {
}

dependencies {
// debugImplementation "com.squareup.leakcanary:leakcanary-android:2.14"
// debugImplementation "com.squareup.leakcanary:leakcanary-android:2.14"

implementation libs.okhttp
implementation libs.okhttpDnsOverHttps
Expand Down Expand Up @@ -272,6 +280,7 @@ dependencies {
implementation files('libs/MidiSynth/MidiSynth.jar')
implementation libs.recyclerview
implementation libs.coreKtx
implementation("androidx.lifecycle:lifecycle-process:2.9.0") // New = compilation errors / gradle plugin update requirement.


implementation 'com.android.ndk.thirdparty:openssl:1.1.1q-beta-1'
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_LOGS"/>
<uses-permission
android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions" />
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/app/shell/UnifiedActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ import com.winlator.cmod.shared.theme.WinNativeTheme
import dagger.hilt.android.AndroidEntryPoint
import dagger.Lazy
import com.winlator.cmod.feature.stores.steam.enums.EPersonaState
import com.winlator.cmod.runtime.system.LogManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import timber.log.Timber
import javax.inject.Inject
import kotlin.math.abs
import kotlin.math.roundToInt
Expand Down Expand Up @@ -1511,6 +1513,17 @@ class UnifiedActivity :
override fun onCreate(savedInstanceState: Bundle?) {
instance = this
super.onCreate(savedInstanceState)

// Initialize Timber in debug builds for logging.
// If 'BuildConfig' give error, ignore it.
// The file needed will be autogenerated when building the apk.
if (com.winlator.cmod.BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree());
}

// Initialize the LogManager context in case a fallback is needed.
LogManager.init(this)

if (!SetupWizardActivity.isSetupComplete(this) || !ImageFs.find(this).isUpToDate) {
startActivity(
Intent(this, SetupWizardActivity::class.java)
Expand Down
43 changes: 42 additions & 1 deletion app/src/main/feature/settings/debug/DebugFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import android.os.Looper
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.ComposeView
Expand All @@ -25,6 +25,8 @@ import androidx.fragment.app.Fragment
import androidx.preference.PreferenceManager
import com.winlator.cmod.R
import com.winlator.cmod.app.config.SettingsConfig
import com.winlator.cmod.runtime.system.GeneratedLogTags
import com.winlator.cmod.runtime.system.LogManager
import com.winlator.cmod.app.shell.UnifiedActivity
import com.winlator.cmod.shared.io.AssetPaths
import com.winlator.cmod.shared.io.FileUtils
Expand Down Expand Up @@ -82,9 +84,41 @@ class DebugFragment : Fragment() {
.stopAppLogging()
com.winlator.cmod.runtime.system.LogManager
.updateLoggingState(ctx)
com.winlator.cmod.runtime.system.LogManager
.clearManualTextFilter()
}
refresh()
},
onExitReasonLogChanged = { checked ->
preferences.edit { putBoolean("enable_exit_reason_log", checked) }
if (checked) {
// Capture previous exit reasons, so the user doesn't need
// to restart the app to check previous reasons.
com.winlator.cmod.runtime.system.LogManager
.logLastExitReasons(ctx)
}
refresh()
},
onCrashLogChanged = { checked ->
preferences.edit { putBoolean("enable_crash_log", checked) }
if (checked) {
// Capture previous crashes, so the user doesn't need
// to restart to check previous reasons.
com.winlator.cmod.runtime.system.LogManager
.logLastExitReasons(ctx)
}
refresh()
},
onEventWatchLogChanged = { checked ->
preferences.edit { putBoolean("enable_event_watch_log", checked) }
refresh()
},
onTagFilterModeChanged = { mode -> LogManager.setTagFilterMode(requireContext(), mode); refresh() },
onSelectedTagsChanged = { tags -> LogManager.setSelectedTags(requireContext(), tags.toSet()); refresh() },
onAddCustomTag = { tag -> LogManager.addCustomTag(requireContext(), tag); refresh() },
onRemoveCustomTag = { tag -> LogManager.removeCustomTag(requireContext(), tag); refresh() },
onManualTextFilterChanged = { text -> LogManager.setManualTextFilter(text) }, // no persistence, no refreshState needed
allLogTagOptions = remember { LogManager.getAllKnownTags() },
onWineDebugChanged = { checked ->
preferences.edit { putBoolean("enable_wine_debug", checked) }
com.winlator.cmod.runtime.system.LogManager
Expand Down Expand Up @@ -206,6 +240,13 @@ class DebugFragment : Fragment() {
debugState =
DebugState(
appDebug = preferences.getBoolean("enable_app_debug", false),
exitReasonLog = preferences.getBoolean("enable_exit_reason_log", false),
crashLog = preferences.getBoolean("enable_crash_log", false),
eventWatchLog = preferences.getBoolean("enable_event_watch_log", false),
tagFilterMode = LogManager.getTagFilterMode(),
selectedTags = LogManager.getSelectedTags().toList(),
customTags = LogManager.getAllKnownTags().filterNot { it in GeneratedLogTags.TAGS },

wineDebug = preferences.getBoolean("enable_wine_debug", false),
wineChannels = channels,
wineClasses = classes,
Expand Down
Loading