Modify non fullscreen orientation tests to permit under SDK 26.

Change-Id: Icad31bc0f0c3ba905c0e5c83f01ca064ee4d54e9
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/AndroidTest.xml b/hostsidetests/services/activityandwindowmanager/activitymanager/AndroidTest.xml
index ad20dd0..6b2a9c2 100644
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/AndroidTest.xml
+++ b/hostsidetests/services/activityandwindowmanager/activitymanager/AndroidTest.xml
@@ -21,7 +21,6 @@
         <option name="test-file-name" value="CtsDeviceServicesTestThirdApp.apk" />
         <option name="test-file-name" value="CtsDeviceDisplaySizeApp.apk" />
         <option name="test-file-name" value="CtsDeviceTranslucentTestApp.apk" />
-        <option name="test-file-name" value="CtsDeviceTranslucentTestApp25.apk" />
     </target_preparer>
     <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
         <option name="jar" value="CtsServicesHostTestCases.jar" />
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 ed20363..072d0ee 100644
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java
+++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerAppConfigurationTests.java
@@ -42,7 +42,6 @@
 
     private static final String TRANSLUCENT_ACTIVITY =
             "android.server.translucentapp.TranslucentLandscapeActivity";
-    private static final String TRANSLUCENT_SDK_25_PACKAGE = "android.server.translucentapp25";
     private static final String TRANSLUCENT_CURRENT_PACKAGE = "android.server.translucentapp";
 
     private static final String EXTRA_LAUNCH_NEW_TASK = "launch_new_task";
@@ -312,7 +311,9 @@
         assertEquals("portrait activity should be in portrait",
                 1 /* portrait */, initialReportedSizes.orientation);
         logSeparator = clearLogcat();
-        launchActivityInComponent(TRANSLUCENT_SDK_25_PACKAGE, TRANSLUCENT_ACTIVITY);
+
+        // TODO(b/38225467): Target SDK 26 specific package when SDK 27 released.
+        launchActivityInComponent(TRANSLUCENT_CURRENT_PACKAGE, TRANSLUCENT_ACTIVITY);
         assertEquals("Legacy non-fullscreen activity requested landscape orientation",
                 0 /* landscape */, mAmWmState.getWmState().getLastOrientation());
 
@@ -323,20 +324,22 @@
         //         1 /* portrait */, updatedReportedSizes.orientation);
     }
 
-    public void testNonFullscreenActivityProhibited() throws Exception {
-        setComponentName(TRANSLUCENT_CURRENT_PACKAGE);
-        launchActivity(TRANSLUCENT_ACTIVITY);
-        mAmWmState.assertNotResumedActivity(
-                "target SDK > 25 non-fullscreen activity should not reach onResume",
-                TRANSLUCENT_ACTIVITY);
-    }
+// TODO(b/38225467): Uncomment when SDK 27 is released.
+//    public void testNonFullscreenActivityProhibited() throws Exception {
+//        setComponentName(TRANSLUCENT_CURRENT_PACKAGE);
+//        launchActivity(TRANSLUCENT_ACTIVITY);
+//        mAmWmState.assertNotResumedActivity(
+//                "target SDK > 25 non-fullscreen activity should not reach onResume",
+//                TRANSLUCENT_ACTIVITY);
+//    }
 
     public void testLegacyNonFullscreenActivityPermitted() throws Exception {
-        setComponentName(TRANSLUCENT_SDK_25_PACKAGE);
+        // TODO(b/38225467): Target SDK 26 specific package when SDK 27 released.
+        setComponentName(TRANSLUCENT_CURRENT_PACKAGE);
         setDeviceRotation(0);
         launchActivity(TRANSLUCENT_ACTIVITY);
         mAmWmState.assertResumedActivity(
-                "target SDK <= 25 non-fullscreen activitiy should be allowed to launch",
+                "target SDK <= 26 non-fullscreen activitiy should be allowed to launch",
                 TRANSLUCENT_ACTIVITY);
         assertEquals("non-fullscreen activitiy requested landscape orientation",
                 0 /* landscape */, mAmWmState.getWmState().getLastOrientation());
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/Android.mk b/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/Android.mk
deleted file mode 100644
index 41a6314..0000000
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Don't include this package in any target.
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
-    $(call all-java-files-under, ../translucentapp/src) \
-
-LOCAL_SDK_VERSION := 25
-
-# Tag this module as a cts test artifact
-LOCAL_COMPATIBILITY_SUITE := cts
-
-LOCAL_PACKAGE_NAME := CtsDeviceTranslucentTestApp25
-
-include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/AndroidManifest.xml b/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/AndroidManifest.xml
deleted file mode 100755
index c6a4c05..0000000
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/translucentappsdk25/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2017 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
-          package="android.server.translucentapp25">
-    <application android:label="CtsTranslucentApp25">
-        <activity android:name="android.server.translucentapp.TranslucentLandscapeActivity"
-                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
-                android:exported="true"
-                android:screenOrientation="landscape">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
-