Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5d54fd8 authored by joshmccloskey's avatar joshmccloskey
Browse files

Placing intent on system handler.

Bug: 123598428
Test: Verified behavior works correctly on BiometricDemo app.
Change-Id: I9e9a9585e93dd34760d38e68489e949e63d297b0
parent 2348248e
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -719,14 +719,17 @@ public class BiometricService extends SystemService {
            // result back to the client.
            // TODO(b/123378871): Remove when moved.
            if (bundle.getBoolean(BiometricPrompt.KEY_ENABLE_FALLBACK)) {
                mHandler.post(() -> {
                    mConfirmDeviceCredentialReceiver = receiver;
                final KeyguardManager kgm = getContext().getSystemService(KeyguardManager.class);
                    final KeyguardManager kgm = getContext().getSystemService(
                            KeyguardManager.class);
                    // Use this so we don't need to duplicate logic..
                    final Intent intent = kgm.createConfirmDeviceCredentialIntent(null /* title */,
                            null /* description */);
                    // Then give it the bundle to do magic behavior..
                    intent.putExtra(KeyguardManager.EXTRA_BIOMETRIC_PROMPT_BUNDLE, bundle);
                    getContext().startActivityAsUser(intent, UserHandle.CURRENT);
                });
                return;
            }