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

Commit b82016f3 authored by jasonwshsu's avatar jasonwshsu Committed by Jason Hsu
Browse files

Remove bugfix flag hearing_input_change_when_comm_device

Bug: 394070235
Test: atest HearingDevicePhoneCallNotificationControllerTest
Flag: EXEMPT remove flag
Change-Id: I7988ce38802ba90c5a0abec36f363bc56dd1f384
parent 0a3b5451
Loading
Loading
Loading
Loading
+9 −17
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@ public class HearingDevicePhoneCallNotificationController {
                mHearingDevice = null;
            }
            if (state == TelephonyManager.CALL_STATE_OFFHOOK) {
                if (com.android.server.accessibility.Flags.hearingInputChangeWhenCommDevice()) {
                AudioDeviceInfo commDevice = mAudioManager.getCommunicationDevice();
                if (commDevice == null) {
                    return;
@@ -172,13 +171,6 @@ public class HearingDevicePhoneCallNotificationController {
                    addOnCommunicationDeviceChangedListenerIfNeeded(mCommDeviceChangedExecutor,
                            mCommDeviceChangedListener);
                }
                } else {
                    mHearingDevice = getSupportedInputHearingDeviceInfo(
                            mAudioManager.getAvailableCommunicationDevices());
                    if (mHearingDevice != null) {
                        showNotificationIfNeeded();
                    }
                }
            }
        }

+0 −4
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.content.Context;
import android.media.AudioDeviceInfo;
import android.media.AudioDevicePort;
import android.media.AudioManager;
import android.platform.test.annotations.EnableFlags;
import android.platform.test.flag.junit.SetFlagsRule;
import android.telephony.TelephonyCallback;
import android.telephony.TelephonyManager;
@@ -164,7 +163,6 @@ public class HearingDevicePhoneCallNotificationControllerTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_HEARING_INPUT_CHANGE_WHEN_COMM_DEVICE)
    public void onCallStateChanged_nonHearingDevice_offHookThenIdle_callAddAndRemoveListener() {
        final ArgumentCaptor<AudioManager.OnCommunicationDeviceChangedListener> listenerCaptor =
                ArgumentCaptor.forClass(AudioManager.OnCommunicationDeviceChangedListener.class);
@@ -185,7 +183,6 @@ public class HearingDevicePhoneCallNotificationControllerTest {


    @Test
    @EnableFlags(Flags.FLAG_HEARING_INPUT_CHANGE_WHEN_COMM_DEVICE)
    public void onCallStateChanged_hearingDeviceFromCommunicationDeviceChanged_showNotification() {
        final ArgumentCaptor<AudioManager.OnCommunicationDeviceChangedListener> listenerCaptor =
                ArgumentCaptor.forClass(AudioManager.OnCommunicationDeviceChangedListener.class);
@@ -209,7 +206,6 @@ public class HearingDevicePhoneCallNotificationControllerTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_HEARING_INPUT_CHANGE_WHEN_COMM_DEVICE)
    public void onCallStateChanged_offHookMultiple_addListenerOnlyOneTime() {
        AudioDeviceInfo a2dpDeviceInfo = createAudioDeviceInfo(TEST_ADDRESS,
                AudioManager.DEVICE_OUT_BLUETOOTH_A2DP);