[1.446.*] Pre-release merge (#1031)

This commit is contained in:
tramline-github[bot]
2026-01-06 16:07:11 +00:00
committed by GitHub
5 changed files with 41 additions and 3 deletions
+1
View File
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Crashes from process death
- Crashes in widget handling
- Android Auto Backup works again
### Changed
+2
View File
@@ -10,6 +10,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".ClawApplication"
android:appComponentFactory=".BackupSafeAppComponentFactory"
android:dataExtractionRules="@xml/data_extraction_rules"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/full_backup_content"
@@ -18,6 +19,7 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/Theme.Claw.SplashScreen"
tools:replace="android:appComponentFactory"
tools:targetApi="tiramisu">
<profileable
android:shell="true"
@@ -0,0 +1,35 @@
/*
* Copyright © Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android
import android.app.Application
import dev.zacsweers.metrox.android.MetroAppComponentFactory
/**
* Custom variant of [android.app.AppComponentFactory] that skips [ClawApplication] init when the
* app is running in a backup process for Android Auto Backup. In all normal cases, it will defer to
* [MetroAppComponentFactory].
*/
@Suppress("unused")
class BackupSafeAppComponentFactory : MetroAppComponentFactory() {
override fun instantiateApplicationCompat(cl: ClassLoader, className: String): Application {
if (isBackupAgentProcess()) {
return Application()
}
return super.instantiateApplicationCompat(cl, className)
}
private fun isBackupAgentProcess(): Boolean {
return try {
val processName = Application.getProcessName()
processName?.contains("backup") == true
} catch (_: Exception) {
false
}
}
}
@@ -8,12 +8,12 @@
<cloud-backup>
<include
domain="database"
path="databases" />
path="." />
</cloud-backup>
<device-transfer>
<include
domain="database"
path="databases" />
path="." />
</device-transfer>
</data-extraction-rules>
@@ -7,5 +7,5 @@
<full-backup-content>
<include
domain="database"
path="databases" />
path="." />
</full-backup-content>