Loading services/core/java/com/android/server/BluetoothManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -1174,6 +1174,26 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } private boolean bindService() { int state = BluetoothAdapter.STATE_OFF; try { mBluetoothLock.readLock().lock(); if (mBluetooth != null) { state = mBluetooth.getState(); } } catch (RemoteException e) { Slog.e(TAG, "Unable to call getState", e); return false; } finally { mBluetoothLock.readLock().unlock(); } if (!mEnable || state != BluetoothAdapter.STATE_ON) { if (DBG) { Slog.d(TAG, "Unable to bindService while Bluetooth is disabled"); } return false; } if (mIntent != null && mService == null && doBind(mIntent, this, 0, UserHandle.CURRENT_OR_SELF)) { Message msg = mHandler.obtainMessage(MESSAGE_BIND_PROFILE_SERVICE); Loading Loading
services/core/java/com/android/server/BluetoothManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -1174,6 +1174,26 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } private boolean bindService() { int state = BluetoothAdapter.STATE_OFF; try { mBluetoothLock.readLock().lock(); if (mBluetooth != null) { state = mBluetooth.getState(); } } catch (RemoteException e) { Slog.e(TAG, "Unable to call getState", e); return false; } finally { mBluetoothLock.readLock().unlock(); } if (!mEnable || state != BluetoothAdapter.STATE_ON) { if (DBG) { Slog.d(TAG, "Unable to bindService while Bluetooth is disabled"); } return false; } if (mIntent != null && mService == null && doBind(mIntent, this, 0, UserHandle.CURRENT_OR_SELF)) { Message msg = mHandler.obtainMessage(MESSAGE_BIND_PROFILE_SERVICE); Loading