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

Commit 94786537 authored by Diya Bera's avatar Diya Bera Committed by Android (Google) Code Review
Browse files

Merge "[2/N] Identity Check Promo/Notification" into main

parents 65203a77 2be9974b
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
@@ -13741,6 +13741,24 @@ public final class Settings {
         * @hide
         */
        public static final String AAPM_USB_DATA_PROTECTION = "aapm_usb_data_protection";
        /**
         * Tracks if the user has enabled Identity Check before Android 16 QPR1 build. This value
         * is used to show promo card only to pre-existing users who have opted-in to the feature.
         *
         * @hide
         */
        public static final String IDENTITY_CHECK_ENABLED_V1 =
                "identity_check_enabled_v1";
        /**
         * Tracks if the user has seen the promo card for Identity Check.
         * The promo card should only appear once per device via Safety Center.
         *
         * @hide
         */
        public static final String IDENTITY_CHECK_PROMO_CARD_SHOWN =
                "identity_check_promo_card_shown";
    }
    /**
@@ -20285,14 +20303,12 @@ public final class Settings {
                "global_actions_timeout_ms";
        /**
         * Tracks if the user has seen the promo card for Identity Check.
         * The promo card should only appear once per device via Safety Center.
         * Indicates if the primary device is eligible for watch ranging or not.
         *
         * @hide
         */
        public static final String IDENTITY_CHECK_PROMO_CARD_SHOWN =
                "identity_check_promo_card_shown";
        public static final String WATCH_RANGING_SUPPORTED_BY_PRIMARY_DEVICE =
                "watch_ranging_supported_by_primary_device";
        /**
         * Settings migrated from Wear OS settings provider.
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class DefaultProximityProviderService extends Service {

                @Override
                public int isProximityCheckingAvailable() {
                    return ProximityResultCode.NO_ASSOCIATED_DEVICE;
                    return ProximityResultCode.PRIMARY_DEVICE_RANGING_NOT_SUPPORTED;
                }
            };

+17 −0
Original line number Diff line number Diff line
@@ -525,6 +525,8 @@ public final class AuthenticationPolicyManager {
    }

    /**
     * Cancels watch ranging for the given authentication request id.
     *
     * @hide
     */
    @RequiresPermission(USE_BIOMETRIC_INTERNAL)
@@ -537,6 +539,21 @@ public final class AuthenticationPolicyManager {
        }
    }

    /**
     * Checks if watch ranging is available. Returns value using IProximityResultCallback.
     *
     * @hide
     */
    @RequiresPermission(USE_BIOMETRIC_INTERNAL)
    @FlaggedApi(FLAG_IDENTITY_CHECK_WATCH)
    public void isWatchRangingAvailable(@NonNull IProximityResultCallback resultCallback) {
        try {
            mAuthenticationPolicyService.isWatchRangingAvailable(resultCallback);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    private static final class ProximityResultCallbackWrapper
            extends IProximityResultCallback.Stub {
        private final Handler mHandler;
+3 −0
Original line number Diff line number Diff line
@@ -51,4 +51,7 @@ interface IAuthenticationPolicyService {

    @EnforcePermission("USE_BIOMETRIC_INTERNAL")
    void cancelWatchRangingForRequestId(in long authenticationRequestId);

    @EnforcePermission("USE_BIOMETRIC_INTERNAL")
    void isWatchRangingAvailable(in IProximityResultCallback resultCallback);
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -130,6 +130,6 @@ public class GlobalSettings {
        Settings.Global.REMOVE_GUEST_ON_EXIT,
        Settings.Global.USER_SWITCHER_ENABLED,
        Settings.Global.GLOBAL_ACTIONS_TIMEOUT_MILLIS,
        Settings.Global.IDENTITY_CHECK_PROMO_CARD_SHOWN,
        Settings.Global.WATCH_RANGING_SUPPORTED_BY_PRIMARY_DEVICE,
    };
}
Loading