diff options
author | Jaesung Chung <jaesung@google.com> | 2017-10-20 04:36:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-10-20 04:36:04 +0000 |
commit | 4ca76617fa9fecad82ed2d3912c063bef46a2308 (patch) | |
tree | a7f8e9e786489553a61cb65437c40c769c345203 | |
parent | f4fe25db575cb5c5c749cc03d534f690d5273a8b (diff) | |
parent | b6da8aa85fce4da5d01151a72397bc4c4216eee3 (diff) | |
download | cts-4ca76617fa9fecad82ed2d3912c063bef46a2308.tar.gz |
Merge "DO NOT MERGE CtsServicesHostTestCases: skip tests when the required feature is not enabled" into oc-mr1-dev
2 files changed, 15 insertions, 0 deletions
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java index 9e5f4b88ee7..71bbcc9bbf5 100644 --- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java +++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java @@ -437,6 +437,11 @@ public class ActivityManagerAppConfigurationTests extends ActivityManagerTestBas */ private void requestOrientationInSplitScreen(int orientation, String activity) throws Exception { + if (!supportsSplitScreenMultiWindow()) { + CLog.logAndDisplay(LogLevel.INFO, "Skipping test: no multi-window support"); + return; + } + // Set initial orientation. setDeviceRotation(orientation); diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java index 932f8c465ff..bb54b06ed0b 100644 --- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java +++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java @@ -1650,6 +1650,8 @@ public class ActivityManagerDisplayTests extends ActivityManagerDisplayTestBase * on an external secondary display. */ public void testExternalDisplayActivityTurnPrimaryOff() throws Exception { + if (!supportsMultiDisplay()) { return; } + // Launch something on the primary display so we know there is a resumed activity there launchActivity(RESIZEABLE_ACTIVITY_NAME); waitAndAssertActivityResumed(RESIZEABLE_ACTIVITY_NAME, DEFAULT_DISPLAY_ID, @@ -1681,6 +1683,8 @@ public class ActivityManagerDisplayTests extends ActivityManagerDisplayTestBase * display is off. */ public void testLaunchExternalDisplayActivityWhilePrimaryOff() throws Exception { + if (!supportsMultiDisplay()) { return; } + // Launch something on the primary display so we know there is a resumed activity there launchActivity(RESIZEABLE_ACTIVITY_NAME); waitAndAssertActivityResumed(RESIZEABLE_ACTIVITY_NAME, DEFAULT_DISPLAY_ID, @@ -1708,6 +1712,8 @@ public class ActivityManagerDisplayTests extends ActivityManagerDisplayTestBase * Tests that turning the secondary display off stops activities running on that display. */ public void testExternalDisplayToggleState() throws Exception { + if (!supportsMultiDisplay()) { return; } + final DisplayState newDisplay = createExternalVirtualDisplay( false /* showContentWhenLocked */); @@ -1735,6 +1741,8 @@ public class ActivityManagerDisplayTests extends ActivityManagerDisplayTestBase * activity on the primary display. */ public void testStackFocusSwitchOnTouchEventAfterKeyguard() throws Exception { + if (!supportsMultiDisplay()) { return; } + // Launch something on the primary display so we know there is a resumed activity there launchActivity(RESIZEABLE_ACTIVITY_NAME); waitAndAssertActivityResumed(RESIZEABLE_ACTIVITY_NAME, DEFAULT_DISPLAY_ID, @@ -1818,6 +1826,8 @@ public class ActivityManagerDisplayTests extends ActivityManagerDisplayTestBase * Tests that showWhenLocked works on a secondary display. */ public void testSecondaryDisplayShowWhenLocked() throws Exception { + if (!supportsMultiDisplay()) { return; } + try { setLockCredential(); |