Loading service/src/com/android/server/bluetooth/BluetoothManagerService.java +3 −15 Original line number Original line Diff line number Diff line Loading @@ -459,28 +459,16 @@ class BluetoothManagerService { } } if (currentState == STATE_ON) { if (currentState == STATE_ON) { mAdapterLock.readLock().lock(); sendDisableMsg(reason); try { if (mAdapter != null) { mEnable = false; mEnableExternal = false; addActiveLog(reason, false); mAdapter.disable(mContext.getAttributionSource()); } } catch (RemoteException e) { Log.e(TAG, "Unable to call disable", e); } finally { mAdapterLock.readLock().unlock(); } } else if (currentState == STATE_BLE_ON) { } else if (currentState == STATE_BLE_ON) { // If currentState is BLE_ON make sure we trigger stopBle // If currentState is BLE_ON make sure we trigger stopBle mAdapterLock.readLock().lock(); mAdapterLock.readLock().lock(); try { try { if (mAdapter != null) { if (mAdapter != null) { mEnable = false; mEnableExternal = false; addActiveLog(reason, false); addActiveLog(reason, false); mAdapter.stopBle(mContext.getAttributionSource()); mAdapter.stopBle(mContext.getAttributionSource()); mEnable = false; mEnableExternal = false; } } } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "Unable to call stopBle", e); Log.e(TAG, "Unable to call stopBle", e); Loading Loading
service/src/com/android/server/bluetooth/BluetoothManagerService.java +3 −15 Original line number Original line Diff line number Diff line Loading @@ -459,28 +459,16 @@ class BluetoothManagerService { } } if (currentState == STATE_ON) { if (currentState == STATE_ON) { mAdapterLock.readLock().lock(); sendDisableMsg(reason); try { if (mAdapter != null) { mEnable = false; mEnableExternal = false; addActiveLog(reason, false); mAdapter.disable(mContext.getAttributionSource()); } } catch (RemoteException e) { Log.e(TAG, "Unable to call disable", e); } finally { mAdapterLock.readLock().unlock(); } } else if (currentState == STATE_BLE_ON) { } else if (currentState == STATE_BLE_ON) { // If currentState is BLE_ON make sure we trigger stopBle // If currentState is BLE_ON make sure we trigger stopBle mAdapterLock.readLock().lock(); mAdapterLock.readLock().lock(); try { try { if (mAdapter != null) { if (mAdapter != null) { mEnable = false; mEnableExternal = false; addActiveLog(reason, false); addActiveLog(reason, false); mAdapter.stopBle(mContext.getAttributionSource()); mAdapter.stopBle(mContext.getAttributionSource()); mEnable = false; mEnableExternal = false; } } } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "Unable to call stopBle", e); Log.e(TAG, "Unable to call stopBle", e); Loading