Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b7400c3 authored by Deqiang Chen's avatar Deqiang Chen Committed by Gerrit Code Review
Browse files

Merge "Avoid IllegalArgumentException when bluetooth is disabled"

parents 41069325 16441d05
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -224,8 +224,10 @@ public final class BluetoothA2dp implements BluetoothProfile {
                        if (VDBG) Log.d(TAG, "Unbinding service...");
                        try {
                            mServiceLock.writeLock().lock();
                            if (mService != null) {
                                mService = null;
                                mContext.unbindService(mConnection);
                            }
                        } catch (Exception re) {
                            Log.e(TAG, "", re);
                        } finally {
+4 −2
Original line number Diff line number Diff line
@@ -232,8 +232,10 @@ public final class BluetoothHidHost implements BluetoothProfile {
                        if (VDBG) Log.d(TAG, "Unbinding service...");
                        synchronized (mConnection) {
                            try {
                                if (mService != null) {
                                    mService = null;
                                    mContext.unbindService(mConnection);
                                }
                            } catch (Exception re) {
                                Log.e(TAG, "", re);
                            }
+4 −2
Original line number Diff line number Diff line
@@ -120,8 +120,10 @@ public class BluetoothPbap implements BluetoothProfile {
                        log("Unbinding service...");
                        synchronized (mConnection) {
                            try {
                                if (mService != null) {
                                    mService = null;
                                    mContext.unbindService(mConnection);
                                }
                            } catch (Exception re) {
                                Log.e(TAG, "", re);
                            }