OSDN Git Service

Bluetooth: Clear BLE always ON apps at Airplane mode
authorNitin Arora <niarora@codeaurora.org>
Fri, 8 May 2015 01:45:44 +0000 (18:45 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 20 May 2015 05:38:46 +0000 (22:38 -0700)
This patch clears the container managing the Ble Always On
apps while switching on, the airplane mode. The airplane mode
will completely turn Off the Bleutooth Adapter from any state
it is in.

Change-Id: Ib28d39d85efe3aac37e3a53a4fb892099568c702

services/core/java/com/android/server/BluetoothManagerService.java

index c46fa76..66fd36f 100644 (file)
@@ -205,6 +205,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                         // Clear registered LE apps to force shut-off
                         synchronized (this) {
                             mBleAppCount = 0;
+                            mBleApps.clear();
                         }
                         if (st == BluetoothAdapter.STATE_BLE_ON) {
                             //if state is BLE_ON make sure you trigger disableBLE part