Merge "Calls unlinkToDeath in binderDied to deregister"
am: 72fa61b325
Change-Id: Ica7438fe5ebd978192226f3e2b8a0630b843b752
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 62bab76..a7515e5 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -637,29 +637,10 @@
IBinder token = entry.getKey();
ClientDeathRecipient deathRec = entry.getValue();
if (deathRec.equals(this)) {
- mBleApps.remove(token);
+ updateBleAppCount(token, false, mPackageName);
break;
}
}
-
- if (isBleAppPresent()) {
- // Nothing to do, another app is here.
- return;
- }
- if (DBG) {
- Slog.d(TAG, "Disabling LE only mode after application crash");
- }
- try {
- mBluetoothLock.readLock().lock();
- if (mBluetooth != null && mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
- mEnable = false;
- mBluetooth.onBrEdrDown();
- }
- } catch (RemoteException e) {
- Slog.e(TAG, "Unable to call onBrEdrDown", e);
- } finally {
- mBluetoothLock.readLock().unlock();
- }
}
public String getPackageName() {