crdroidandroid / issue_tracker

all crDroid related issues should go here
11 stars 1 forks source link

ThemeOverlayController: android:neutral overlay is not available, breaking SystemUI #534

Closed blackshibe closed 1 month ago

blackshibe commented 1 month ago

I am getting the following error after compiling latest crd source and trying to run the first-time setup:

--------- beginning of crash
10-07 22:10:26.943  3536  3601 E AndroidRuntime: FATAL EXCEPTION: SysUiBg
10-07 22:10:26.943  3536  3601 E AndroidRuntime: Process: com.android.systemui, PID: 3536
10-07 22:10:26.943  3536  3601 E AndroidRuntime: java.lang.IllegalStateException: No overlay found for android:neutral
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at com.android.systemui.theme.ThemeOverlayApplier.getOverlayID(ThemeOverlayApplier.java:308)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at com.android.systemui.theme.ThemeOverlayApplier.lambda$applyCurrentUserOverlays$7(ThemeOverlayApplier.java:283)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at com.android.systemui.theme.ThemeOverlayApplier.$r8$lambda$pOp7QeygaKuSsnwbcIehL-lhlLY(ThemeOverlayApplier.java:0)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at com.android.systemui.theme.ThemeOverlayApplier$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:959)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:100)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:232)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:317)
10-07 22:10:26.943  3536  3601 E AndroidRuntime:    at android.os.HandlerThread.run(HandlerThread.java:85)

If dirty flashed with a build without this commit, the code works fine - I can do the setup on the old build, then flash the new one after the phone starts working. But after a factory reset this error makes the Android setup unusable and even if I get past the setup SystemUI never appears.

This is fixed by removing disabling the android:neutral overlay @ ThemeOverlayApplier.java:283 I can attach a PR, but I don't know any better solution than just removing that single line of code. I don't work on Android source code often and would prefer this investigated by someone more competent.