diff options
| author | 2022-06-06 10:56:36 +0000 | |
|---|---|---|
| committer | 2022-06-07 02:42:59 +0000 | |
| commit | 425fa2936120b39906764e7d463bb0ab8b954da9 (patch) | |
| tree | 7d4b47dbbca5ad2b86ef1db537954b6b550e9525 | |
| parent | 05f510bd75edba3a8814f0e597c473d8be399a1e (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index c04463ad6906..dc1a1e009743 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -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); |