| commit | acf40ab85afae89e0e4dcdace7aca5cc7d898a53 | [log] [tgz] |
|---|---|---|
| author | tanaykhemani <tanaykhemani@google.com> | Tue Jun 17 10:06:52 2025 +0000 |
| committer | tanaykhemani <tanaykhemani@google.com> | Tue Jun 17 10:12:37 2025 +0000 |
| tree | 89c4c15e4ff32209724e9254c317a1329397da47 | |
| parent | 26ffa66ac37f0dd0d57c993dd0fb0ebd27f8e835 [diff] |
Add a method to get the device suggestion pill from MediaController Bug: 418227608 Flag: EXEMPT Scenario Test Test: atest android.platform.test.scenario.sysui.media.MediaWithDeviceSuggestionRenderTest (with corresponding changes in MediaWithDeviceSuggestionRenderTest) Change-Id: I3daf7b6291af01b65fbc6eeaa507ee7b51df3fdb
diff --git a/libraries/systemui-helper/src/android/platform/helpers/media/MediaController.java b/libraries/systemui-helper/src/android/platform/helpers/media/MediaController.java index 69a6b1d..212fbab 100644 --- a/libraries/systemui-helper/src/android/platform/helpers/media/MediaController.java +++ b/libraries/systemui-helper/src/android/platform/helpers/media/MediaController.java
@@ -205,6 +205,11 @@ return mDevice.swipe(startX, bound.centerY(), endX, bound.centerY(), 10); } + public UiObject2 deviceSuggestionPill() { + return mUiObject.wait( + Until.findObject(By.res(PKG, "device_suggestion_button")), WAIT_TIME_MILLIS); + } + public Rect getVisibleBound() { return mUiObject.getVisibleBounds(); }