Fixed issue where camera wouldn't launch
keyguardIsShowing cassed to NPV#canCameraGestureBeLaunched had the wrong value because it was checking if SB was expanded visible but ignoring the fact that bouncer would make it collapse. Test: launch camera from lock screen Test: launch camera from bouncer Test: launch camera from home Test: launch camera from open activity Test: launch camera from occluded keyguard Fixes: 138269798 Change-Id: Id259d42cbd7802614318d8f69c80470419f3b54b
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user