From c97870a91ab4eadb03dec6fbdebd01cb6663ae3d Mon Sep 17 00:00:00 2001 From: Anthony Stange Date: Wed, 14 Mar 2018 01:09:45 +0000 Subject: 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 --- core/java/android/provider/Settings.java | 6 ++++++ core/tests/coretests/src/android/provider/SettingsBackupTest.java | 1 + 2 files changed, 7 insertions(+) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 79b6ea6e5a7c..50d9767ca780 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -9541,6 +9541,12 @@ public final class Settings { 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 cc36b9682603..63343bef67e7 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -129,6 +129,7 @@ public class SettingsBackupTest { 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, -- cgit v1.2.3-59-g8ed1b