summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Amith Yamasani <yamasani@google.com> 2024-02-14 03:52:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-02-14 03:52:02 +0000
commit831789ecac467b11dede28ab2dc3fce3c0e47d25 (patch)
tree550fa03108b49ce17b1a1b3eebddd8390d73b827
parentc42aea8257ef7051c4d420914550e60094f2be55 (diff)
parent7c3b70bd08a85b6bf367c98ed5502df14c49a4ba (diff)
Merge "Intent API for background restriction settings" into main
-rw-r--r--core/api/current.txt1
-rw-r--r--core/java/android/provider/Settings.java17
2 files changed, 18 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 044499492a9a..db7334e2eb16 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -37195,6 +37195,7 @@ package android.provider {
field public static final String ACTION_APP_USAGE_SETTINGS = "android.settings.action.APP_USAGE_SETTINGS";
field @FlaggedApi("android.app.modes_api") public static final String ACTION_AUTOMATIC_ZEN_RULE_SETTINGS = "android.settings.AUTOMATIC_ZEN_RULE_SETTINGS";
field public static final String ACTION_AUTO_ROTATE_SETTINGS = "android.settings.AUTO_ROTATE_SETTINGS";
+ field @FlaggedApi("android.app.app_restrictions_api") public static final String ACTION_BACKGROUND_RESTRICTIONS_SETTINGS = "android.settings.BACKGROUND_RESTRICTIONS_SETTINGS";
field public static final String ACTION_BATTERY_SAVER_SETTINGS = "android.settings.BATTERY_SAVER_SETTINGS";
field public static final String ACTION_BIOMETRIC_ENROLL = "android.settings.BIOMETRIC_ENROLL";
field public static final String ACTION_BLUETOOTH_SETTINGS = "android.settings.BLUETOOTH_SETTINGS";
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index ecf193739627..ec4d5876070a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1551,6 +1551,23 @@ public final class Settings {
"android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
/**
+ * Activity Action: Show screen for controlling any background restrictions imposed on
+ * an app. If the system returns true for
+ * {@link android.app.ActivityManager#isBackgroundRestricted()}, and the app is not able to
+ * satisfy user requests due to being restricted in the background, then this intent can be
+ * used to request the user to unrestrict the app.
+ * <p>
+ * Input: The Intent's data URI must specify the application package name
+ * to be shown, with the "package" scheme, such as "package:com.my.app".
+ * <p>
+ * Output: Nothing.
+ */
+ @FlaggedApi(android.app.Flags.FLAG_APP_RESTRICTIONS_API)
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_BACKGROUND_RESTRICTIONS_SETTINGS =
+ "android.settings.BACKGROUND_RESTRICTIONS_SETTINGS";
+
+ /**
* Activity Action: Open the advanced power usage details page of an associated app.
* <p>
* Input: Intent's data URI set with an application name, using the