commit | 0eb2c7998281ec24bb803e488dc4e1278a316e50 | [log] [tgz] |
---|---|---|
author | Aaron Huang <huangaaron@google.com> | Wed Aug 03 02:41:35 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Aug 03 02:41:35 2022 +0000 |
tree | de144f5802740da3a9c0e9e1403c1a4be371d118 | |
parent | 99aaa9a6e076040790d3e2bde4c642bce1825936 [diff] | |
parent | 28a690dc79c2f9e954b05c25739699cabbbe9623 [diff] |
Merge "Fix flaky testNotifyNoInternetAsDialogWhenHighPriority" am: 28a690dc79 Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2171112 Change-Id: I93fbe8b0d78af9bc95650ff83f42a0fe8dc229fc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tests/unit/java/com/android/server/connectivity/NetworkNotificationManagerTest.java b/tests/unit/java/com/android/server/connectivity/NetworkNotificationManagerTest.java index 2cf5d8e..53097b6 100644 --- a/tests/unit/java/com/android/server/connectivity/NetworkNotificationManagerTest.java +++ b/tests/unit/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
@@ -385,11 +385,13 @@ doReturn(true).when(mResources).getBoolean( R.bool.config_notifyNoInternetAsDialogWhenHighPriority); + final Instrumentation instr = InstrumentationRegistry.getInstrumentation(); + UiDevice.getInstance(instr).pressHome(); + mManager.showNotification(TEST_NOTIF_ID, NETWORK_SWITCH, mWifiNai, mCellNai, null, false); // Non-"no internet" notifications are not affected verify(mNotificationManager).notify(eq(TEST_NOTIF_TAG), eq(NETWORK_SWITCH.eventId), any()); - final Instrumentation instr = InstrumentationRegistry.getInstrumentation(); final Context ctx = instr.getContext(); final String testAction = "com.android.connectivity.coverage.TEST_DIALOG"; final Intent intent = new Intent(testAction)