Merge "PackageManager: Use the default UidObserver implementation." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
333a8d4196
@@ -27,6 +27,7 @@ import android.app.ActivityManagerInternal;
|
||||
import android.app.AppGlobals;
|
||||
import android.app.IUidObserver;
|
||||
import android.app.IUriGrantsManager;
|
||||
import android.app.UidObserver;
|
||||
import android.app.UriGrantsManager;
|
||||
import android.app.role.OnRoleHoldersChangedListener;
|
||||
import android.app.role.RoleManager;
|
||||
@@ -590,7 +591,7 @@ public class ShortcutService extends IShortcutService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
|
||||
final private IUidObserver mUidObserver = new UidObserver() {
|
||||
@Override
|
||||
public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
|
||||
injectPostToHandler(() -> handleOnUidStateChanged(uid, procState));
|
||||
@@ -601,20 +602,6 @@ public class ShortcutService extends IShortcutService.Stub {
|
||||
injectPostToHandler(() ->
|
||||
handleOnUidStateChanged(uid, ActivityManager.PROCESS_STATE_NONEXISTENT));
|
||||
}
|
||||
|
||||
@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) {
|
||||
}
|
||||
};
|
||||
|
||||
void handleOnUidStateChanged(int uid, int procState) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import android.app.ActivityManagerInternal;
|
||||
import android.app.AlarmManager;
|
||||
import android.app.IActivityManager;
|
||||
import android.app.IUidObserver;
|
||||
import android.app.UidObserver;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -168,7 +169,7 @@ public class OneTimePermissionUserManager {
|
||||
|
||||
private final Object mInnerLock = new Object();
|
||||
private final Object mToken = new Object();
|
||||
private final IUidObserver.Stub mObserver = new IUidObserver.Stub() {
|
||||
private final IUidObserver mObserver = new UidObserver() {
|
||||
@Override
|
||||
public void onUidGone(int uid, boolean disabled) {
|
||||
if (uid == mUid) {
|
||||
@@ -188,15 +189,6 @@ public class OneTimePermissionUserManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onUidActive(int uid) {
|
||||
}
|
||||
public void onUidIdle(int uid, boolean disabled) {
|
||||
}
|
||||
public void onUidProcAdjChanged(int uid) {
|
||||
}
|
||||
public void onUidCachedChanged(int uid, boolean cached) {
|
||||
}
|
||||
};
|
||||
|
||||
private PackageInactivityListener(int uid, @NonNull String packageName, long timeout,
|
||||
|
||||
Reference in New Issue
Block a user