Merge "GameManagerService: Use the default UidObserver implementation." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
84ee359a92
@@ -2371,10 +2371,10 @@ HSPLcom/android/server/am/UserController;->unsafeConvertIncomingUser(I)I
|
||||
HSPLcom/android/server/am/UserController;->updateStartedUserArrayLU()V
|
||||
HSPLcom/android/server/am/UserState;-><init>(Landroid/os/UserHandle;)V
|
||||
HSPLcom/android/server/app/GameManagerService$LocalService;->getResolutionScalingFactor(Ljava/lang/String;I)F
|
||||
HSPLcom/android/server/app/GameManagerService$UidObserver$$ExternalSyntheticLambda0;-><init>(Lcom/android/server/app/GameManagerService$UidObserver;I)V
|
||||
HSPLcom/android/server/app/GameManagerService$UidObserver$$ExternalSyntheticLambda0;->test(Ljava/lang/Object;)Z
|
||||
HSPLcom/android/server/app/GameManagerService$UidObserver;->disableGameMode(I)V+]Ljava/util/Set;Ljava/util/HashSet;]Landroid/os/PowerManagerInternal;Lcom/android/server/power/PowerManagerService$LocalService;
|
||||
HSPLcom/android/server/app/GameManagerService$UidObserver;->onUidStateChanged(IIJI)V+]Lcom/android/server/app/GameManagerService$UidObserver;Lcom/android/server/app/GameManagerService$UidObserver;]Ljava/util/stream/Stream;Ljava/util/stream/ReferencePipeline$Head;]Landroid/content/Context;Landroid/app/ContextImpl;]Landroid/content/pm/PackageManager;Landroid/app/ApplicationPackageManager;]Landroid/os/PowerManagerInternal;Lcom/android/server/power/PowerManagerService$LocalService;]Ljava/util/Set;Ljava/util/HashSet;
|
||||
HSPLcom/android/server/app/GameManagerService$MyUidObserver$$ExternalSyntheticLambda0;-><init>(Lcom/android/server/app/GameManagerService$MyUidObserver;I)V
|
||||
HSPLcom/android/server/app/GameManagerService$MyUidObserver$$ExternalSyntheticLambda0;->test(Ljava/lang/Object;)Z
|
||||
HSPLcom/android/server/app/GameManagerService$MyUidObserver;->disableGameMode(I)V+]Ljava/util/Set;Ljava/util/HashSet;]Landroid/os/PowerManagerInternal;Lcom/android/server/power/PowerManagerService$LocalService;
|
||||
HSPLcom/android/server/app/GameManagerService$MyUidObserver;->onUidStateChanged(IIJI)V+]Lcom/android/server/app/GameManagerService$MyUidObserver;Lcom/android/server/app/GameManagerService$MyUidObserver;]Ljava/util/stream/Stream;Ljava/util/stream/ReferencePipeline$Head;]Landroid/content/Context;Landroid/app/ContextImpl;]Landroid/content/pm/PackageManager;Landroid/app/ApplicationPackageManager;]Landroid/os/PowerManagerInternal;Lcom/android/server/power/PowerManagerService$LocalService;]Ljava/util/Set;Ljava/util/HashSet;
|
||||
HSPLcom/android/server/app/GameManagerService;->-$$Nest$fgetmContext(Lcom/android/server/app/GameManagerService;)Landroid/content/Context;
|
||||
HSPLcom/android/server/app/GameManagerService;->-$$Nest$fgetmForegroundGameUids(Lcom/android/server/app/GameManagerService;)Ljava/util/Set;
|
||||
HSPLcom/android/server/app/GameManagerService;->-$$Nest$fgetmUidObserverLock(Lcom/android/server/app/GameManagerService;)Ljava/lang/Object;
|
||||
|
||||
@@ -40,8 +40,8 @@ import android.app.GameModeInfo;
|
||||
import android.app.GameState;
|
||||
import android.app.IGameManagerService;
|
||||
import android.app.IGameModeListener;
|
||||
import android.app.IUidObserver;
|
||||
import android.app.StatsManager;
|
||||
import android.app.UidObserver;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -169,7 +169,7 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
private final Object mUidObserverLock = new Object();
|
||||
@VisibleForTesting
|
||||
@Nullable
|
||||
final UidObserver mUidObserver;
|
||||
final MyUidObserver mUidObserver;
|
||||
@GuardedBy("mUidObserverLock")
|
||||
private final Set<Integer> mForegroundGameUids = new HashSet<>();
|
||||
|
||||
@@ -209,7 +209,7 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
} else {
|
||||
mGameServiceController = null;
|
||||
}
|
||||
mUidObserver = new UidObserver();
|
||||
mUidObserver = new MyUidObserver();
|
||||
try {
|
||||
ActivityManager.getService().registerUidObserver(mUidObserver,
|
||||
ActivityManager.UID_OBSERVER_PROCSTATE | ActivityManager.UID_OBSERVER_GONE,
|
||||
@@ -2143,10 +2143,7 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
*/
|
||||
private static native void nativeSetOverrideFrameRate(int uid, float frameRate);
|
||||
|
||||
final class UidObserver extends IUidObserver.Stub {
|
||||
@Override
|
||||
public void onUidIdle(int uid, boolean disabled) {}
|
||||
|
||||
final class MyUidObserver extends UidObserver {
|
||||
@Override
|
||||
public void onUidGone(int uid, boolean disabled) {
|
||||
synchronized (mUidObserverLock) {
|
||||
@@ -2154,9 +2151,6 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidActive(int uid) {}
|
||||
|
||||
@Override
|
||||
public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
|
||||
synchronized (mUidObserverLock) {
|
||||
@@ -2197,11 +2191,5 @@ public final class GameManagerService extends IGameManagerService.Stub {
|
||||
mPowerManagerInternal.setPowerMode(Mode.GAME, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidCachedChanged(int uid, boolean cached) {}
|
||||
|
||||
@Override
|
||||
public void onUidProcAdjChanged(int uid) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user