Merge changes Ia3307593,I43126ce1 into qt-r1-dev
* changes: Reset mSecureCameraLaunched when bouncer is shown Do task stack work on handler to ensure in-order execution
This commit is contained in:
@@ -2203,6 +2203,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
if (DEBUG) Log.d(TAG, "handleKeyguardBouncerChanged(" + bouncer + ")");
|
if (DEBUG) Log.d(TAG, "handleKeyguardBouncerChanged(" + bouncer + ")");
|
||||||
boolean isBouncer = (bouncer == 1);
|
boolean isBouncer = (bouncer == 1);
|
||||||
mBouncer = isBouncer;
|
mBouncer = isBouncer;
|
||||||
|
|
||||||
|
if (isBouncer) {
|
||||||
|
// If the bouncer is shown, always clear this flag. This can happen in the following
|
||||||
|
// situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure
|
||||||
|
// camera requests dismiss keyguard (tapping on photos for example). When these happen,
|
||||||
|
// face auth should resume.
|
||||||
|
mSecureCameraLaunched = false;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < mCallbacks.size(); i++) {
|
for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
||||||
if (cb != null) {
|
if (cb != null) {
|
||||||
@@ -2649,6 +2658,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
pw.println(" strongAuthFlags=" + Integer.toHexString(strongAuthFlags));
|
pw.println(" strongAuthFlags=" + Integer.toHexString(strongAuthFlags));
|
||||||
pw.println(" trustManaged=" + getUserTrustIsManaged(userId));
|
pw.println(" trustManaged=" + getUserTrustIsManaged(userId));
|
||||||
pw.println(" enabledByUser=" + mFaceSettingEnabledForUser);
|
pw.println(" enabledByUser=" + mFaceSettingEnabledForUser);
|
||||||
|
pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -497,9 +497,9 @@ public abstract class BiometricServiceBase extends SystemService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class BiometricTaskStackListener extends TaskStackListener {
|
private final Runnable mOnTaskStackChangedRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void onTaskStackChanged() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
if (!(mCurrentClient instanceof AuthenticationClient)) {
|
if (!(mCurrentClient instanceof AuthenticationClient)) {
|
||||||
return;
|
return;
|
||||||
@@ -514,8 +514,8 @@ public abstract class BiometricServiceBase extends SystemService
|
|||||||
final String topPackage = runningTasks.get(0).topActivity.getPackageName();
|
final String topPackage = runningTasks.get(0).topActivity.getPackageName();
|
||||||
if (!topPackage.contentEquals(currentClient)
|
if (!topPackage.contentEquals(currentClient)
|
||||||
&& !mCurrentClient.isAlreadyDone()) {
|
&& !mCurrentClient.isAlreadyDone()) {
|
||||||
Slog.e(getTag(), "Stopping background authentication, top: " + topPackage
|
Slog.e(getTag(), "Stopping background authentication, top: "
|
||||||
+ " currentClient: " + currentClient);
|
+ topPackage + " currentClient: " + currentClient);
|
||||||
mCurrentClient.stop(false /* initiatedByClient */);
|
mCurrentClient.stop(false /* initiatedByClient */);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -523,6 +523,13 @@ public abstract class BiometricServiceBase extends SystemService
|
|||||||
Slog.e(getTag(), "Unable to get running tasks", e);
|
Slog.e(getTag(), "Unable to get running tasks", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private final class BiometricTaskStackListener extends TaskStackListener {
|
||||||
|
@Override
|
||||||
|
public void onTaskStackChanged() {
|
||||||
|
mHandler.post(mOnTaskStackChangedRunnable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class ResetClientStateRunnable implements Runnable {
|
private final class ResetClientStateRunnable implements Runnable {
|
||||||
|
|||||||
Reference in New Issue
Block a user