Myzel394 / Alibi

Use your phone as a dashcam and save the last 30 minutes when you need them.
GNU General Public License v3.0
219 stars 10 forks source link

[Bug] Crash if users get switched #87

Closed materialred closed 3 months ago

materialred commented 4 months ago

If Alibi is recording and you switch to another user and then back to the original user, alibi keeps crashing, until you force stop it.

Logcat: FATAL EXCEPTION: main Process: app.myzel394.alibi, PID: 18977 y6.u: lateinit property settings has not been initialized at l5.d.h(SourceFile:1) at z5.f.onServiceConnected(SourceFile:85) at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2207) at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2240) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8244) 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:878)

Version: 0.4.0 (12) Device: Google Pixel 8 Pro Rom: crDroid 10.3 (Android 14)

Myzel394 commented 4 months ago

Thanks for the issue, I'll take a look at it. Quick question: What did you expect to happen? :D Like did you expect Alibi to stop automatically, to continue recording, etc? I'm not sure what I'd expect as a normal user, so I'd like to get your opinion here :D

materialred commented 4 months ago

I would expect, that Alibi keeps recording(if possible) or showes on next start a popup where you can save(and listen to the recording) it if you want

Myzel394 commented 3 months ago

As far as I know, apps from other users do not continue to run if you switch profiles.

Since this is a really minor edge case and I think the average user knows that the running programs will be halted, I won't invest time into that.