diff options
| author | Chris Tate <ctate@android.com> | 2021-04-06 16:22:21 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-06 16:22:21 +0000 |
| commit | ced44641d934c5f87e82589934f63eb5a5986f07 (patch) | |
| tree | 1d9cc7b91e8b82c38e022bb7e6bfe0f48b62a6a2 /core/java | |
| parent | 1c08e32233fef339af2cfdcd1b801af42bd49615 (diff) | |
| parent | 2a33098b6c5a1e6094786a8c1ed64ce00bc87245 (diff) | |
Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into rvc-qpr-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/ActivityManagerInternal.java | 15 |
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. */ |
