diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2023-02-14 04:02:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-02-14 04:02:16 +0000 |
commit | c94df7f312da9aff97b99bf6c5c91ddaa41a6efc (patch) | |
tree | f48e2afb08b1050c620cc48c8d0214c563220076 | |
parent | 9fd490fa0cf716dfa9c85f1369e06c06c7b6db34 (diff) | |
parent | 5967baf345e7852348971f15f62f6ec6997e81ca (diff) | |
download | platform_testing-c94df7f312da9aff97b99bf6c5c91ddaa41a6efc.tar.gz |
Merge "Test retain media session" into tm-qpr-dev
-rw-r--r-- | libraries/systemui-helper/src/android/platform/helpers/media/MediaInstrumentation.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libraries/systemui-helper/src/android/platform/helpers/media/MediaInstrumentation.java b/libraries/systemui-helper/src/android/platform/helpers/media/MediaInstrumentation.java index 8c4c46a50..f43439ebe 100644 --- a/libraries/systemui-helper/src/android/platform/helpers/media/MediaInstrumentation.java +++ b/libraries/systemui-helper/src/android/platform/helpers/media/MediaInstrumentation.java @@ -42,6 +42,7 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; +/** Media instrumentation for testing. */ public final class MediaInstrumentation { private static final int WAIT_TIME_MILLIS = 5000; @@ -116,6 +117,11 @@ public final class MediaInstrumentation { mManager.notify(mNotificationId, buildNotification().build()); } + /** Cancel the Media notification */ + public void cancelNotification() { + mManager.cancel(mNotificationId); + } + UiObject2 scrollToMediaNotification(MediaMetadata meta) { final BySelector qsScrollViewSelector = By.res(PKG, "expanded_qs_scroll_view"); final BySelector mediaTitleSelector = By.res(PKG, "header_title") |