Current-Activity
Current-Activity copied to clipboard
Crash when switching from Current Activity in recent app switcher using FP5 stock ROM.
As the undermentioned depicts, when I switch out of Current Activity (io.github.ratul.topactivity.ui.MainActivity) using the stock (QuickStep) app switcher, when I select an application to switch to, Current Activity crashes:
https://github.com/codehasan/Current-Activity/assets/42837531/bd91946e-3bf3-4970-b71d-7c04de1b36cf
However, its floating window remains visible and able to display the class name, although clicking on that class name doesn't actually duplicate it to the clipboard, despite it purporting to.
*********************** Crash Head *********************** Time Of Crash : 22-06-2024 10:37 Device Manufacturer : Fairphone Device Model : FP5 Android Version : 13 Android SDK : 33 App VersionName : 1.5.5 App VersionCode : 15 *********************** Crash Log *********************** FATAL EXCEPTION: main Process: io.github.ratul.topactivity, PID: 5155 java.lang.RuntimeException: Unable to pause activity {io.github.ratul.topactivity/io.github.ratul.topactivity.ui.MainActivity}: java.lang.IllegalArgumentException: io.github.ratul.topactivity: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5263) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5214) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5166) at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:48) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2444) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8223) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:977) Caused by: java.lang.IllegalArgumentException: io.github.ratul.topactivity: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkPendingIntent(PendingIntent.java:430) at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:680) at android.app.PendingIntent.getActivities(PendingIntent.java:663) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275) at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249) at io.github.ratul.topactivity.model.NotificationMonitor.c(Unknown Source:95) at io.github.ratul.topactivity.ui.MainActivity.onPause(Unknown Source:10) at android.app.Activity.performPause(Activity.java:8790) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1658) at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5253) ... 14 more
Try the PR I submitted, I hope it can help you!
https://github.com/codehasan/Current-Activity/pull/28
https://github.com/codehasan/Current-Activity/issues/27#issuecomment-2298219227
-
@HomeZz, ~~if you can provide a compiled APK, I can evaluate it. Otherwise, because I've no local build environment, I can't. @codehasan, do or can we have access to the repository's CI?~~
-
Apologies - didn't notice https://github.com/HomeZz/Current-Activity/releases/download/v1.5.9/app-debug-v1.5.9.apk.
https://github.com/codehasan/Current-Activity/issues/27#issuecomment-2321024328
@HomeZz, you'll want to enable issues on your repository, because my device considers https://github.com/HomeZz/Current-Activity/releases/download/v1.5.9/app-debug-v1.5.9.apk to be "invalid":
@RokeJulianLockhart Thank you for your feedback. The error message during installation is because the apk is not signed. You need to use 'adb install -t' to install it.
https://github.com/codehasan/Current-Activity/issues/27#issuecomment-2323941505
@HomeZz, it works perfectly. Many thanks. Scoop doesn't even see crashes when visiting com.android.settings!
Fixed in v1.5.9, please download from Releases.
@codehasan, thanks. Confirmed:
https://github.com/user-attachments/assets/6ecc08dd-e780-4f8d-8dae-970529b7f17a
My Environment
-
The Application
versionName=1.5.9 versionCode=22 -
The OS
[ro.build.version.release]: [15] [ro.build.display.id]: [FP5.VT2E.C.059.20250908] -
The Hardware
[ro.product.brand]: [Fairphone] [ro.build.product]: [FP5]