[Audiosharing] Reset shadows after tests.
Test: atest Bug: 345686602 Change-Id: I311ba5c8d234240e61dffd17b4357452c12f4fb1
This commit is contained in:
@@ -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(
|
||||
() -> {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,8 @@ public class AudioSharingDisconnectDialogFragment extends InstrumentedDialogFrag
|
||||
|
||||
/** Test only: get the event data passed to the dialog. */
|
||||
@VisibleForTesting
|
||||
protected @NonNull Pair<Integer, Object>[] getEventData() {
|
||||
@NonNull
|
||||
Pair<Integer, Object>[] getEventData() {
|
||||
return sEventData;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ public class AudioSharingJoinDialogFragment 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ public class AudioSharingPlaySoundPreferenceController
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
protected void setRingtone(Ringtone ringtone) {
|
||||
void setRingtone(Ringtone ringtone) {
|
||||
mRingtone = ringtone;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class AudioSharingPreferenceController extends BasePreferenceController
|
||||
private final Executor mExecutor;
|
||||
|
||||
@VisibleForTesting
|
||||
protected final BluetoothLeBroadcast.Callback mBroadcastCallback =
|
||||
final BluetoothLeBroadcast.Callback mBroadcastCallback =
|
||||
new BluetoothLeBroadcast.Callback() {
|
||||
@Override
|
||||
public void onBroadcastStarted(int reason, int broadcastId) {
|
||||
|
||||
@@ -142,7 +142,8 @@ public class AudioSharingStopDialogFragment 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user