Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev am: a6099ac785
Change-Id: Ia04a9d5b4dbbceaa878c7d9e53ff5957aa1e3e20
This commit is contained in:
@@ -99,7 +99,6 @@ interface IActivityManager {
|
||||
void unregisterUidObserver(in IUidObserver observer);
|
||||
boolean isUidActive(int uid, String callingPackage);
|
||||
int getUidProcessState(int uid, in String callingPackage);
|
||||
boolean isUidActiveOrForeground(int uid, String callingPackage);
|
||||
// =============== End of transactions used on native side as well ============================
|
||||
|
||||
// Special low-level communication with activity manager.
|
||||
|
||||
@@ -8765,27 +8765,6 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
return uidRecord != null && !uidRecord.setIdle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUidActiveOrForeground(int uid, String callingPackage) {
|
||||
if (!hasUsageStatsPermission(callingPackage)) {
|
||||
enforceCallingPermission(android.Manifest.permission.PACKAGE_USAGE_STATS,
|
||||
"isUidActiveOrForeground");
|
||||
}
|
||||
synchronized (this) {
|
||||
final boolean isActive = isUidActiveLocked(uid);
|
||||
if (isActive) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
final boolean isForeground = mAtmInternal.isUidForeground(uid);
|
||||
if (isForeground) {
|
||||
Slog.wtf(TAG, "isUidActiveOrForeground: isUidActive false but "
|
||||
+ " isUidForeground true, uid:" + uid
|
||||
+ " callingPackage:" + callingPackage);
|
||||
}
|
||||
return isForeground;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistentVrThread(int tid) {
|
||||
mActivityTaskManager.setPersistentVrThread(tid);
|
||||
|
||||
Reference in New Issue
Block a user