Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +28 −5 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public class StatusBar extends SystemUI implements DemoMode, private boolean mIsOccluded; private boolean mWereIconsJustHidden; private boolean mBouncerWasShowingWhenHidden; private boolean mIsCollapsingToShowActivityOverLockscreen; // Notifies StatusBarKeyguardViewManager every time the keyguard transition is over, // this animation is tied to the scrim for historic reasons. Loading Loading @@ -2232,7 +2233,11 @@ public class StatusBar extends SystemUI implements DemoMode, runPostCollapseRunnables(); setInteracting(StatusBarManager.WINDOW_STATUS_BAR, false); if (!mIsCollapsingToShowActivityOverLockscreen) { showBouncerIfKeyguard(); } else if (DEBUG) { Log.d(TAG, "Not showing bouncer due to activity showing over lockscreen"); } recomputeDisableFlags(mNotificationPanel.hideStatusBarIconsWhenExpanded() /* animate */); // Trimming will happen later if Keyguard is showing - doing it here might cause a jank in Loading Loading @@ -4745,7 +4750,11 @@ public class StatusBar extends SystemUI implements DemoMode, && PreviewInflater.wouldLaunchResolverActivity(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); final boolean wasOccluded = mIsOccluded; dismissKeyguardThenExecute(() -> { boolean showOverLockscreen = mStatusBarKeyguardViewManager.isShowing() && PreviewInflater.wouldShowOverLockscreen(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); OnDismissAction postKeyguardAction = () -> { // TODO: Some of this code may be able to move to NotificationEntryManager. if (mHeadsUpManager != null && mHeadsUpManager.isAlerting(notificationKey)) { // Release the HUN notification to the shade. Loading Loading @@ -4853,9 +4862,14 @@ public class StatusBar extends SystemUI implements DemoMode, // Automatically remove all notifications that we may have kept around longer removeNotification(sbn); } mIsCollapsingToShowActivityOverLockscreen = false; }; if (mStatusBarKeyguardViewManager.isShowing() if (showOverLockscreen) { addPostCollapseAction(runnable); collapsePanel(true /* animate */); } else if (mStatusBarKeyguardViewManager.isShowing() && mStatusBarKeyguardViewManager.isOccluded()) { mStatusBarKeyguardViewManager.addAfterKeyguardGoneRunnable(runnable); collapsePanel(true /* animate */); Loading @@ -4864,7 +4878,13 @@ public class StatusBar extends SystemUI implements DemoMode, } return !mNotificationPanel.isFullyCollapsed(); }, afterKeyguardGone); }; if (showOverLockscreen) { mIsCollapsingToShowActivityOverLockscreen = true; postKeyguardAction.onDismiss(); } else { dismissKeyguardThenExecute(postKeyguardAction, afterKeyguardGone); } } private void collapseOnMainThread() { Loading @@ -4881,7 +4901,10 @@ public class StatusBar extends SystemUI implements DemoMode, public void collapsePanel(boolean animate) { if (animate) { collapsePanel(); boolean willCollapse = collapsePanel(); if (!willCollapse) { runPostCollapseRunnables(); } } else if (!isPresenterFullyCollapsed()) { instantCollapseNotificationPanel(); visibilityChanged(false); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java +8 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,14 @@ public class PreviewInflater { == null; } public static boolean wouldShowOverLockscreen(Context ctx, Intent intent, int currentUserId) { ActivityInfo targetActivityInfo = getTargetActivityInfo(ctx, intent, currentUserId, false /* onlyDirectBootAware */); return targetActivityInfo != null && (targetActivityInfo.flags & (ActivityInfo.FLAG_SHOW_WHEN_LOCKED | ActivityInfo.FLAG_SHOW_FOR_ALL_USERS)) > 0; } /** * @param onlyDirectBootAware a boolean indicating whether the matched activity packages must * be direct boot aware when in direct boot mode if false, all Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +28 −5 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public class StatusBar extends SystemUI implements DemoMode, private boolean mIsOccluded; private boolean mWereIconsJustHidden; private boolean mBouncerWasShowingWhenHidden; private boolean mIsCollapsingToShowActivityOverLockscreen; // Notifies StatusBarKeyguardViewManager every time the keyguard transition is over, // this animation is tied to the scrim for historic reasons. Loading Loading @@ -2232,7 +2233,11 @@ public class StatusBar extends SystemUI implements DemoMode, runPostCollapseRunnables(); setInteracting(StatusBarManager.WINDOW_STATUS_BAR, false); if (!mIsCollapsingToShowActivityOverLockscreen) { showBouncerIfKeyguard(); } else if (DEBUG) { Log.d(TAG, "Not showing bouncer due to activity showing over lockscreen"); } recomputeDisableFlags(mNotificationPanel.hideStatusBarIconsWhenExpanded() /* animate */); // Trimming will happen later if Keyguard is showing - doing it here might cause a jank in Loading Loading @@ -4745,7 +4750,11 @@ public class StatusBar extends SystemUI implements DemoMode, && PreviewInflater.wouldLaunchResolverActivity(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); final boolean wasOccluded = mIsOccluded; dismissKeyguardThenExecute(() -> { boolean showOverLockscreen = mStatusBarKeyguardViewManager.isShowing() && PreviewInflater.wouldShowOverLockscreen(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); OnDismissAction postKeyguardAction = () -> { // TODO: Some of this code may be able to move to NotificationEntryManager. if (mHeadsUpManager != null && mHeadsUpManager.isAlerting(notificationKey)) { // Release the HUN notification to the shade. Loading Loading @@ -4853,9 +4862,14 @@ public class StatusBar extends SystemUI implements DemoMode, // Automatically remove all notifications that we may have kept around longer removeNotification(sbn); } mIsCollapsingToShowActivityOverLockscreen = false; }; if (mStatusBarKeyguardViewManager.isShowing() if (showOverLockscreen) { addPostCollapseAction(runnable); collapsePanel(true /* animate */); } else if (mStatusBarKeyguardViewManager.isShowing() && mStatusBarKeyguardViewManager.isOccluded()) { mStatusBarKeyguardViewManager.addAfterKeyguardGoneRunnable(runnable); collapsePanel(true /* animate */); Loading @@ -4864,7 +4878,13 @@ public class StatusBar extends SystemUI implements DemoMode, } return !mNotificationPanel.isFullyCollapsed(); }, afterKeyguardGone); }; if (showOverLockscreen) { mIsCollapsingToShowActivityOverLockscreen = true; postKeyguardAction.onDismiss(); } else { dismissKeyguardThenExecute(postKeyguardAction, afterKeyguardGone); } } private void collapseOnMainThread() { Loading @@ -4881,7 +4901,10 @@ public class StatusBar extends SystemUI implements DemoMode, public void collapsePanel(boolean animate) { if (animate) { collapsePanel(); boolean willCollapse = collapsePanel(); if (!willCollapse) { runPostCollapseRunnables(); } } else if (!isPresenterFullyCollapsed()) { instantCollapseNotificationPanel(); visibilityChanged(false); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java +8 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,14 @@ public class PreviewInflater { == null; } public static boolean wouldShowOverLockscreen(Context ctx, Intent intent, int currentUserId) { ActivityInfo targetActivityInfo = getTargetActivityInfo(ctx, intent, currentUserId, false /* onlyDirectBootAware */); return targetActivityInfo != null && (targetActivityInfo.flags & (ActivityInfo.FLAG_SHOW_WHEN_LOCKED | ActivityInfo.FLAG_SHOW_FOR_ALL_USERS)) > 0; } /** * @param onlyDirectBootAware a boolean indicating whether the matched activity packages must * be direct boot aware when in direct boot mode if false, all Loading