Merge "HintManagerService: Use the default UidObserver implementation." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
970cb63c9b
@@ -9213,7 +9213,7 @@ HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;-><init>(Lco
|
||||
HPLcom/android/server/power/hint/HintManagerService$AppHintSession;->close()V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;->reportActualWorkDuration([J[J)V+]Lcom/android/server/power/hint/HintManagerService$NativeWrapper;Lcom/android/server/power/hint/HintManagerService$NativeWrapper;]Lcom/android/server/power/hint/HintManagerService$AppHintSession;Lcom/android/server/power/hint/HintManagerService$AppHintSession;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;->sendHint(I)V+]Lcom/android/server/power/hint/HintManagerService$NativeWrapper;Lcom/android/server/power/hint/HintManagerService$NativeWrapper;]Lcom/android/server/power/hint/HintManagerService$AppHintSession;Lcom/android/server/power/hint/HintManagerService$AppHintSession;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;->updateHintAllowed()Z+]Lcom/android/server/power/hint/HintManagerService$UidObserver;Lcom/android/server/power/hint/HintManagerService$UidObserver;]Lcom/android/server/power/hint/HintManagerService$AppHintSession;Lcom/android/server/power/hint/HintManagerService$AppHintSession;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;->updateHintAllowed()Z+]Lcom/android/server/power/hint/HintManagerService$MyUidObserver;Lcom/android/server/power/hint/HintManagerService$MyUidObserver;]Lcom/android/server/power/hint/HintManagerService$AppHintSession;Lcom/android/server/power/hint/HintManagerService$AppHintSession;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$AppHintSession;->updateTargetWorkDuration(J)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$BinderService;-><init>(Lcom/android/server/power/hint/HintManagerService;)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$BinderService;->createHintSession(Landroid/os/IBinder;[IJ)Landroid/os/IHintSession;
|
||||
@@ -9224,13 +9224,13 @@ HSPLcom/android/server/power/hint/HintManagerService$NativeWrapper;->halGetHintS
|
||||
HSPLcom/android/server/power/hint/HintManagerService$NativeWrapper;->halInit()V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$NativeWrapper;->halReportActualWorkDuration(J[J[J)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$NativeWrapper;->halSendHint(JI)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver$$ExternalSyntheticLambda1;-><init>(Lcom/android/server/power/hint/HintManagerService$UidObserver;II)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver$$ExternalSyntheticLambda1;->run()V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver;->$r8$lambda$ej6eMAvAGZXPb5YUxpIPNazvUW4(Lcom/android/server/power/hint/HintManagerService$UidObserver;II)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver;-><init>(Lcom/android/server/power/hint/HintManagerService;)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver;->isUidForeground(I)Z+]Ljava/lang/Integer;Ljava/lang/Integer;]Landroid/util/SparseArray;Landroid/util/SparseArray;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver;->lambda$onUidStateChanged$1(II)V+]Landroid/util/ArrayMap;Landroid/util/ArrayMap;]Landroid/util/SparseArray;Landroid/util/SparseArray;]Ljava/util/Collection;Landroid/util/MapCollections$ValuesCollection;]Landroid/util/ArraySet;Landroid/util/ArraySet;]Ljava/util/Iterator;Landroid/util/MapCollections$ArrayIterator;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$UidObserver;->onUidStateChanged(IIJI)V+]Landroid/os/Handler;Landroid/os/Handler;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver$$ExternalSyntheticLambda1;-><init>(Lcom/android/server/power/hint/HintManagerService$MyUidObserver;II)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver$$ExternalSyntheticLambda1;->run()V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver;->$r8$lambda$ej6eMAvAGZXPb5YUxpIPNazvUW4(Lcom/android/server/power/hint/HintManagerService$MyUidObserver;II)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver;-><init>(Lcom/android/server/power/hint/HintManagerService;)V
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver;->isUidForeground(I)Z+]Ljava/lang/Integer;Ljava/lang/Integer;]Landroid/util/SparseArray;Landroid/util/SparseArray;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver;->lambda$onUidStateChanged$1(II)V+]Landroid/util/ArrayMap;Landroid/util/ArrayMap;]Landroid/util/SparseArray;Landroid/util/SparseArray;]Ljava/util/Collection;Landroid/util/MapCollections$ValuesCollection;]Landroid/util/ArraySet;Landroid/util/ArraySet;]Ljava/util/Iterator;Landroid/util/MapCollections$ArrayIterator;
|
||||
HSPLcom/android/server/power/hint/HintManagerService$MyUidObserver;->onUidStateChanged(IIJI)V+]Landroid/os/Handler;Landroid/os/Handler;
|
||||
HSPLcom/android/server/power/hint/HintManagerService;->-$$Nest$fgetmActiveSessions(Lcom/android/server/power/hint/HintManagerService;)Landroid/util/ArrayMap;
|
||||
HSPLcom/android/server/power/hint/HintManagerService;->-$$Nest$fgetmLock(Lcom/android/server/power/hint/HintManagerService;)Ljava/lang/Object;
|
||||
HSPLcom/android/server/power/hint/HintManagerService;->-$$Nest$fgetmNativeWrapper(Lcom/android/server/power/hint/HintManagerService;)Lcom/android/server/power/hint/HintManagerService$NativeWrapper;
|
||||
@@ -13493,7 +13493,7 @@ Lcom/android/server/power/batterysaver/BatterySavingStats;
|
||||
Lcom/android/server/power/hint/HintManagerService$BinderService;
|
||||
Lcom/android/server/power/hint/HintManagerService$Injector;
|
||||
Lcom/android/server/power/hint/HintManagerService$NativeWrapper;
|
||||
Lcom/android/server/power/hint/HintManagerService$UidObserver;
|
||||
Lcom/android/server/power/hint/HintManagerService$MyUidObserver;
|
||||
Lcom/android/server/power/hint/HintManagerService;
|
||||
Lcom/android/server/power/stats/BatteryExternalStatsWorker$$ExternalSyntheticLambda0;
|
||||
Lcom/android/server/power/stats/BatteryExternalStatsWorker$$ExternalSyntheticLambda3;
|
||||
|
||||
@@ -19,8 +19,8 @@ package com.android.server.power.hint;
|
||||
import android.annotation.NonNull;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManagerInternal;
|
||||
import android.app.IUidObserver;
|
||||
import android.app.StatsManager;
|
||||
import android.app.UidObserver;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
@@ -69,7 +69,7 @@ public final class HintManagerService extends SystemService {
|
||||
/** Lock to protect HAL handles and listen list. */
|
||||
private final Object mLock = new Object();
|
||||
|
||||
@VisibleForTesting final UidObserver mUidObserver;
|
||||
@VisibleForTesting final MyUidObserver mUidObserver;
|
||||
|
||||
private final NativeWrapper mNativeWrapper;
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class HintManagerService extends SystemService {
|
||||
mNativeWrapper = injector.createNativeWrapper();
|
||||
mNativeWrapper.halInit();
|
||||
mHintSessionPreferredRate = mNativeWrapper.halGetHintSessionPreferredRate();
|
||||
mUidObserver = new UidObserver();
|
||||
mUidObserver = new MyUidObserver();
|
||||
mAmInternal = Objects.requireNonNull(
|
||||
LocalServices.getService(ActivityManagerInternal.class));
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public final class HintManagerService extends SystemService {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
final class UidObserver extends IUidObserver.Stub {
|
||||
final class MyUidObserver extends UidObserver {
|
||||
private final SparseArray<Integer> mProcStatesCache = new SparseArray<>();
|
||||
|
||||
public boolean isUidForeground(int uid) {
|
||||
@@ -276,14 +276,6 @@ public final class HintManagerService extends SystemService {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidActive(int uid) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidIdle(int uid, boolean disabled) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The IUidObserver callback is called from the system_server, so it'll be a direct function
|
||||
* call from ActivityManagerService. Do not do heavy logic here.
|
||||
@@ -305,14 +297,6 @@ public final class HintManagerService extends SystemService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidCachedChanged(int uid, boolean cached) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUidProcAdjChanged(int uid) {
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
Reference in New Issue
Block a user