diff options
| author | 2019-12-06 17:02:38 -0800 | |
|---|---|---|
| committer | 2019-12-09 13:33:15 -0800 | |
| commit | 5423cf08ccaf0516010f7897f91ce0c568e2868c (patch) | |
| tree | 0b9cd0f9b1336c9eae4c0bbc677821af429ab760 | |
| parent | 654af7615bc0ab6941e28131efccf8d23840c253 (diff) | |
Use a display ID that's really invalid.
When WMS for WmTests is set up, it gets the display info from real
DisplayManagerService, which may not only have 1 display when the test
is run. Therefore use Integer#MAX_VALUE to be safe.
Bug: 145836235
Test: atest ActivityRecordTests#testCanBeLaunchedOnDisplay
Change-Id: Ib809f895a86eafe1c1f5bbc511b1d4f0dec31d82
| -rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index 7166829e01da..dbcfa94c69bf 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -203,7 +203,7 @@ public class ActivityRecordTests extends ActivityTestsBase { // An activity can be launched on default display. assertTrue(activity.canBeLaunchedOnDisplay(DEFAULT_DISPLAY)); // An activity cannot be launched on a non-existent display. - assertFalse(activity.canBeLaunchedOnDisplay(DEFAULT_DISPLAY + 1)); + assertFalse(activity.canBeLaunchedOnDisplay(Integer.MAX_VALUE)); } @Test |