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

Commit 570577d4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Fix to avoid framework reboot during monkey."

parents b31db0aa 0743a84e
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -151,8 +151,14 @@ public final class BluetoothHidDevice implements BluetoothProfile {
            synchronized (mConnection) {
                if (!up) {
                    Log.d(TAG,"Unbinding service...");
                    if (mService != null) {
                        mService = null;
                        try {
                            mContext.unbindService(mConnection);
                        } catch (IllegalArgumentException e) {
                            Log.e(TAG,"onBluetoothStateChange: could not unbind service:", e);
                        }
                    }
                } else {
                    try {
                        if (mService == null) {
@@ -239,7 +245,11 @@ public final class BluetoothHidDevice implements BluetoothProfile {
        synchronized (mConnection) {
            if (mService != null) {
                mService = null;
                try {
                    mContext.unbindService(mConnection);
                } catch (IllegalArgumentException e) {
                    Log.e(TAG,"close: could not unbind HID Dev service: ", e);
                }
           }
        }