diff options
author | Yorke Lee <yorkelee@google.com> | 2015-07-24 12:27:46 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-07-24 12:52:02 -0700 |
commit | 5f6c901ad062cd7d88db09b555e28ee354ca66c6 (patch) | |
tree | 204db626234e773f39461181ba0c0b8a3388f428 /res | |
parent | a0018a3f788f381313ee5c5f2b15ddce8d7ec5d1 (diff) |
Protect against lack of WRITE_SYSTEM_SETTINGS AppOp
Guard the following entry points with checks against the AppOp
1) Launch of SoundSettingsFragment
Fallback: Send to system sound settings instead
2) onResume of SoundSettingsFragment (this can happen if the AppOp
is toggled by the user in the background)
Fallback: Return to main Dialer settings instead
3) Toggling of various perferences (this can happen in monkey tests)
Fallback: Show toast, ignore settings chance
Bug: 22660372
Change-Id: Ief5d74166d35a9718ea664f378f6930e777f2923
Diffstat (limited to 'res')
-rw-r--r-- | res/values/ids.xml | 1 | ||||
-rw-r--r-- | res/values/strings.xml | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/res/values/ids.xml b/res/values/ids.xml index e2f0ff593..d8f4aa877 100644 --- a/res/values/ids.xml +++ b/res/values/ids.xml @@ -17,4 +17,5 @@ <resources> <item type="id" name="context_menu_copy_to_clipboard" /> <item type="id" name="context_menu_edit_before_call" /> + <item type="id" name="settings_header_sounds_and_vibration" /> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index eec9b0ca7..5e2476db0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -813,4 +813,7 @@ <!-- Shown as a prompt to turn on the phone permission to allow a call to be placed --> <string name="permission_place_call">To place a call,\n turn on the Phone permission.</string> + + <!-- Shown as a message that notifies the user that the Phone app cannot write to system settings, which is why the system settings app is being launched directly instead.--> + <string name="toast_cannot_write_system_settings">Phone app does not have permission to write to system settings.</string> </resources> |