Not bypassing while the camera is being launched

This could lead to home potentially being shown

Fixes: 134831996
Test: launch camera, no bypass happening
Change-Id: Id696d18d41021cff11c4bd1afb7a453f65d777a1
This commit is contained in:
Selim Cinek
2019-06-19 18:13:51 -07:00
parent ae2702d1d6
commit ec17775e54
2 changed files with 6 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ class KeyguardBypassController {
private set
var bouncerShowing: Boolean = false
var launchingAffordance: Boolean = false
var qSExpanded = false
set(value) {
val changed = field != value
@@ -106,6 +107,9 @@ class KeyguardBypassController {
// to unlock
return false
}
if (launchingAffordance) {
return false
}
if (isPulseExpanding || qSExpanded) {
pendingUnlockType = biometricSourceType
return false

View File

@@ -2906,7 +2906,6 @@ public class NotificationPanelView extends PanelView implements
// nor setting these flags, since the occluded state doesn't change anymore, hence it's
// never reset.
if (!isFullyCollapsed()) {
mLaunchingAffordance = true;
setLaunchingAffordance(true);
} else {
animate = false;
@@ -2916,7 +2915,6 @@ public class NotificationPanelView extends PanelView implements
}
public void onAffordanceLaunchEnded() {
mLaunchingAffordance = false;
setLaunchingAffordance(false);
}
@@ -2925,8 +2923,10 @@ public class NotificationPanelView extends PanelView implements
* launched via a camera gesture.
*/
private void setLaunchingAffordance(boolean launchingAffordance) {
mLaunchingAffordance = launchingAffordance;
getLeftIcon().setLaunchingAffordance(launchingAffordance);
getRightIcon().setLaunchingAffordance(launchingAffordance);
mKeyguardBypassController.setLaunchingAffordance(launchingAffordance);
if (mAffordanceLaunchListener != null) {
mAffordanceLaunchListener.accept(launchingAffordance);
}