Fix testMultiSelect_previewVideoMuteButtonOnSwipe on low end TV devices.

On low end device, buttons take a while to be visible.

Fix: 233177863
Test: atest testMultiSelect_previewVideoMuteButtonOnSwipe --iterations 20
Change-Id: Ife098a252a31347cd72c0d362c997df190a2f5fa
Merged-In: Ife098a252a31347cd72c0d362c997df190a2f5fa
diff --git a/tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerTest.java b/tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerTest.java
index 57d60f2..cc8022d3 100644
--- a/tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerTest.java
+++ b/tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerTest.java
@@ -431,6 +431,8 @@
         assertMuteButtonState(muteButton, /* isMuted */ false);
         // check that next video resumed previous video's mute state
         swipeLeftAndWait();
+        // Wait for 1s before checking Play/Pause button's visibility
+        playPauseButton.waitForExists(1000);
         // check that player controls are visible
         assertPlayerControlsVisible(playPauseButton, muteButton);
         assertMuteButtonState(muteButton, /* isMuted */ false);
@@ -581,6 +583,8 @@
 
     private void setUpAndAssertStickyPlayerControls(UiObject playerView, UiObject playPauseButton,
             UiObject muteButton) throws Exception {
+        // Wait for 1s for player view to exist
+        playerView.waitForExists(1000);
         // Wait for 1s or Play/Pause button to hide
         playPauseButton.waitUntilGone(1000);
         // Click on StyledPlayerView to make the video controls visible