summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 01:08:41 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 01:08:41 +0000
commitb2c2c4abb4bba0eb548980c2db5b14b1de7717fd (patch)
treee2b98117dd649544864bc670b69c241d442aa92e
parent1222329696d6ca91e371dd92cac1463958943baf (diff)
parenta42f0b0f0ccd4cae64409eaf3ec63d65062d9ade (diff)
downloadplatform_testing-b2c2c4abb4bba0eb548980c2db5b14b1de7717fd.tar.gz
Snap for 7550575 from a42f0b0f0ccd4cae64409eaf3ec63d65062d9ade to sc-d1-release
Change-Id: Ia199323be949e2ee624795fea08c6c46df468468
-rw-r--r--libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/INotificationHelper.java9
-rw-r--r--libraries/collectors-helper/statsd/test/src/com/android/helpers/UiInteractionFrameInfoHelperTest.java6
2 files changed, 13 insertions, 2 deletions
diff --git a/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/INotificationHelper.java b/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/INotificationHelper.java
index b1d4e4998..53cf672a5 100644
--- a/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/INotificationHelper.java
+++ b/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/INotificationHelper.java
@@ -209,6 +209,15 @@ public interface INotificationHelper extends IAppHelper {
}
/**
+ * Sets expected app name for notifications.
+ *
+ * @param appName Package name.
+ */
+ default void setAppName(String appName) {
+ throw new UnsupportedOperationException("Not yet implemented.");
+ }
+
+ /**
* Long press on notification to show its hidden menu (a.k.a. guts)
*
* @param notification Notification.
diff --git a/libraries/collectors-helper/statsd/test/src/com/android/helpers/UiInteractionFrameInfoHelperTest.java b/libraries/collectors-helper/statsd/test/src/com/android/helpers/UiInteractionFrameInfoHelperTest.java
index f9dcfc1c5..e6b0f6453 100644
--- a/libraries/collectors-helper/statsd/test/src/com/android/helpers/UiInteractionFrameInfoHelperTest.java
+++ b/libraries/collectors-helper/statsd/test/src/com/android/helpers/UiInteractionFrameInfoHelperTest.java
@@ -17,6 +17,7 @@ package com.android.helpers;
import static org.junit.Assert.assertTrue;
+import android.app.Application;
import android.os.SystemClock;
import android.platform.helpers.HelperAccessor;
import android.platform.helpers.INotificationHelper;
@@ -73,11 +74,12 @@ public class UiInteractionFrameInfoHelperTest {
assertTrue(mInteractionFrameHelper.startCollecting());
final HelperAccessor<INotificationHelper> notificationHelper =
new HelperAccessor<>(INotificationHelper.class);
+ notificationHelper.get().setAppName(Application.getProcessName());
// The CUJ
- UiObject2 notification = notificationHelper.get().postBigTextNotification(null /* pkg */);
notificationHelper.get().open();
- notification.click(3000);
+ UiObject2 notification = notificationHelper.get().postBigTextNotification(null /* pkg */);
+ notificationHelper.get().showGuts(notification);
notificationHelper.get().hideGuts(notification);
notificationHelper.get().cancelNotifications();
notificationHelper.get().exit();