summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSuprabh Shukla <suprabh@google.com>2018-11-08 19:00:01 -0800
committerSuprabh Shukla <suprabh@google.com>2018-11-08 19:40:13 -0800
commit3017fe4f517e88e35022648d5b4fa3ddc0d9eabc (patch)
treefa898ddec4a4890e1ab4a91c5dec3916af882418 /core/java
parent787ff0fa2d2003ae45f221bfa69ad6a40d1731fd (diff)
Calling opChanged on package suspend / unsuspend
checkAudioOperation returned MODE_IGNORED when a package was suspended, but any AppOpsWatcher registered for audio operation did not callback when a package got suspended. This lead to inconsistent state for services that were watching for app op changes. Test: atest FrameworksServicesTests:SuspendPackagesTest Bug: 112486945 Bug: 110077884 Change-Id: Ibfc378dd4ea8dd38ef002c1ac668c479afa8fd47
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/pm/PackageManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 67b86c0e6e42..b17fa2ad52e5 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -5808,16 +5808,16 @@ public abstract class PackageManager {
* {@code android.permission.SUSPEND_APPS} can put any app on the device into a suspended state.
*
* <p>While in this state, the application's notifications will be hidden, any of its started
- * activities will be stopped and it will not be able to show toasts or dialogs or ring the
- * device. When the user tries to launch a suspended app, the system will, instead, show a
+ * activities will be stopped and it will not be able to show toasts or dialogs or play audio.
+ * When the user tries to launch a suspended app, the system will, instead, show a
* dialog to the user informing them that they cannot use this app while it is suspended.
*
* <p>When an app is put into this state, the broadcast action
* {@link Intent#ACTION_MY_PACKAGE_SUSPENDED} will be delivered to any of its broadcast
* receivers that included this action in their intent-filters, <em>including manifest
* receivers.</em> Similarly, a broadcast action {@link Intent#ACTION_MY_PACKAGE_UNSUSPENDED}
- * is delivered when a previously suspended app is taken out of this state.
- * </p>
+ * is delivered when a previously suspended app is taken out of this state. Apps are expected to
+ * use these to gracefully deal with transitions to and from this state.
*
* @return {@code true} if the calling package has been suspended, {@code false} otherwise.
*