Merge "Re-enable tests for secondary user cases." into sc-v2-dev
diff --git a/tests/app/src/android/app/cts/UiModeManagerTest.java b/tests/app/src/android/app/cts/UiModeManagerTest.java
index 6dd4063..bf53bd9 100644
--- a/tests/app/src/android/app/cts/UiModeManagerTest.java
+++ b/tests/app/src/android/app/cts/UiModeManagerTest.java
@@ -28,7 +28,6 @@
import android.content.res.Configuration;
import android.os.ParcelFileDescriptor;
import android.os.UserHandle;
-import android.platform.test.annotations.SystemUserOnly;
import android.test.AndroidTestCase;
import android.util.ArraySet;
import android.util.Log;
@@ -50,8 +49,6 @@
import java.util.concurrent.atomic.AtomicInteger;
-@SystemUserOnly(reason = "UiAutomation doesn't support untrusted UID's. "
- + "see UiAutomationConnection#throwIfCalledByNotTrustedUidLocked")
public class UiModeManagerTest extends AndroidTestCase {
private static final String TAG = "UiModeManagerTest";
private static final long MAX_WAIT_TIME_SECS = 2;
@@ -388,13 +385,15 @@
private boolean requestAutomotiveProjection() throws Exception {
return callWithShellPermissionIdentity(
() -> mUiModeManager.requestProjection(UiModeManager.PROJECTION_TYPE_AUTOMOTIVE),
- Manifest.permission.TOGGLE_AUTOMOTIVE_PROJECTION);
+ Manifest.permission.TOGGLE_AUTOMOTIVE_PROJECTION,
+ Manifest.permission.INTERACT_ACROSS_USERS);
}
private boolean releaseAutomotiveProjection() throws Exception {
return callWithShellPermissionIdentity(
() -> mUiModeManager.releaseProjection(UiModeManager.PROJECTION_TYPE_AUTOMOTIVE),
- Manifest.permission.TOGGLE_AUTOMOTIVE_PROJECTION);
+ Manifest.permission.TOGGLE_AUTOMOTIVE_PROJECTION,
+ Manifest.permission.INTERACT_ACROSS_USERS);
}
private int getActiveProjectionTypes() throws Exception {