Merge "UsageStatsService: Use the default UidObserver implementation." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b4c1507499
@@ -46,6 +46,7 @@ import android.app.ActivityManager.ProcessState;
|
||||
import android.app.AppOpsManager;
|
||||
import android.app.IUidObserver;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.UidObserver;
|
||||
import android.app.admin.DevicePolicyManagerInternal;
|
||||
import android.app.usage.AppLaunchEstimateInfo;
|
||||
import android.app.usage.AppStandbyInfo;
|
||||
@@ -592,33 +593,17 @@ public class UsageStatsService extends SystemService implements
|
||||
}
|
||||
}
|
||||
|
||||
private final IUidObserver mUidObserver = new IUidObserver.Stub() {
|
||||
private final IUidObserver mUidObserver = new UidObserver() {
|
||||
@Override
|
||||
public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
|
||||
mHandler.obtainMessage(MSG_UID_STATE_CHANGED, uid, procState).sendToTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidIdle(int uid, boolean disabled) {
|
||||
// Ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidGone(int uid, boolean disabled) {
|
||||
onUidStateChanged(uid, ActivityManager.PROCESS_STATE_NONEXISTENT, 0,
|
||||
ActivityManager.PROCESS_CAPABILITY_NONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidActive(int uid) {
|
||||
// Ignored
|
||||
}
|
||||
|
||||
@Override public void onUidCachedChanged(int uid, boolean cached) {
|
||||
}
|
||||
|
||||
@Override public void onUidProcAdjChanged(int uid) {
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user