From 2b53d01a699e1730b7de6fb19cab6d2d1b4ec005 Mon Sep 17 00:00:00 2001 From: Ganesh Olekar Date: Wed, 25 May 2022 01:43:57 +0000 Subject: [PATCH] Deprecate settings secure properties for location access check Bug: 224619912 Test: atest LocationAccessCheckTest Change-Id: I9a1b8903455c2c295f5daef7f89a444cfae6138a --- core/api/system-current.txt | 4 ++-- core/java/android/provider/Settings.java | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 8ae5a2648e39d..3951c76deac55 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10584,8 +10584,8 @@ package android.provider { field public static final String HUSH_GESTURE_USED = "hush_gesture_used"; field public static final String INSTANT_APPS_ENABLED = "instant_apps_enabled"; field public static final String LAST_SETUP_SHOWN = "last_setup_shown"; - field public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis"; - field public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis"; + field @Deprecated public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis"; + field @Deprecated public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis"; field public static final int LOCATION_MODE_ON = 3; // 0x3 field @Deprecated public static final String LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE = "location_permissions_upgrade_to_q_mode"; field public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = "lock_screen_allow_private_notifications"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 34b50d12aa9da..2f7bef965efa7 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -10375,8 +10375,17 @@ public final class Settings { /** * How often to check for location access. * @hide + * + * @deprecated This has been moved to DeviceConfig property + * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_PERIODIC_INTERVAL_MILLIS} in a T + * module update + * + * Before Android T set this property to control the interval for the check + * On Android T set this and the DeviceConfig property + * After Android T set the DeviceConfig property */ @SystemApi + @Deprecated @Readable public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis"; @@ -10384,8 +10393,17 @@ public final class Settings { /** * Delay between granting location access and checking it. * @hide + * + * @deprecated This has been moved to DeviceConfig property + * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_CHECK_DELAY_MILLIS} in a T module + * update + * + * Before Android T set this property to control the delay for the check + * On Android T set this and the DeviceConfig property + * After Android T set the DeviceConfig property */ @SystemApi + @Deprecated @Readable public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis";