Add permission to modify user preferred display mode.

This permission will be used for testing purposes to modify the user
prefrred mode.

Ignore-AOSP-First: There are merge conflicts in master. So uploading to
master.

Bug: 198452789
Test: m
Change-Id: Id17e20f93ca9db4a24245e8c38f62d95b4f0f4ce
This commit is contained in:
Kriti Dang
2021-09-23 13:34:13 +02:00
parent 27213d9cc8
commit b98d265e86
3 changed files with 10 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ package android {
field public static final String MANAGE_ROLLBACKS = "android.permission.MANAGE_ROLLBACKS";
field public static final String MANAGE_TOAST_RATE_LIMITING = "android.permission.MANAGE_TOAST_RATE_LIMITING";
field public static final String MODIFY_REFRESH_RATE_SWITCHING_TYPE = "android.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE";
field public static final String MODIFY_USER_PREFERRED_DISPLAY_MODE = "android.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE";
field public static final String NETWORK_SETTINGS = "android.permission.NETWORK_SETTINGS";
field public static final String NETWORK_STACK = "android.permission.NETWORK_STACK";
field public static final String OVERRIDE_DISPLAY_MODE_REQUESTS = "android.permission.OVERRIDE_DISPLAY_MODE_REQUESTS";

View File

@@ -4494,6 +4494,12 @@
<permission android:name="android.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE"
android:protectionLevel="signature" />
<!-- Allows an application to modify the user preferred display mode.
@hide
@TestApi -->
<permission android:name="android.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE"
android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to control VPN.
<p>Not for use by third-party applications.</p>
@hide -->

View File

@@ -460,6 +460,9 @@
<!-- Permission needed for CTS test - MatchContentFrameRateTest -->
<uses-permission android:name="android.permission.MODIFY_REFRESH_RATE_SWITCHING_TYPE" />
<!-- Permission needed for CTS test - DefaultDisplayModeTest -->
<uses-permission android:name="android.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE" />
<!-- Permissions needed for CTS test - TimeManagerTest -->
<uses-permission android:name="android.permission.MANAGE_TIME_AND_ZONE_DETECTION" />
<uses-permission android:name="android.permission.SUGGEST_EXTERNAL_TIME" />