Add api to check if an app is in foreground or not.
This api is backed by existing appops logic and should only
be used in the context of runtime permissions. This is different
than ActivityManager's foreground check, which only
consider proc state/importance.
Fix: 265802019
API-Coverage-Bug: 266482297
Test: atest AppOpsUidStateTrackerTest
Change-Id: I0a7ce12910199435c0c08f613798b2645455ab5e
diff --git a/services/api/current.txt b/services/api/current.txt
index e66bf4d..a92ccd4 100644
--- a/services/api/current.txt
+++ b/services/api/current.txt
@@ -46,6 +46,14 @@
}
+package com.android.server.appop {
+
+ public interface AppOpsManagerLocal {
+ method public boolean isUidInForeground(int);
+ }
+
+}
+
package com.android.server.pm {
public interface PackageManagerLocal {