Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08db2323 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

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
parent f5e313dc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35130,6 +35130,7 @@ package android.provider {
    field public static final String ACTION_QUICK_ACCESS_WALLET_SETTINGS = "android.settings.QUICK_ACCESS_WALLET_SETTINGS";
    field public static final String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS";
    field public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
    field public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = "android.settings.REQUEST_SCHEDULE_EXACT_ALARM";
    field public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = "android.settings.REQUEST_SET_AUTOFILL_SERVICE";
    field public static final String ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS";
    field public static final String ACTION_SECURITY_SETTINGS = "android.settings.SECURITY_SETTINGS";
+16 −0
Original line number Diff line number Diff line
@@ -416,6 +416,22 @@ public final class Settings {
    public static final String ACTION_MANAGE_UNKNOWN_APP_SOURCES =
            "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
     *