Loading core/java/android/app/KeyguardManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,14 @@ public class KeyguardManager { public static final String EXTRA_REMOTE_LOCKSCREEN_VALIDATION_SESSION = "android.app.extra.REMOTE_LOCKSCREEN_VALIDATION_SESSION"; /** * A boolean indicating that credential confirmation activity should be a task overlay. * {@link #ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER}. * @hide */ public static final String EXTRA_FORCE_TASK_OVERLAY = "android.app.KeyguardManager.FORCE_TASK_OVERLAY"; /** * Result code returned by the activity started by * {@link #createConfirmFactoryResetCredentialIntent} or Loading packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java +8 −4 Original line number Diff line number Diff line Loading @@ -176,10 +176,10 @@ public class WorkLockActivity extends Activity { return; } final Intent credential = getKeyguardManager() final Intent confirmCredentialIntent = getKeyguardManager() .createConfirmDeviceCredentialIntent(null, null, getTargetUserId(), true /* disallowBiometricsIfPolicyExists */); if (credential == null) { if (confirmCredentialIntent == null) { return; } Loading @@ -193,14 +193,18 @@ public class WorkLockActivity extends Activity { PendingIntent.FLAG_IMMUTABLE, options.toBundle()); if (target != null) { credential.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); confirmCredentialIntent.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); } // WorkLockActivity is started as a task overlay, so unless credential confirmation is also // started as an overlay, it won't be visible. final ActivityOptions launchOptions = ActivityOptions.makeBasic(); launchOptions.setLaunchTaskId(getTaskId()); launchOptions.setTaskOverlay(true /* taskOverlay */, true /* canResume */); // Propagate it in case more than one activity is launched. confirmCredentialIntent.putExtra(KeyguardManager.EXTRA_FORCE_TASK_OVERLAY, true); startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS, startActivityForResult(confirmCredentialIntent, REQUEST_CODE_CONFIRM_CREDENTIALS, launchOptions.toBundle()); } Loading Loading
core/java/android/app/KeyguardManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,14 @@ public class KeyguardManager { public static final String EXTRA_REMOTE_LOCKSCREEN_VALIDATION_SESSION = "android.app.extra.REMOTE_LOCKSCREEN_VALIDATION_SESSION"; /** * A boolean indicating that credential confirmation activity should be a task overlay. * {@link #ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER}. * @hide */ public static final String EXTRA_FORCE_TASK_OVERLAY = "android.app.KeyguardManager.FORCE_TASK_OVERLAY"; /** * Result code returned by the activity started by * {@link #createConfirmFactoryResetCredentialIntent} or Loading
packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java +8 −4 Original line number Diff line number Diff line Loading @@ -176,10 +176,10 @@ public class WorkLockActivity extends Activity { return; } final Intent credential = getKeyguardManager() final Intent confirmCredentialIntent = getKeyguardManager() .createConfirmDeviceCredentialIntent(null, null, getTargetUserId(), true /* disallowBiometricsIfPolicyExists */); if (credential == null) { if (confirmCredentialIntent == null) { return; } Loading @@ -193,14 +193,18 @@ public class WorkLockActivity extends Activity { PendingIntent.FLAG_IMMUTABLE, options.toBundle()); if (target != null) { credential.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); confirmCredentialIntent.putExtra(Intent.EXTRA_INTENT, target.getIntentSender()); } // WorkLockActivity is started as a task overlay, so unless credential confirmation is also // started as an overlay, it won't be visible. final ActivityOptions launchOptions = ActivityOptions.makeBasic(); launchOptions.setLaunchTaskId(getTaskId()); launchOptions.setTaskOverlay(true /* taskOverlay */, true /* canResume */); // Propagate it in case more than one activity is launched. confirmCredentialIntent.putExtra(KeyguardManager.EXTRA_FORCE_TASK_OVERLAY, true); startActivityForResult(credential, REQUEST_CODE_CONFIRM_CREDENTIALS, startActivityForResult(confirmCredentialIntent, REQUEST_CODE_CONFIRM_CREDENTIALS, launchOptions.toBundle()); } Loading