diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 971a7eeaca12a..dda9d158d4fbc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -3048,10 +3048,8 @@ public class NotificationPanelView extends PanelView implements /** * Whether the camera application can be launched for the camera launch gesture. - * - * @param keyguardIsShowing whether keyguard is being shown */ - public boolean canCameraGestureBeLaunched(boolean keyguardIsShowing) { + public boolean canCameraGestureBeLaunched() { if (!mStatusBar.isCameraAllowedByAdmin()) { return false; } @@ -3060,7 +3058,7 @@ public class NotificationPanelView extends PanelView implements String packageToLaunch = (resolveInfo == null || resolveInfo.activityInfo == null) ? null : resolveInfo.activityInfo.packageName; return packageToLaunch != null && - (keyguardIsShowing || !isForegroundApp(packageToLaunch)) + (mBarState != StatusBarState.SHADE || !isForegroundApp(packageToLaunch)) && !mAffordanceHelper.isSwipingInProgress(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 40ebe583b0215..ebe6fe2af21e3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3766,10 +3766,8 @@ public class StatusBar extends SystemUI implements DemoMode, mLaunchCameraOnFinishedGoingToSleep = true; return; } - if (!mNotificationPanel.canCameraGestureBeLaunched( - mStatusBarKeyguardViewManager.isShowing() && mExpandedVisible)) { - if (DEBUG_CAMERA_LIFT) Slog.d(TAG, "Can't launch camera right now, mExpandedVisible: " + - mExpandedVisible); + if (!mNotificationPanel.canCameraGestureBeLaunched()) { + if (DEBUG_CAMERA_LIFT) Slog.d(TAG, "Can't launch camera right now"); return; } if (!mDeviceInteractive) {