OSDN Git Service

Configuration for priority/auto-connection for PAN.
authorSanket Agarwal <sanketa@google.com>
Thu, 4 Aug 2016 23:16:20 +0000 (16:16 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 31 Oct 2016 17:45:32 +0000 (17:45 +0000)
We protect the auto-connection via a flag so that it is only enabled on
some devices.

Bug: b/30679978
Change-Id: I5b7f273e09a659b561913d5c6f3a76feb245e6ce
(cherry picked from commit 1f09d5f255980488cabd55a5c44a5737e24541d8)

core/java/android/provider/Settings.java
core/res/res/values/config.xml
core/res/res/values/symbols.xml

index 25cc961..eaf56ac 100755 (executable)
@@ -7936,6 +7936,9 @@ public final class Settings {
         /** {@hide} */
         public static final String
                 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_";
+        /** {@hide} */
+        public static final String
+                BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_";
 
         /**
          * Device Idle (Doze) specific settings.
@@ -8113,6 +8116,14 @@ public final class Settings {
         }
 
         /**
+         * Get the key that retrieves a bluetooth pan client priority.
+         * @hide
+         */
+        public static final String getBluetoothPanPriorityKey(String address) {
+            return BLUETOOTH_PAN_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
+        }
+
+        /**
          * Get the key that retrieves a bluetooth map priority.
          * @hide
          */
index 0201111..a8be8d3 100644 (file)
     <!-- Whether supported profiles should be reloaded upon enabling bluetooth -->
     <bool name="config_bluetooth_reload_supported_profiles_when_enabled">false</bool>
 
+    <!-- Enabling autoconnect over pan -->
+    <bool name="config_bluetooth_pan_enable_autoconnect">false</bool>
+
     <!-- The default data-use polling period. -->
     <integer name="config_datause_polling_period_sec">600</integer>
 
index 2345885..6f2822b 100644 (file)
   <java-symbol type="integer" name="config_bluetooth_rx_cur_ma" />
   <java-symbol type="integer" name="config_bluetooth_tx_cur_ma" />
   <java-symbol type="integer" name="config_bluetooth_operating_voltage_mv" />
+  <java-symbol type="bool" name="config_bluetooth_pan_enable_autoconnect" />
   <java-symbol type="bool" name="config_bluetooth_reload_supported_profiles_when_enabled" />
   <java-symbol type="integer" name="config_cursorWindowSize" />
   <java-symbol type="integer" name="config_drawLockTimeoutMillis" />