OSDN Git Service

Allow for supported profiles to be reloaded on enable.
authorBryce Lee <brycelee@google.com>
Fri, 23 Oct 2015 19:30:29 +0000 (12:30 -0700)
committerBryce Lee <brycelee@google.com>
Fri, 23 Oct 2015 19:30:29 +0000 (12:30 -0700)
Bug: 24977590
Change-Id: I2e5371d3333482cdd1cf18d48fe3c2e0f2229e42

src/com/android/bluetooth/btservice/AdapterService.java

index a26b515..a12ea9e 100644 (file)
@@ -426,6 +426,12 @@ public class AdapterService extends Service {
 
     void BleOnProcessStart() {
         debugLog("BleOnProcessStart()");
+
+        if (getApplicationContext().getResources().getBoolean(
+                R.bool.config_bluetooth_reload_supported_profiles_when_enabled)) {
+            Config.init(getApplicationContext());
+        }
+
         Class[] supportedProfileServices = Config.getSupportedProfiles();
         //Initialize data objects
         for (int i=0; i < supportedProfileServices.length;i++) {