If isExpanded , set visible, else set invisible.
com.android.systemui.shade.NotificationShadeWindowControllerImpl#isExpanded:
private void applyVisibility(NotificationShadeWindowState state) {
boolean visible = isExpanded(state);
mLogger.logApplyVisibility(visible);
if (state.forcePluginOpen) {
if (mListener != null) {
mListener.setWouldOtherwiseCollapse(visible);
}
visible = true;
mLogger.d("Visibility forced to be true");
}
if (mNotificationShadeView != null) {
if (visible) {
mNotificationShadeView.setVisibility(View.VISIBLE);
} else {
mNotificationShadeView.setVisibility(View.INVISIBLE);
}
}
}
private boolean isExpanded(NotificationShadeWindowState state) {
return !state.forceWindowCollapsed && (state.isKeyguardShowingAndNotOccluded()
|| state.panelVisible || state.keyguardFadingAway || state.bouncerShowing
|| state.headsUpNotificationShowing
|| state.scrimsVisibility != ScrimController.TRANSPARENT)
|| state.backgroundBlurRadius > 0
|| state.launchingActivityFromNotification;
}
Caused by: java.lang.RuntimeException: 4
at com.android.systemui.shade.NotificationShadeWindowView.setVisibility(NotificationShadeWindowView.java:97)
at com.android.systemui.shade.NotificationShadeWindowControllerImpl.applyVisibility(NotificationShadeWindowControllerImpl.java:420)
at com.android.systemui.shade.NotificationShadeWindowControllerImpl.apply(NotificationShadeWindowControllerImpl.java:498)
at com.android.systemui.shade.NotificationShadeWindowControllerImpl.setScrimsVisibility(NotificationShadeWindowControllerImpl.java:698)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl.lambda$makeStatusBarView$14(CentralSurfacesImpl.java:1280)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl.$r8$lambda$XgZQvgdnuY5pCtS5l8hyprxwthc(Unknown Source:0)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl$$ExternalSyntheticLambda36.accept(Unknown Source:4)
at com.android.systemui.statusbar.phone.ScrimController.dispatchScrimsVisible(ScrimController.java:1178)
at com.android.systemui.statusbar.phone.ScrimController.updateScrimColor(ScrimController.java:1231)
at com.android.systemui.statusbar.phone.ScrimController.updateScrim(ScrimController.java:1416)
at com.android.systemui.statusbar.phone.ScrimController.setScrimAlpha(ScrimController.java:1197)
at com.android.systemui.statusbar.phone.ScrimController.updateScrims(ScrimController.java:1146)
at com.android.systemui.statusbar.phone.ScrimController.attachViews(ScrimController.java:382)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl.makeStatusBarView(CentralSurfacesImpl.java:1282)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl.createAndAddWindows(CentralSurfacesImpl.java:2326)
at com.android.systemui.statusbar.phone.CentralSurfacesImpl.start(CentralSurfacesImpl.java:952)
at com.android.systemui.SystemUIApplication.startStartable(SystemUIApplication.java:348)
at com.android.systemui.SystemUIApplication.startStartable(SystemUIApplication.java:339)
at com.android.systemui.SystemUIApplication.lambda$startServicesIfNeeded$0(SystemUIApplication.java:259)
at com.android.systemui.SystemUIApplication.$r8$lambda$pt6oxwKYJNOsdTRRgkl96N87nEY(Unknown Source:0)
at com.android.systemui.SystemUIApplication$$ExternalSyntheticLambda1.run(Unknown Source:8)
at com.android.systemui.SystemUIApplication.timeInitialization(SystemUIApplication.java:301)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:257)
at com.android.systemui.SystemUIApplication.startServicesIfNeeded(SystemUIApplication.java:206)
at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:70)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4485)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2160)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)