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

Commit fe19c7f2 authored by Matthew Xie's avatar Matthew Xie Committed by The Android Automerger
Browse files

When local device originated connection to hid device, move out of quiet mode

bug 17480992

Change-Id: Ia3f5ef4886dfde370abe5b35a80ab80a4f030f37
parent c8d240d1
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -185,13 +185,13 @@ public class HidService extends ProfileService {
                    } else {
                    } else {
                        broadcastConnectionState(device, convertHalState(halState));
                        broadcastConnectionState(device, convertHalState(halState));
                    }
                    }
                    if (halState != CONN_STATE_CONNECTING) {
                    if (halState == CONN_STATE_CONNECTED &&
                        (mTargetDevice != null && mTargetDevice.equals(device))) {
                        mTargetDevice = null;
                        mTargetDevice = null;
                    }
                        // local device originated connection to hid device, move out
                    else {
                        // of quiet mode
                        // CONN_STATE_CONNECTING is received only during
                        AdapterService adapterService = AdapterService.getAdapterService();
                        // local initiated connection.
                        adapterService.enable(false);
                        mTargetDevice = device;
                    }
                    }
                }
                }
                    break;
                    break;