Files
lineageos_updater/AndroidManifest.xml
Alexander Martinz 66fc964521 Updater: Allow starting activities from background
-----

05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: FATAL EXCEPTION: main
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: Process: com.shiftos.updater, PID: 19707
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.shiftos.updater/org.lineageos.updater.controller.UpdaterService }: app is in background uid UidRecord{1463ce2 u0a63 TPSL bg:+47m50s26ms idle change:idle procs:1 seq(0,0,0)}
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1616)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ContextImpl.startService(ContextImpl.java:1571)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.content.ContextWrapper.startService(ContextWrapper.java:669)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at org.lineageos.updater.UpdatesActivity.onStart(UpdatesActivity.java:181)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:7847)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3295)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:107)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7397)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

-----

Change-Id: Ibc2d471b028c1d4e824b3ede4bbc336d76801f88
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2022-02-10 15:52:11 +01:00

62 lines
2.5 KiB
XML

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.lineageos.updater"
android:versionCode="1">
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.RECOVERY" />
<uses-permission android:name="android.permission.START_ACTIVITIES_FROM_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="false">
<activity
android:name=".UpdatesActivity"
android:excludeFromRecents="true"
android:label="@string/display_name"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar"
android:launchMode="singleTop">
<intent-filter android:priority="1">
<action android:name="android.settings.SYSTEM_UPDATE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.android.settings.SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name=".controller.UpdaterService" />
<service android:name=".ExportUpdateService" />
<receiver android:name=".UpdaterReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<receiver android:name=".UpdatesCheckReceiver" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
</application>
</manifest>