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

Commit 1d38c353 authored by Stanley Tng's avatar Stanley Tng
Browse files

Remove whitelisted device when disconnecting Hearing Aids Profile

When the Hearing Aids are in the whitelist and the profile are being
disconnected, then this CL will make sure that it gets removed from
whitelist.

Bug: 129452236
Test: Manual testing with Hearing Aids
Change-Id: I58b21315d90d045f5f332653e295c17d8b23f5ad
(cherry picked from commit 4cc8c8b8feca24712c3ed1a05e4119b356efec6c)
Merged-In: I58b21315d90d045f5f332653e295c17d8b23f5ad
parent 3be2bebf
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -169,7 +169,8 @@ final class HearingAidStateMachine extends StateMachine {
                    }
                    break;
                case DISCONNECT:
                    Log.w(TAG, "Disconnected: DISCONNECT ignored: " + mDevice);
                    Log.d(TAG, "Disconnected: DISCONNECT: call native disconnect for " + mDevice);
                    mNativeInterface.disconnectHearingAid(mDevice);
                    break;
                case STACK_EVENT:
                    HearingAidStackEvent event = (HearingAidStackEvent) message.obj;
@@ -480,7 +481,7 @@ final class HearingAidStateMachine extends StateMachine {
        private void processConnectionEvent(int state) {
            switch (state) {
                case HearingAidStackEvent.CONNECTION_STATE_DISCONNECTED:
                    Log.i(TAG, "Disconnected from " + mDevice);
                    Log.i(TAG, "Disconnected from " + mDevice + " but still in Whitelist");
                    transitionTo(mDisconnected);
                    break;
                case HearingAidStackEvent.CONNECTION_STATE_DISCONNECTING: