Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -3623,6 +3623,7 @@ public class CentralSurfacesImpl extends CoreStartable implements dismissVolumeDialog(); mWakeUpCoordinator.setFullyAwake(false); mKeyguardBypassController.onStartedGoingToSleep(); mStatusBarTouchableRegionManager.updateTouchableRegion(); // The unlocked screen off and fold to aod animations might use our LightRevealScrim - // we need to be expanded for it to be visible. Loading Loading @@ -3651,6 +3652,7 @@ public class CentralSurfacesImpl extends CoreStartable implements // once we fully woke up. updateRevealEffect(true /* wakingUp */); updateNotificationPanelTouchState(); mStatusBarTouchableRegionManager.updateTouchableRegion(); // If we are waking up during the screen off animation, we should undo making the // expanded visible (we did that so the LightRevealScrim would be visible). Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java +21 −4 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { private final Context mContext; private final HeadsUpManagerPhone mHeadsUpManager; private final NotificationShadeWindowController mNotificationShadeWindowController; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private boolean mIsStatusBarExpanded = false; private boolean mShouldAdjustInsets = false; Loading @@ -72,7 +73,8 @@ public final class StatusBarTouchableRegionManager implements Dumpable { Context context, NotificationShadeWindowController notificationShadeWindowController, ConfigurationController configurationController, HeadsUpManagerPhone headsUpManager HeadsUpManagerPhone headsUpManager, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController ) { mContext = context; initResources(); Loading Loading @@ -115,6 +117,8 @@ public final class StatusBarTouchableRegionManager implements Dumpable { mNotificationShadeWindowController.setForcePluginOpenListener((forceOpen) -> { updateTouchableRegion(); }); mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; } protected void setup( Loading Loading @@ -179,7 +183,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { /** * Set the touchable portion of the status bar based on what elements are visible. */ private void updateTouchableRegion() { public void updateTouchableRegion() { boolean hasCutoutInset = (mNotificationShadeWindowView != null) && (mNotificationShadeWindowView.getRootWindowInsets() != null) && (mNotificationShadeWindowView.getRootWindowInsets().getDisplayCutout() != null); Loading Loading @@ -242,12 +246,25 @@ public final class StatusBarTouchableRegionManager implements Dumpable { touchableRegion.union(bounds); } /** * Helper to let us know when calculating the region is not needed because we know the entire * screen needs to be touchable. */ private boolean shouldMakeEntireScreenTouchable() { // The touchable region is always the full area when expanded, whether we're showing the // shade or the bouncer. It's also fully touchable when the screen off animation is playing // since we don't want stray touches to go through the light reveal scrim to whatever is // underneath. return mIsStatusBarExpanded || mCentralSurfaces.isBouncerShowing() || mUnlockedScreenOffAnimationController.isAnimationPlaying(); } private final OnComputeInternalInsetsListener mOnComputeInternalInsetsListener = new OnComputeInternalInsetsListener() { @Override public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo info) { if (mIsStatusBarExpanded || mCentralSurfaces.isBouncerShowing()) { // The touchable region is always the full area when expanded if (shouldMakeEntireScreenTouchable()) { return; } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -3623,6 +3623,7 @@ public class CentralSurfacesImpl extends CoreStartable implements dismissVolumeDialog(); mWakeUpCoordinator.setFullyAwake(false); mKeyguardBypassController.onStartedGoingToSleep(); mStatusBarTouchableRegionManager.updateTouchableRegion(); // The unlocked screen off and fold to aod animations might use our LightRevealScrim - // we need to be expanded for it to be visible. Loading Loading @@ -3651,6 +3652,7 @@ public class CentralSurfacesImpl extends CoreStartable implements // once we fully woke up. updateRevealEffect(true /* wakingUp */); updateNotificationPanelTouchState(); mStatusBarTouchableRegionManager.updateTouchableRegion(); // If we are waking up during the screen off animation, we should undo making the // expanded visible (we did that so the LightRevealScrim would be visible). Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java +21 −4 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { private final Context mContext; private final HeadsUpManagerPhone mHeadsUpManager; private final NotificationShadeWindowController mNotificationShadeWindowController; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private boolean mIsStatusBarExpanded = false; private boolean mShouldAdjustInsets = false; Loading @@ -72,7 +73,8 @@ public final class StatusBarTouchableRegionManager implements Dumpable { Context context, NotificationShadeWindowController notificationShadeWindowController, ConfigurationController configurationController, HeadsUpManagerPhone headsUpManager HeadsUpManagerPhone headsUpManager, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController ) { mContext = context; initResources(); Loading Loading @@ -115,6 +117,8 @@ public final class StatusBarTouchableRegionManager implements Dumpable { mNotificationShadeWindowController.setForcePluginOpenListener((forceOpen) -> { updateTouchableRegion(); }); mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; } protected void setup( Loading Loading @@ -179,7 +183,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { /** * Set the touchable portion of the status bar based on what elements are visible. */ private void updateTouchableRegion() { public void updateTouchableRegion() { boolean hasCutoutInset = (mNotificationShadeWindowView != null) && (mNotificationShadeWindowView.getRootWindowInsets() != null) && (mNotificationShadeWindowView.getRootWindowInsets().getDisplayCutout() != null); Loading Loading @@ -242,12 +246,25 @@ public final class StatusBarTouchableRegionManager implements Dumpable { touchableRegion.union(bounds); } /** * Helper to let us know when calculating the region is not needed because we know the entire * screen needs to be touchable. */ private boolean shouldMakeEntireScreenTouchable() { // The touchable region is always the full area when expanded, whether we're showing the // shade or the bouncer. It's also fully touchable when the screen off animation is playing // since we don't want stray touches to go through the light reveal scrim to whatever is // underneath. return mIsStatusBarExpanded || mCentralSurfaces.isBouncerShowing() || mUnlockedScreenOffAnimationController.isAnimationPlaying(); } private final OnComputeInternalInsetsListener mOnComputeInternalInsetsListener = new OnComputeInternalInsetsListener() { @Override public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo info) { if (mIsStatusBarExpanded || mCentralSurfaces.isBouncerShowing()) { // The touchable region is always the full area when expanded if (shouldMakeEntireScreenTouchable()) { return; } Loading