From 68df8ccb5b7eb7f633834ee76522e5d8030416b1 Mon Sep 17 00:00:00 2001 From: Chad Brubaker Date: Fri, 30 Nov 2018 13:45:06 -0800 Subject: [PATCH] Require usage information for runtime permissions All dangerous permissions that involve reading data in Q will require the application to specify usage information. This is currently a warning only but will be made install blocking later in Q. Bug: 111207567 Test: atest PermissionUsageTest generates warnings Change-Id: I8a68602e008256e1d42f6303a4284a659576a302 --- core/res/AndroidManifest.xml | 69 ++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 8b66be310abc8..7ca8f24bc8c7a 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -647,7 +647,8 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> @@ -833,7 +840,8 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> @@ -848,20 +856,23 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> @@ -892,7 +903,8 @@ android:label="@string/permlab_accessFineLocation" android:description="@string/permdesc_accessFineLocation" android:backgroundPermission="android.permission.ACCESS_BACKGROUND_LOCATION" - android:protectionLevel="dangerous|instant" /> + android:protectionLevel="dangerous|instant" + android:usageInfoRequired="true" /> @@ -953,7 +967,8 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> @@ -1012,7 +1028,8 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" /> @@ -1125,7 +1144,8 @@ + android:protectionLevel="dangerous|instant" + android:usageInfoRequired="true" /> @@ -1173,7 +1193,8 @@ + android:protectionLevel="dangerous|instant" + android:usageInfoRequired="true" /> @@ -1196,7 +1217,8 @@ + android:protectionLevel="dangerous" + android:usageInfoRequired="true" />