NetworkPolicyManagerService: Use the default UidObserver implementation.
A class which overrides IUidObserver.Stub with empty callback implementations was added in change I2ff1e868586861e4dcd6586ad22139ba84eaf39c to simplify BroadcastQueue interface complexity. Using this default implementation will mean less churn when new callbacks are added to IUidObserver, or existing callback method signatures are changed. Bug: 274486653 Test: Presubmit, smoke test on cuttlefish. Change-Id: Ie0a3ee815bc41b1acb9fd7801b8c792791f7a8e1
This commit is contained in:
@@ -153,6 +153,7 @@ import android.app.IUidObserver;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.UidObserver;
|
||||
import android.app.usage.NetworkStats;
|
||||
import android.app.usage.NetworkStatsManager;
|
||||
import android.app.usage.UsageStatsManagerInternal;
|
||||
@@ -1117,7 +1118,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
|
||||
final private IUidObserver mUidObserver = new UidObserver() {
|
||||
@Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
|
||||
@ProcessCapability int capability) {
|
||||
synchronized (mUidStateCallbackInfos) {
|
||||
@@ -1139,18 +1140,6 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
@Override public void onUidGone(int uid, boolean disabled) {
|
||||
mUidEventHandler.obtainMessage(UID_MSG_GONE, uid, 0).sendToTarget();
|
||||
}
|
||||
|
||||
@Override public void onUidActive(int uid) {
|
||||
}
|
||||
|
||||
@Override public void onUidIdle(int uid, boolean disabled) {
|
||||
}
|
||||
|
||||
@Override public void onUidCachedChanged(int uid, boolean cached) {
|
||||
}
|
||||
|
||||
@Override public void onUidProcAdjChanged(int uid) {
|
||||
}
|
||||
};
|
||||
|
||||
private static final class UidStateCallbackInfo {
|
||||
|
||||
Reference in New Issue
Block a user