Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ oneway interface IStatusBar // Used to show the authentication dialog (Biometrics, Device Credential) void showAuthenticationDialog(in Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId); long operationId, int sysUiSessionId); // Used to notify the authentication dialog that a biometric has been authenticated void onBiometricAuthenticated(); // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ interface IStatusBarService // Used to show the authentication dialog (Biometrics, Device Credential) void showAuthenticationDialog(in Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId); long operationId, int sysUiSessionId); // Used to notify the authentication dialog that a biometric has been authenticated void onBiometricAuthenticated(); // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +5 −3 Original line number Diff line number Diff line Loading @@ -432,7 +432,7 @@ public abstract class AuthBiometricView extends LinearLayout { Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this); } public void updateState(@BiometricState int newState) { void updateState(@BiometricState int newState) { Log.v(TAG, "newState: " + newState); switch (newState) { Loading @@ -453,8 +453,10 @@ public abstract class AuthBiometricView extends LinearLayout { } announceForAccessibility(getResources() .getString(R.string.biometric_dialog_authenticated)); mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_AUTHENTICATED), getDelayAfterAuthenticatedDurationMs()); mHandler.postDelayed(() -> { Log.d(TAG, "Sending ACTION_AUTHENTICATED"); mCallback.onAction(Callback.ACTION_AUTHENTICATED); }, getDelayAfterAuthenticatedDurationMs()); break; case STATE_PENDING_CONFIRMATION: Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +20 −6 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ public class AuthContainerView extends LinearLayout int mModalityMask; boolean mSkipIntro; long mOperationId; int mSysUiSessionId; } public static class Builder { Loading Loading @@ -158,6 +159,11 @@ public class AuthContainerView extends LinearLayout return this; } public Builder setSysUiSessionId(int sysUiSessionId) { mConfig.mSysUiSessionId = sysUiSessionId; return this; } public AuthContainerView build(int modalityMask) { mConfig.mModalityMask = modalityMask; return new AuthContainerView(mConfig, new Injector()); Loading Loading @@ -203,6 +209,9 @@ public class AuthContainerView extends LinearLayout final class BiometricCallback implements AuthBiometricView.Callback { @Override public void onAction(int action) { Log.d(TAG, "onAction: " + action + ", sysUiSessionId: " + mConfig.mSysUiSessionId + ", state: " + mContainerState); switch (action) { case AuthBiometricView.Callback.ACTION_AUTHENTICATED: animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED); Loading Loading @@ -461,13 +470,13 @@ public class AuthContainerView extends LinearLayout if (animate) { animateAway(false /* sendReason */, 0 /* reason */); } else { removeWindowIfAttached(); removeWindowIfAttached(false /* sendReason */); } } @Override public void dismissFromSystemServer() { removeWindowIfAttached(); removeWindowIfAttached(true /* sendReason */); } @Override Loading Loading @@ -540,7 +549,7 @@ public class AuthContainerView extends LinearLayout final Runnable endActionRunnable = () -> { setVisibility(View.INVISIBLE); removeWindowIfAttached(); removeWindowIfAttached(true /* sendReason */); }; postOnAnimation(() -> { Loading Loading @@ -575,19 +584,24 @@ public class AuthContainerView extends LinearLayout } private void sendPendingCallbackIfNotNull() { Log.d(TAG, "pendingCallback: " + mPendingCallbackReason); Log.d(TAG, "pendingCallback: " + mPendingCallbackReason + " sysUISessionId: " + mConfig.mSysUiSessionId); if (mPendingCallbackReason != null) { mConfig.mCallback.onDismissed(mPendingCallbackReason, mCredentialAttestation); mPendingCallbackReason = null; } } private void removeWindowIfAttached() { private void removeWindowIfAttached(boolean sendReason) { if (sendReason) { sendPendingCallbackIfNotNull(); } if (mContainerState == STATE_GONE) { Log.w(TAG, "Container already STATE_GONE, mSysUiSessionId: " + mConfig.mSysUiSessionId); return; } Log.d(TAG, "Removing container, mSysUiSessionId: " + mConfig.mSysUiSessionId); mContainerState = STATE_GONE; mWindowManager.removeView(this); } Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +12 −5 Original line number Diff line number Diff line Loading @@ -276,14 +276,15 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, @Override public void showAuthenticationDialog(Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId) { long operationId, int sysUiSessionId) { final int authenticators = Utils.getAuthenticators(bundle); if (DEBUG) { Log.d(TAG, "showAuthenticationDialog, authenticators: " + authenticators + ", biometricModality: " + biometricModality + ", requireConfirmation: " + requireConfirmation + ", operationId: " + operationId); + ", operationId: " + operationId + ", sysUiSessionId: " + sysUiSessionId); } SomeArgs args = SomeArgs.obtain(); args.arg1 = bundle; Loading @@ -293,6 +294,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, args.argi2 = userId; args.arg4 = opPackageName; args.arg5 = operationId; args.argi3 = sysUiSessionId; boolean skipAnimation = false; if (mCurrentDialog != null) { Loading Loading @@ -382,6 +384,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, final int userId = args.argi2; final String opPackageName = (String) args.arg4; final long operationId = (long) args.arg5; final int sysUiSessionId = args.argi3; // Create a new dialog but do not replace the current one yet. final AuthDialog newDialog = buildDialog( Loading @@ -391,7 +394,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, type, opPackageName, skipAnimation, operationId); operationId, sysUiSessionId); if (newDialog == null) { Log.e(TAG, "Unsupported type: " + type); Loading @@ -403,7 +407,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, + " savedState: " + savedState + " mCurrentDialog: " + mCurrentDialog + " newDialog: " + newDialog + " type: " + type); + " type: " + type + " sysUiSessionId: " + sysUiSessionId); } if (mCurrentDialog != null) { Loading Loading @@ -458,7 +463,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } protected AuthDialog buildDialog(Bundle biometricPromptBundle, boolean requireConfirmation, int userId, int type, String opPackageName, boolean skipIntro, long operationId) { int userId, int type, String opPackageName, boolean skipIntro, long operationId, int sysUiSessionId) { return new AuthContainerView.Builder(mContext) .setCallback(this) .setBiometricPromptBundle(biometricPromptBundle) Loading @@ -467,6 +473,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, .setOpPackageName(opPackageName) .setSkipIntro(skipIntro) .setOperationId(operationId) .setSysUiSessionId(sysUiSessionId) .build(type); } } Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ oneway interface IStatusBar // Used to show the authentication dialog (Biometrics, Device Credential) void showAuthenticationDialog(in Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId); long operationId, int sysUiSessionId); // Used to notify the authentication dialog that a biometric has been authenticated void onBiometricAuthenticated(); // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ interface IStatusBarService // Used to show the authentication dialog (Biometrics, Device Credential) void showAuthenticationDialog(in Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId); long operationId, int sysUiSessionId); // Used to notify the authentication dialog that a biometric has been authenticated void onBiometricAuthenticated(); // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +5 −3 Original line number Diff line number Diff line Loading @@ -432,7 +432,7 @@ public abstract class AuthBiometricView extends LinearLayout { Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this); } public void updateState(@BiometricState int newState) { void updateState(@BiometricState int newState) { Log.v(TAG, "newState: " + newState); switch (newState) { Loading @@ -453,8 +453,10 @@ public abstract class AuthBiometricView extends LinearLayout { } announceForAccessibility(getResources() .getString(R.string.biometric_dialog_authenticated)); mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_AUTHENTICATED), getDelayAfterAuthenticatedDurationMs()); mHandler.postDelayed(() -> { Log.d(TAG, "Sending ACTION_AUTHENTICATED"); mCallback.onAction(Callback.ACTION_AUTHENTICATED); }, getDelayAfterAuthenticatedDurationMs()); break; case STATE_PENDING_CONFIRMATION: Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +20 −6 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ public class AuthContainerView extends LinearLayout int mModalityMask; boolean mSkipIntro; long mOperationId; int mSysUiSessionId; } public static class Builder { Loading Loading @@ -158,6 +159,11 @@ public class AuthContainerView extends LinearLayout return this; } public Builder setSysUiSessionId(int sysUiSessionId) { mConfig.mSysUiSessionId = sysUiSessionId; return this; } public AuthContainerView build(int modalityMask) { mConfig.mModalityMask = modalityMask; return new AuthContainerView(mConfig, new Injector()); Loading Loading @@ -203,6 +209,9 @@ public class AuthContainerView extends LinearLayout final class BiometricCallback implements AuthBiometricView.Callback { @Override public void onAction(int action) { Log.d(TAG, "onAction: " + action + ", sysUiSessionId: " + mConfig.mSysUiSessionId + ", state: " + mContainerState); switch (action) { case AuthBiometricView.Callback.ACTION_AUTHENTICATED: animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED); Loading Loading @@ -461,13 +470,13 @@ public class AuthContainerView extends LinearLayout if (animate) { animateAway(false /* sendReason */, 0 /* reason */); } else { removeWindowIfAttached(); removeWindowIfAttached(false /* sendReason */); } } @Override public void dismissFromSystemServer() { removeWindowIfAttached(); removeWindowIfAttached(true /* sendReason */); } @Override Loading Loading @@ -540,7 +549,7 @@ public class AuthContainerView extends LinearLayout final Runnable endActionRunnable = () -> { setVisibility(View.INVISIBLE); removeWindowIfAttached(); removeWindowIfAttached(true /* sendReason */); }; postOnAnimation(() -> { Loading Loading @@ -575,19 +584,24 @@ public class AuthContainerView extends LinearLayout } private void sendPendingCallbackIfNotNull() { Log.d(TAG, "pendingCallback: " + mPendingCallbackReason); Log.d(TAG, "pendingCallback: " + mPendingCallbackReason + " sysUISessionId: " + mConfig.mSysUiSessionId); if (mPendingCallbackReason != null) { mConfig.mCallback.onDismissed(mPendingCallbackReason, mCredentialAttestation); mPendingCallbackReason = null; } } private void removeWindowIfAttached() { private void removeWindowIfAttached(boolean sendReason) { if (sendReason) { sendPendingCallbackIfNotNull(); } if (mContainerState == STATE_GONE) { Log.w(TAG, "Container already STATE_GONE, mSysUiSessionId: " + mConfig.mSysUiSessionId); return; } Log.d(TAG, "Removing container, mSysUiSessionId: " + mConfig.mSysUiSessionId); mContainerState = STATE_GONE; mWindowManager.removeView(this); } Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +12 −5 Original line number Diff line number Diff line Loading @@ -276,14 +276,15 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, @Override public void showAuthenticationDialog(Bundle bundle, IBiometricServiceReceiverInternal receiver, int biometricModality, boolean requireConfirmation, int userId, String opPackageName, long operationId) { long operationId, int sysUiSessionId) { final int authenticators = Utils.getAuthenticators(bundle); if (DEBUG) { Log.d(TAG, "showAuthenticationDialog, authenticators: " + authenticators + ", biometricModality: " + biometricModality + ", requireConfirmation: " + requireConfirmation + ", operationId: " + operationId); + ", operationId: " + operationId + ", sysUiSessionId: " + sysUiSessionId); } SomeArgs args = SomeArgs.obtain(); args.arg1 = bundle; Loading @@ -293,6 +294,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, args.argi2 = userId; args.arg4 = opPackageName; args.arg5 = operationId; args.argi3 = sysUiSessionId; boolean skipAnimation = false; if (mCurrentDialog != null) { Loading Loading @@ -382,6 +384,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, final int userId = args.argi2; final String opPackageName = (String) args.arg4; final long operationId = (long) args.arg5; final int sysUiSessionId = args.argi3; // Create a new dialog but do not replace the current one yet. final AuthDialog newDialog = buildDialog( Loading @@ -391,7 +394,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, type, opPackageName, skipAnimation, operationId); operationId, sysUiSessionId); if (newDialog == null) { Log.e(TAG, "Unsupported type: " + type); Loading @@ -403,7 +407,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, + " savedState: " + savedState + " mCurrentDialog: " + mCurrentDialog + " newDialog: " + newDialog + " type: " + type); + " type: " + type + " sysUiSessionId: " + sysUiSessionId); } if (mCurrentDialog != null) { Loading Loading @@ -458,7 +463,8 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } protected AuthDialog buildDialog(Bundle biometricPromptBundle, boolean requireConfirmation, int userId, int type, String opPackageName, boolean skipIntro, long operationId) { int userId, int type, String opPackageName, boolean skipIntro, long operationId, int sysUiSessionId) { return new AuthContainerView.Builder(mContext) .setCallback(this) .setBiometricPromptBundle(biometricPromptBundle) Loading @@ -467,6 +473,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, .setOpPackageName(opPackageName) .setSkipIntro(skipIntro) .setOperationId(operationId) .setSysUiSessionId(sysUiSessionId) .build(type); } }