Skip testNonFullscreenActivityPermitted test case on automotive device which doesn't allow rotate.

In a car, you cannot physically rotate the screen, so it doesn't make sense
to allow anything but the default orientation. Skip testNonFullscreenActivityPermitted
test case for automotive device.

Bug: 117632918
Test: run cts -m CtsActivityManagerDeviceTestCases -t android.server.am.ActivityManagerAppConfigurationTests#testNonFullscreenActivityPermitted

Change-Id: I45f3a303764700dbbd38b461e625617710066fc7
Signed-off-by: Bing Deng<bing.deng@intel.com>
diff --git a/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerAppConfigurationTests.java b/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerAppConfigurationTests.java
index 41f4006..4f3cdff 100644
--- a/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerAppConfigurationTests.java
+++ b/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerAppConfigurationTests.java
@@ -55,6 +55,7 @@
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
+import static com.android.compatibility.common.util.PackageUtil.supportsRotation;
 
 import android.content.ComponentName;
 import android.graphics.Rect;
@@ -495,6 +496,10 @@
 
     @Test
     public void testNonFullscreenActivityPermitted() throws Exception {
+        if(!supportsRotation()) {
+            //cannot physically rotate the screen on automotive device, skip
+            return;
+        }
         try (final RotationSession rotationSession = new RotationSession()) {
             rotationSession.set(ROTATION_0);