diff options
| author | Suprabh Shukla <suprabh@google.com> | 2021-02-19 19:45:21 -0800 |
|---|---|---|
| committer | Suprabh Shukla <suprabh@google.com> | 2021-02-23 22:32:23 -0800 |
| commit | 08db23236cf736c0ebb21257b5574a2ce8ff5edd (patch) | |
| tree | 6c26d459902497d11930e6cef76c4866fa42d67a /core/java/android | |
| parent | f5e313dc1fa72cd7b20a958d15895b537f3bc5fa (diff) | |
Adding Intent API to navigate to alarm permission page
This is needed to provide apps a way to request the user to grant them
SCHEDULE_EXACT_ALARM permission
Test: atest CtsAlarmManagerTestCases
Also, manually:
adb shell am start -n android.settings.REQUEST_SCHEDULE_EXACT_ALARM
adb shell am start -n android.settings.REQUEST_SCHEDULE_EXACT_ALARM \
-d package:com.android.deskclock
Bug: 171306433
Change-Id: I0517e05fe7b9decb29fcc16719d7a534f7e0c0fe
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/provider/Settings.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index ff10b0caab89..09d0af11a39f 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -417,6 +417,22 @@ public final class Settings { "android.settings.MANAGE_UNKNOWN_APP_SOURCES"; /** + * Activity Action: Show settings to allow configuration of + * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission + * + * Input: Optionally, the Intent's data URI can specify the application package name to + * directly invoke the management GUI specific to the package name. For example + * "package:com.my.app". + * <p> + * Output: When a package data uri is passed as input, the activity result is set to + * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise, + * the result is set to {@link android.app.Activity#RESULT_CANCELED}. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = + "android.settings.REQUEST_SCHEDULE_EXACT_ALARM"; + + /** * Activity Action: Show settings to allow configuration of cross-profile access for apps * * Input: Optionally, the Intent's data URI can specify the application package name to |
