Merge "Fixed issue where camera wouldn't launch"
This commit is contained in:
@@ -3098,10 +3098,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;
|
||||
}
|
||||
@@ -3110,7 +3108,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -3785,10 +3785,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