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

Commit f570ee00 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

[Audiosharing] Reset shadows after tests.

Test: atest
Bug: 345686602
Change-Id: I311ba5c8d234240e61dffd17b4357452c12f4fb1
parent 44de7e98
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public class AudioSharingCallAudioPreferenceController extends AudioSharingBaseP
    private static final String PREF_KEY = "calls_and_alarms";

    @VisibleForTesting
    protected enum ChangeCallAudioType {
    enum ChangeCallAudioType {
        UNKNOWN,
        CONNECTED_EARLIER,
        CONNECTED_LATER
@@ -276,7 +276,7 @@ public class AudioSharingCallAudioPreferenceController extends AudioSharingBaseP

    /** Test only: set callback registration status in tests. */
    @VisibleForTesting
    public void setCallbacksRegistered(boolean registered) {
    void setCallbacksRegistered(boolean registered) {
        mCallbacksRegistered.set(registered);
    }

@@ -385,7 +385,7 @@ public class AudioSharingCallAudioPreferenceController extends AudioSharingBaseP
    }

    @VisibleForTesting
    protected void logCallAudioDeviceChange(int currentGroupId, CachedBluetoothDevice target) {
    void logCallAudioDeviceChange(int currentGroupId, CachedBluetoothDevice target) {
        var unused =
                ThreadUtils.postOnBackgroundThread(
                        () -> {
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public class AudioSharingCompatibilityPreferenceController extends TogglePrefere
    private final AtomicBoolean mCallbacksRegistered = new AtomicBoolean(false);

    @VisibleForTesting
    protected final BluetoothLeBroadcast.Callback mBroadcastCallback =
    final BluetoothLeBroadcast.Callback mBroadcastCallback =
            new BluetoothLeBroadcast.Callback() {
                @Override
                public void onBroadcastStarted(int reason, int broadcastId) {
@@ -219,7 +219,7 @@ public class AudioSharingCompatibilityPreferenceController extends TogglePrefere

    /** Test only: set callbacks registration state for test setup. */
    @VisibleForTesting
    public void setCallbacksRegistered(boolean registered) {
    void setCallbacksRegistered(boolean registered) {
        mCallbacksRegistered.set(registered);
    }

+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class AudioSharingDashboardFragment extends DashboardFragment

    /** Test only: set mock controllers for the {@link AudioSharingDashboardFragment} */
    @VisibleForTesting
    protected void setControllers(
    void setControllers(
            AudioSharingDeviceVolumeGroupController volumeGroupController,
            AudioSharingCallAudioPreferenceController callAudioController,
            AudioSharingPlaySoundPreferenceController playSoundController,
+4 −4
Original line number Diff line number Diff line
@@ -323,26 +323,26 @@ public class AudioSharingDeviceVolumeGroupController extends AudioSharingBasePre
    }

    @VisibleForTesting
    public void setDeviceUpdater(@Nullable AudioSharingDeviceVolumeControlUpdater updater) {
    void setDeviceUpdater(@Nullable AudioSharingDeviceVolumeControlUpdater updater) {
        mBluetoothDeviceUpdater = updater;
    }

    /** Test only: set callback registration status in tests. */
    @VisibleForTesting
    public void setCallbacksRegistered(boolean registered) {
    void setCallbacksRegistered(boolean registered) {
        mCallbacksRegistered.set(registered);
    }

    /** Test only: set volume map in tests. */
    @VisibleForTesting
    public void setVolumeMap(@Nullable Map<Integer, Integer> map) {
    void setVolumeMap(@Nullable Map<Integer, Integer> map) {
        mValueMap.clear();
        mValueMap.putAll(map);
    }

    /** Test only: set value for private preferenceGroup in tests. */
    @VisibleForTesting
    public void setPreferenceGroup(@Nullable PreferenceGroup group) {
    void setPreferenceGroup(@Nullable PreferenceGroup group) {
        mPreferenceGroup = group;
        mPreference = group;
    }
+2 −1
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@ public class AudioSharingDialogFragment extends InstrumentedDialogFragment {

    /** Test only: get the event data passed to the dialog. */
    @VisibleForTesting
    protected @NonNull Pair<Integer, Object>[] getEventData() {
    @NonNull
    Pair<Integer, Object>[] getEventData() {
        return sEventData;
    }

Loading