Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 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
6017a74
Hide lastExitReason toggle in debug settings and collapsed Heart beat…
Juan-Antonio-Doe Jul 11, 2026
a4eea2b
LogManager: Optimized exitReasons and Crash logs avoiding duplicated …
Juan-Antonio-Doe Jul 12, 2026
aabff7a
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 12, 2026
4d050d8
Updated some log lines in XServerDisplayActivity
Juan-Antonio-Doe Jul 12, 2026
c577995
Commented out a log line in XConnectorEpoll to avoid unnecessary noise.
Juan-Antonio-Doe Jul 12, 2026
8c005de
Fixed some lines and logs that shouldn't appear in some conditions.
Juan-Antonio-Doe Jul 12, 2026
7042518
Fixed issues introduced in the commit that enables background protect…
Juan-Antonio-Doe Jul 12, 2026
4509240
Replaced hardcoded foreground notification content strings with trans…
Juan-Antonio-Doe Jul 12, 2026
24956e4
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 12, 2026
33a8ea1
Merge branch 'main' into background-persistance-fix-2
Juan-Antonio-Doe Jul 13, 2026
14aa9e4
Renamed log file generated with filtered tags.
Juan-Antonio-Doe Jul 13, 2026
92a14ff
UI: Improved the window appearance of the Custom tag filter.
Juan-Antonio-Doe Jul 13, 2026
4052026
Fix: Avoid deleting the ExitReasons and Crash keys when deleting an u…
Juan-Antonio-Doe Jul 13, 2026
829ef5a
Added post-mortem logic to LogManager and refactored duplicate checki…
Juan-Antonio-Doe Jul 13, 2026
ff72477
Differentiate system tags in yellow from the other tags when they are…
Juan-Antonio-Doe Jul 13, 2026
51e6f23
Fixed Event Watch log not returning logs in some cases.
Juan-Antonio-Doe Jul 14, 2026
4ccb21e
Fix: The crash log generated with DefaultUncaughtExceptionHandler was…
Juan-Antonio-Doe Jul 14, 2026
7c01191
Updated translations with the new strings.
Juan-Antonio-Doe Jul 14, 2026
32e80f5
Some more bugs fixed #1.
Juan-Antonio-Doe Jul 14, 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
12 changes: 12 additions & 0 deletions app/src/main/app/PluviaApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import com.winlator.cmod.feature.stores.steam.events.EventDispatcher
import com.winlator.cmod.feature.stores.steam.service.SteamService
import com.winlator.cmod.feature.stores.steam.utils.PrefManager
import com.winlator.cmod.runtime.display.XServerDisplayActivity
import com.winlator.cmod.runtime.system.LogManager
import com.winlator.cmod.shared.android.RefreshRateUtils
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import timber.log.Timber
import java.io.File

@HiltAndroidApp
Expand All @@ -40,6 +42,16 @@ class PluviaApp : Application() {
.init(this)
scheduleColdStartWarmups()

// 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.applicationContext)

Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
Log.e("PluviaApp", "CRASH in thread ${thread.name}", throwable)
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/app/shell/UnifiedActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ class UnifiedActivity :
override fun onCreate(savedInstanceState: Bundle?) {
instance = this
super.onCreate(savedInstanceState)

if (!SetupWizardActivity.isSetupComplete(this) || !ImageFs.find(this).isUpToDate) {
startActivity(
Intent(this, SetupWizardActivity::class.java)
Expand Down
44 changes: 43 additions & 1 deletion app/src/main/feature/settings/debug/DebugFragment.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Settings > Debug fragment — hosts DebugScreen via ComposeView.
package com.winlator.cmod.feature.settings
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
Expand All @@ -8,11 +9,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 +26,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 +85,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 +241,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