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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user