summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-04-06 22:04:34 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-04-06 22:04:34 +0000
commite95c0fd0a80a68447a6041ef01425a72b0ff6f01 (patch)
tree1d9cc7b91e8b82c38e022bb7e6bfe0f48b62a6a2 /core/java/android
parentfd1311893de289d7085497bbad5e6282f69961c7 (diff)
parent1de72903d4a9beb8e0833d021e681ef3bf5e8db3 (diff)
Snap for 7262953 from 1de72903d4a9beb8e0833d021e681ef3bf5e8db3 to rvc-qpr3-release
Change-Id: I583350e00ace8e0f841321c386aed6b16885b1dd
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/ActivityManagerInternal.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index eb2a40f4a7dd..e977bab7374e 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -378,6 +378,21 @@ public abstract class ActivityManagerInternal {
public abstract boolean hasRunningForegroundService(int uid, int foregroundServiceType);
/**
+ * Returns {@code true} if the given notification channel currently has a
+ * notification associated with a foreground service. This is an AMS check
+ * because that is the source of truth for the FGS state.
+ */
+ public abstract boolean hasForegroundServiceNotification(String pkg, @UserIdInt int userId,
+ String channelId);
+
+ /**
+ * If the given app has any FGSs whose notifications are in the given channel,
+ * stop them.
+ */
+ public abstract void stopForegroundServicesForChannel(String pkg, @UserIdInt int userId,
+ String channelId);
+
+ /**
* Registers the specified {@code processObserver} to be notified of future changes to
* process state.
*/