Rename certain tests and modify documentation.
PiperOrigin-RevId: 544664238
This commit is contained in:
parent
2f113c8b82
commit
58180a0f2a
@ -13141,11 +13141,11 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests playback suppression for playback with only unsuitable route (e.g. builtin speaker) on
|
* Tests playback suppression for playback with only unsuitable outputs (e.g. builtin speaker) on
|
||||||
* Wear OS.
|
* the Wear OS.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void play_withNoSuitableMediaRouteOnWear_shouldSuppressPlayback() throws Exception {
|
public void play_withOnlyUnsuitableOutputsOnWear_shouldSuppressPlayback() throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
List<Integer> playbackSuppressionList = new ArrayList<>();
|
List<Integer> playbackSuppressionList = new ArrayList<>();
|
||||||
@ -13175,10 +13175,11 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests playback suppression for playback with suitable route (e.g. BluetoothA2DP) on Wear OS.
|
* Tests no playback suppression for playback with suitable output (e.g. BluetoothA2DP) on the
|
||||||
|
* Wear OS.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void play_withNoSuitableMediaRouteOnWear_shouldNotSuppressPlayback() throws Exception {
|
public void play_withAtleastOneSuitableOutputOnWear_shouldNotSuppressPlayback() throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(
|
setupConnectedAudioOutput(
|
||||||
AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, AudioDeviceInfo.TYPE_BLUETOOTH_A2DP);
|
AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, AudioDeviceInfo.TYPE_BLUETOOTH_A2DP);
|
||||||
@ -13208,12 +13209,12 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests playback suppression for multiple play calls with only unsuitable route (e.g. builtin
|
* Tests same playback suppression reason for multiple play calls with only unsuitable output
|
||||||
* speaker) on Wear OS.
|
* (e.g. builtin speaker) on the Wear OS.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void
|
public void
|
||||||
play_call2TimesWithSubsequentPauseWithNoSuitableRouteOnWear_shouldSuppressionPlayback2Times()
|
play_callMultipleTimesOnUnsuitableOutputFollowedByPause_shouldRetainSameSuppressionReason()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
@ -13249,7 +13250,7 @@ public final class ExoPlayerTest {
|
|||||||
|
|
||||||
/** Tests playback suppression for playback on the built-speaker on non-Wear OS surfaces. */
|
/** Tests playback suppression for playback on the built-speaker on non-Wear OS surfaces. */
|
||||||
@Test
|
@Test
|
||||||
public void play_onBuiltinSpeakerWithoutWearSystemFeature_shouldNotSuppressPlayback()
|
public void play_onBuiltinSpeakerWithoutWearPresentAsSystemFeature_shouldNotSuppressPlayback()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
setupConnectedAudioOutput(
|
setupConnectedAudioOutput(
|
||||||
AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, AudioDeviceInfo.TYPE_BLUETOOTH_A2DP);
|
AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, AudioDeviceInfo.TYPE_BLUETOOTH_A2DP);
|
||||||
@ -13279,13 +13280,13 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests playback suppression for playback with only unsuitable route (e.g. builtin speaker) on
|
* Tests playback suppression for playback with only unsuitable audio outputs (e.g. builtin
|
||||||
* Wear OS but {@link ExoPlayer.Builder#setSuppressPlaybackOnUnsuitableOutput(boolean)} is not
|
* speaker) on Wear OS but {@link
|
||||||
* called with parameter as TRUE.
|
* ExoPlayer.Builder#setSuppressPlaybackOnUnsuitableOutput(boolean)} is not called with true.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void
|
public void
|
||||||
play_withOnlyUnsuitableRoutesWithoutEnablingPlaybackSuppression_shouldNotSuppressPlayback()
|
play_withOnlyUnsuitableOutputsWithoutEnablingPlaybackSuppression_shouldNotSuppressPlayback()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
@ -13315,10 +13316,11 @@ public final class ExoPlayerTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests removal of playback suppression reason as {@link
|
* Tests removal of playback suppression reason as {@link
|
||||||
* Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT} when a suitable device is added.
|
* Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT} when a suitable audio output is
|
||||||
|
* added.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void addSuitableDevicesWhenPlaybackSuppressed_shouldRemovePlaybackSuppression()
|
public void addSuitableOutputWhenPlaybackSuppressed_shouldRemovePlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
@ -13352,11 +13354,11 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests no change in the playback suppression reason when an unsuitable device is connected while
|
* Tests no change in the playback suppression reason when an unsuitable audio output is connected
|
||||||
* playback was suppressed earlier.
|
* while playback was suppressed earlier.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void addUnsuitableDevicesWithPlaybackSuppressed_shouldNotRemovePlaybackSuppression()
|
public void addUnsuitableOutputWhenPlaybackIsSuppressed_shouldNotRemovePlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
@ -13386,11 +13388,11 @@ public final class ExoPlayerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests no change in the playback suppression reason when a suitable device is added but playback
|
* Tests no change in the playback suppression reason when a suitable audio output is added but
|
||||||
* was not suppressed earlier.
|
* playback was not suppressed earlier.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void addSuitableDevicesWhenPlaybackNotSuppressed_shouldNotRemovePlaybackSuppression()
|
public void addSuitableOutputWhenPlaybackNotSuppressed_shouldNotRemovePlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
setupConnectedAudioOutput(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||||
@ -13424,7 +13426,7 @@ public final class ExoPlayerTest {
|
|||||||
* have been removed during an ongoing playback.
|
* have been removed during an ongoing playback.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void removeAllSuitableDevicesWhenPlaybackOngoing_shouldSetPlaybackSuppression()
|
public void removeAllSuitableOutputsWhenPlaybackOngoing_shouldSetPlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(
|
setupConnectedAudioOutput(
|
||||||
@ -13456,10 +13458,10 @@ public final class ExoPlayerTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests no change in the playback suppression reason when any unsuitable audio outputs has been
|
* Tests no change in the playback suppression reason when any unsuitable audio outputs has been
|
||||||
* removed during an ongoing playback.
|
* removed during an ongoing playback but some suitable audio outputs are still available.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void removeAnyUnsuitableDevicesWhenPlaybackOngoing_shouldNotSetPlaybackSuppression()
|
public void removeAnyUnsuitableOutputWhenPlaybackOngoing_shouldNotSetPlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(
|
setupConnectedAudioOutput(
|
||||||
@ -13494,12 +13496,12 @@ public final class ExoPlayerTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests no change in the playback suppression reason when any suitable audio outputs has been
|
* Tests no change in the playback suppression reason when any suitable audio outputs has been
|
||||||
* removed during an ongoing playback but at least one suitable audio output is still connected to
|
* removed during an ongoing playback but at least one another suitable audio output is still
|
||||||
* the device.
|
* connected to the device.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void
|
public void
|
||||||
removeAnySuitableDeviceButOneSuitableDeviceStillConnected_shouldNotSetPlaybackSuppression()
|
removeAnySuitableOutputButOneSuitableDeviceStillConnected_shouldNotSetPlaybackSuppression()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addWatchAsSystemFeature();
|
addWatchAsSystemFeature();
|
||||||
setupConnectedAudioOutput(
|
setupConnectedAudioOutput(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user