summaryrefslogtreecommitdiff
path: root/core/java/android/content/Intent.java
diff options
context:
space:
mode:
authorVarun Shah <varunshah@google.com>2021-08-17 13:49:06 -0700
committerPetr Cermak <petrcermak@google.com>2021-09-17 22:35:26 +0000
commit777d87f91b23aa245d6c0807cd52365a713f340f (patch)
tree36cc0c392733e79b6f76cc25d9d3696a7df6c5c4 /core/java/android/content/Intent.java
parent1f0126502460201ec38ce06c1cc4c2a52b9fe242 (diff)
Dismiss the suspend dialog if conditions have been modified.
Whenever suspension conditions change, if there is a user-visible suspension-related dialog, dismiss it to ensure the user is never looking at stale information. Bug: 169137795 Test: atest SuspendPackagesBroadcastTest#sendPackagesSuspendModifiedForUser Test: manual (steps below) -enable EBS, tap on suspended app to see dialog -enable Focus mode, ensure dialog is dismissed -tap on suspended app again to see relevent dialog, disable Focus mode, ensure dialog is dismissed -tap on suspended app again to see relevant dialog, disable EBS, ensure dialog is dismissed correctly -can permute enable/disable steps to further verify Change-Id: Ib1650f910f7441498424ab4bc92185ce432ac405 (cherry picked from commit 25e73a8b9e81a40c725463d8de9f27e911fe484b)
Diffstat (limited to 'core/java/android/content/Intent.java')
-rw-r--r--core/java/android/content/Intent.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 9e35a32638a8..35794d79b49d 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2738,6 +2738,22 @@ public class Intent implements Parcelable, Cloneable {
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_PACKAGES_UNSUSPENDED = "android.intent.action.PACKAGES_UNSUSPENDED";
+ /**
+ * Broadcast Action: One of the suspend conditions have been modified for the packages.
+ * <p>Includes the following extras:
+ * <ul>
+ * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages which have been modified
+ * <li> {@link #EXTRA_CHANGED_UID_LIST} is the set of uids which have been modified
+ * </ul>
+ *
+ * <p class="note">This is a protected intent that can only be sent
+ * by the system. It is only sent to registered receivers.
+ *
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_PACKAGES_SUSPENSION_CHANGED =
+ "android.intent.action.PACKAGES_SUSPENSION_CHANGED";
/**
* Broadcast Action: Distracting packages have been changed.