Secure FRP : Add a secure bit to know when the device is in secure FRP mode.
Bug: 141262900
Test: atest SettingsProviderTest
Change-Id: Iabc1f699d6afd6a1524b37f992314b9b20463bc2
diff --git a/api/system-current.txt b/api/system-current.txt
index 77aff8d..99db118 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6461,6 +6461,7 @@
field public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = "lock_screen_allow_private_notifications";
field public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications";
field public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled";
+ field public static final String SECURE_FRP_MODE = "secure_frp_mode";
field public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = "theme_customization_overlay_packages";
field public static final String USER_SETUP_COMPLETE = "user_setup_complete";
field public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; // 0xa
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index cce0d4f..5e417b9 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -5715,6 +5715,18 @@
"managed_provisioning_dpc_downloaded";
/**
+ * Indicates whether the device is under restricted secure FRP mode.
+ * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge,
+ * device is removed from this mode.
+ * <p>
+ * Type: int (0 for false, 1 for true)
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String SECURE_FRP_MODE = "secure_frp_mode";
+
+ /**
* Indicates whether the current user has completed setup via the setup wizard.
* <p>
* Type: int (0 for false, 1 for true)
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index 289ac80..25483c6 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -685,6 +685,7 @@
Settings.Secure.SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE,
Settings.Secure.SEARCH_SOURCE_TIMEOUT_MILLIS,
Settings.Secure.SEARCH_THREAD_KEEPALIVE_SECONDS,
+ Settings.Secure.SECURE_FRP_MODE,
Settings.Secure.SEARCH_WEB_RESULTS_OVERRIDE_LIMIT,
Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE,
Settings.Secure.SELECTED_SPELL_CHECKER, // Intentionally removed in Q