Loading core/java/android/bluetooth/BluetoothGatt.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.bluetooth; import android.bluetooth.BluetoothAdapter; import android.content.Context; import android.os.ParcelUuid; import android.os.RemoteException; Loading Loading @@ -628,6 +629,8 @@ public final class BluetoothGatt implements BluetoothProfile { public void close() { if (DBG) Log.d(TAG, "close()"); BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter.getState() != adapter.STATE_ON) return ; unregisterApp(); mConnState = CONN_STATE_CLOSED; } Loading Loading @@ -750,6 +753,8 @@ public final class BluetoothGatt implements BluetoothProfile { if (DBG) Log.d(TAG, "cancelOpen() - device: " + mDevice.getAddress()); if (mService == null || mClientIf == 0) return; BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter.getState() != adapter.STATE_ON) return ; try { mService.clientDisconnect(mClientIf, mDevice.getAddress()); } catch (RemoteException e) { Loading Loading
core/java/android/bluetooth/BluetoothGatt.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.bluetooth; import android.bluetooth.BluetoothAdapter; import android.content.Context; import android.os.ParcelUuid; import android.os.RemoteException; Loading Loading @@ -628,6 +629,8 @@ public final class BluetoothGatt implements BluetoothProfile { public void close() { if (DBG) Log.d(TAG, "close()"); BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter.getState() != adapter.STATE_ON) return ; unregisterApp(); mConnState = CONN_STATE_CLOSED; } Loading Loading @@ -750,6 +753,8 @@ public final class BluetoothGatt implements BluetoothProfile { if (DBG) Log.d(TAG, "cancelOpen() - device: " + mDevice.getAddress()); if (mService == null || mClientIf == 0) return; BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter.getState() != adapter.STATE_ON) return ; try { mService.clientDisconnect(mClientIf, mDevice.getAddress()); } catch (RemoteException e) { Loading