DO NOT MERGE Add scan background mode to Settings.Global.
This enables us to mess with the different scan intervals and shift
clients to a different scan mode in the background based on what scan
interval values we choose for the different power modes.
Bug: 71765044
Test: None. Just adding a key.
Change-Id: Id48ebc521dd3fe8a68c9c4c0bdb1018ea5b3743e
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 79b6ea6..50d9767 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -9541,6 +9541,12 @@
public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS =
"ble_scan_low_latency_interval_ms";
+ /**
+ * The mode that BLE scanning clients will be moved to when in the background.
+ * @hide
+ */
+ public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode";
+
/**
* Used to save the Wifi_ON state prior to tethering.
* This state will be checked to restore Wifi after
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index cc36b96..63343be 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -129,6 +129,7 @@
Settings.Global.BLE_SCAN_BALANCED_INTERVAL_MS,
Settings.Global.BLE_SCAN_LOW_LATENCY_WINDOW_MS,
Settings.Global.BLE_SCAN_LOW_LATENCY_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_BACKGROUND_MODE,
Settings.Global.BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX,