diff options
| author | 2018-04-27 16:56:35 -0700 | |
|---|---|---|
| committer | 2018-05-01 14:00:34 -0700 | |
| commit | ed23b9b12cebfc700a3fd0f61a81e95152ce66bd (patch) | |
| tree | f30dc7742613fbdcc9014639a453ff08fcc41a42 | |
| parent | 7f556daa41b727bef3da1e8bad02a89ed904f32b (diff) | |
Fix issue #78230210: Strobe: Need separate runtime permission group for READ_CALL_LOG and WRITE_CALL_LOG
Bug: 78230210
Test: manual
Change-Id: Ie5a0ab3dffd40dc44f7aa5deb81b42fbc2dbd406
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 131 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 8 |
3 files changed, 80 insertions, 60 deletions
diff --git a/api/current.txt b/api/current.txt index 26e42982de91..8703bf41438b 100644 --- a/api/current.txt +++ b/api/current.txt @@ -162,6 +162,7 @@ package android { public static final class Manifest.permission_group { ctor public Manifest.permission_group(); field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR"; + field public static final java.lang.String CALL_LOG = "android.permission-group.CALL_LOG"; field public static final java.lang.String CAMERA = "android.permission-group.CAMERA"; field public static final java.lang.String CONTACTS = "android.permission-group.CONTACTS"; field public static final java.lang.String LOCATION = "android.permission-group.LOCATION"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 8235507e4528..cd8a1605e58d 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -840,56 +840,17 @@ android:protectionLevel="dangerous|instant" /> <!-- ====================================================================== --> - <!-- Permissions for accessing the device telephony --> + <!-- Permissions for accessing the call log --> <!-- ====================================================================== --> <eat-comment /> <!-- Used for permissions that are associated telephony features. --> - <permission-group android:name="android.permission-group.PHONE" + <permission-group android:name="android.permission-group.CALL_LOG" android:icon="@drawable/perm_group_phone_calls" - android:label="@string/permgrouplab_phone" - android:description="@string/permgroupdesc_phone" - android:request="@string/permgrouprequest_phone" - android:priority="500" /> - - <!-- Allows read only access to phone state, including the phone number of the device, - current cellular network information, the status of any ongoing calls, and a list of any - {@link android.telecom.PhoneAccount}s registered on the device. - <p class="note"><strong>Note:</strong> If <em>both</em> your <a - href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code - minSdkVersion}</a> and <a - href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code - targetSdkVersion}</a> values are set to 3 or lower, the system implicitly - grants your app this permission. If you don't need this permission, be sure your <a - href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code - targetSdkVersion}</a> is 4 or higher. - <p>Protection level: dangerous - --> - <permission android:name="android.permission.READ_PHONE_STATE" - android:permissionGroup="android.permission-group.PHONE" - android:label="@string/permlab_readPhoneState" - android:description="@string/permdesc_readPhoneState" - android:protectionLevel="dangerous" /> - - <!-- Allows read access to the device's phone number(s). This is a subset of the capabilities - granted by {@link #READ_PHONE_STATE} but is exposed to instant applications. - <p>Protection level: dangerous--> - <permission android:name="android.permission.READ_PHONE_NUMBERS" - android:permissionGroup="android.permission-group.PHONE" - android:label="@string/permlab_readPhoneNumbers" - android:description="@string/permdesc_readPhoneNumbers" - android:protectionLevel="dangerous|instant" /> - - <!-- Allows an application to initiate a phone call without going through - the Dialer user interface for the user to confirm the call. - <p>Protection level: dangerous - --> - <permission android:name="android.permission.CALL_PHONE" - android:permissionGroup="android.permission-group.PHONE" - android:permissionFlags="costsMoney" - android:label="@string/permlab_callPhone" - android:description="@string/permdesc_callPhone" - android:protectionLevel="dangerous" /> + android:label="@string/permgrouplab_calllog" + android:description="@string/permgroupdesc_calllog" + android:request="@string/permgrouprequest_calllog" + android:priority="450" /> <!-- Allows an application to access the IMS call service: making and modifying a call @@ -897,7 +858,6 @@ @hide --> <permission android:name="android.permission.ACCESS_IMS_CALL_SERVICE" - android:permissionGroup="android.permission-group.PHONE" android:label="@string/permlab_accessImsCallService" android:description="@string/permdesc_accessImsCallService" android:protectionLevel="signature|privileged" /> @@ -915,7 +875,7 @@ <p>Protection level: dangerous --> <permission android:name="android.permission.READ_CALL_LOG" - android:permissionGroup="android.permission-group.PHONE" + android:permissionGroup="android.permission-group.CALL_LOG" android:label="@string/permlab_readCallLog" android:description="@string/permdesc_readCallLog" android:protectionLevel="dangerous" /> @@ -934,11 +894,74 @@ <p>Protection level: dangerous --> <permission android:name="android.permission.WRITE_CALL_LOG" - android:permissionGroup="android.permission-group.PHONE" + android:permissionGroup="android.permission-group.CALL_LOG" android:label="@string/permlab_writeCallLog" android:description="@string/permdesc_writeCallLog" android:protectionLevel="dangerous" /> + <!-- Allows an application to see the number being dialed during an outgoing + call with the option to redirect the call to a different number or + abort the call altogether. + <p>Protection level: dangerous + --> + <permission android:name="android.permission.PROCESS_OUTGOING_CALLS" + android:permissionGroup="android.permission-group.CALL_LOG" + android:label="@string/permlab_processOutgoingCalls" + android:description="@string/permdesc_processOutgoingCalls" + android:protectionLevel="dangerous" /> + + <!-- ====================================================================== --> + <!-- Permissions for accessing the device telephony --> + <!-- ====================================================================== --> + <eat-comment /> + + <!-- Used for permissions that are associated telephony features. --> + <permission-group android:name="android.permission-group.PHONE" + android:icon="@drawable/perm_group_phone_calls" + android:label="@string/permgrouplab_phone" + android:description="@string/permgroupdesc_phone" + android:request="@string/permgrouprequest_phone" + android:priority="500" /> + + <!-- Allows read only access to phone state, including the phone number of the device, + current cellular network information, the status of any ongoing calls, and a list of any + {@link android.telecom.PhoneAccount}s registered on the device. + <p class="note"><strong>Note:</strong> If <em>both</em> your <a + href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code + minSdkVersion}</a> and <a + href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code + targetSdkVersion}</a> values are set to 3 or lower, the system implicitly + grants your app this permission. If you don't need this permission, be sure your <a + href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code + targetSdkVersion}</a> is 4 or higher. + <p>Protection level: dangerous + --> + <permission android:name="android.permission.READ_PHONE_STATE" + android:permissionGroup="android.permission-group.PHONE" + android:label="@string/permlab_readPhoneState" + android:description="@string/permdesc_readPhoneState" + android:protectionLevel="dangerous" /> + + <!-- Allows read access to the device's phone number(s). This is a subset of the capabilities + granted by {@link #READ_PHONE_STATE} but is exposed to instant applications. + <p>Protection level: dangerous--> + <permission android:name="android.permission.READ_PHONE_NUMBERS" + android:permissionGroup="android.permission-group.PHONE" + android:label="@string/permlab_readPhoneNumbers" + android:description="@string/permdesc_readPhoneNumbers" + android:protectionLevel="dangerous|instant" /> + + <!-- Allows an application to initiate a phone call without going through + the Dialer user interface for the user to confirm the call. + <p>Protection level: dangerous + --> + <permission android:name="android.permission.CALL_PHONE" + android:permissionGroup="android.permission-group.PHONE" + android:permissionFlags="costsMoney" + android:label="@string/permlab_callPhone" + android:description="@string/permdesc_callPhone" + android:protectionLevel="dangerous" /> + <!-- Allows an application to add voicemails into the system. <p>Protection level: dangerous --> @@ -957,18 +980,6 @@ android:label="@string/permlab_use_sip" android:protectionLevel="dangerous"/> - <!-- Allows an application to see the number being dialed during an outgoing - call with the option to redirect the call to a different number or - abort the call altogether. - <p>Protection level: dangerous - --> - <permission android:name="android.permission.PROCESS_OUTGOING_CALLS" - android:permissionGroup="android.permission-group.PHONE" - android:label="@string/permlab_processOutgoingCalls" - android:description="@string/permdesc_processOutgoingCalls" - android:protectionLevel="dangerous" /> - - <!-- Allows the app to answer an incoming phone call. <p>Protection level: dangerous --> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index b92052b9ebde..bf7ca524c93e 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -724,6 +724,14 @@ <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to take pictures and record video?</string> <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permgrouplab_calllog">Call logs</string> + <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permgroupdesc_calllog">read and write phone call log</string> + <!-- Message shown to the user when the apps requests permission from this group --> + <string name="permgrouprequest_calllog">Allow + <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to access your phone call logs?</string> + + <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> <string name="permgrouplab_phone">Phone</string> <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. --> <string name="permgroupdesc_phone">make and manage phone calls</string> |