Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 425fa293 authored by Milton Wu's avatar Milton Wu
Browse files

Fix NullPointer when factory debug flag enabled

When debug.screenshot_rounded_corners prop is true, some class fields
are not initialized through start(). And it causes a
NullPointerException during dumping ScreenDecorations.

Bug: 234549460
Test: 1. Enable debug.screenshot_rounded_corners
      2. Restart sysui process
      3. adb shell dumpsys activity service com.android.systemui
Change-Id: If0a31b19fb160de5bb717c1e76af2503d22c10af
parent 05f510bd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -971,6 +971,10 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
    public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
        pw.println("ScreenDecorations state:");
        pw.println("  DEBUG_DISABLE_SCREEN_DECORATIONS:" + DEBUG_DISABLE_SCREEN_DECORATIONS);
        if (DEBUG_DISABLE_SCREEN_DECORATIONS) {
            return;
        }

        pw.println("  mIsPrivacyDotEnabled:" + isPrivacyDotEnabled());
        pw.println("  isOnlyPrivacyDotInSwLayer:" + isOnlyPrivacyDotInSwLayer());
        pw.println("  mPendingConfigChange:" + mPendingConfigChange);