From 5e7b12144433a0db18cfb6418032a46c3b2edfa6 Mon Sep 17 00:00:00 2001 From: kholoud mohamed Date: Wed, 17 Feb 2021 16:44:55 +0000 Subject: [PATCH] created FORCE_DEVICE_POLICY_MANAGER_LOG and CLEAR_FREEZE_PERIOD Created the following new permissions and granted it to shell: * FORCE_DEVICE_POLICY_MANAGER_LOG: will be used to expose DPM#forceNetworkLogs and DPM#forceSecurityLogs as TestAPIs. * CLEAR_FREEZE_PERIOD: will be used to expose DPM#clearSystemUpdatePolicyFreezePeriodRecord as a TestAPI. Bug: 180500227 Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered Change-Id: I8a2a49aa45704d8991e9cf3689b5259442fb1db3 --- core/api/test-current.txt | 2 ++ core/res/AndroidManifest.xml | 10 ++++++++++ packages/Shell/AndroidManifest.xml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index e0e84537368f0..7523cf52a7275 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -10,9 +10,11 @@ package android { field public static final String BROADCAST_CLOSE_SYSTEM_DIALOGS = "android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"; field public static final String CHANGE_APP_IDLE_STATE = "android.permission.CHANGE_APP_IDLE_STATE"; field public static final String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA"; + field public static final String CLEAR_FREEZE_PERIOD = "android.permission.CLEAR_FREEZE_PERIOD"; field public static final String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; field public static final String CONTROL_DEVICE_LIGHTS = "android.permission.CONTROL_DEVICE_LIGHTS"; field public static final String CONTROL_DEVICE_STATE = "android.permission.CONTROL_DEVICE_STATE"; + field public static final String FORCE_DEVICE_POLICY_MANAGER_LOGS = "android.permission.FORCE_DEVICE_POLICY_MANAGER_LOGS"; field public static final String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES"; field public static final String KEEP_UNINSTALLED_PACKAGES = "android.permission.KEEP_UNINSTALLED_PACKAGES"; field @Deprecated public static final String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index a85996afa900e..48b4018b96771 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2641,6 +2641,16 @@ android:label="@string/permlab_manageProfileAndDeviceOwners" android:description="@string/permdesc_manageProfileAndDeviceOwners" /> + + + + + + diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index a15ceb6d8811e..b3b82800c0de6 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -124,6 +124,8 @@ + +