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

Commit a6f38742 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Update intent for requesting parental consent

Bug: 188847063
Test: adb shell settings put secure android.hardware.biometrics.ParentalControlsUtilsInternal.always_require_consent 1
      settings > security > fingerprint
      press positive button
      adb logcat -b events (intent is sent)
Change-Id: I72ab71d0dd53f66387e5c2ade510ef19c2b7f4e6
parent 6934722a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -32,8 +32,10 @@ public class BiometricActionDisabledByAdminController extends BaseActionDisabled

    // These MUST not change, as they are the stable API between here and device admin specified
    // by the component below.
    private static final String ACTION_LEARN_MORE = "android.settings.LEARN_MORE";
    private static final String EXTRA_FROM_BIOMETRIC_SETUP = "from_biometric_setup";
    private static final String ACTION_LEARN_MORE =
            "android.intent.action.MANAGE_RESTRICTED_SETTING";
    private static final String EXTRA_SETTING_KEY = "extra_setting";
    private static final String EXTRA_SETTING_VALUE = "biometric_disabled_by_admin_controller";

    BiometricActionDisabledByAdminController(
            DeviceAdminStringProvider stringProvider) {
@@ -63,7 +65,7 @@ public class BiometricActionDisabledByAdminController extends BaseActionDisabled
            Log.d(TAG, "Positive button clicked, component: " + enforcedAdmin.component);
            final Intent intent = new Intent(ACTION_LEARN_MORE)
                    .setComponent(enforcedAdmin.component)
                    .putExtra(EXTRA_FROM_BIOMETRIC_SETUP, true)
                    .putExtra(EXTRA_SETTING_KEY, EXTRA_SETTING_VALUE)
                    .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intent);
        };