summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorKevin Han <kevhan@google.com>2021-02-24 02:12:34 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-24 02:12:34 +0000
commitc03ec964c577dfc542332198d968614d4d137b95 (patch)
treedfa1f2b31ed8fcc9f87000386634f692937f3f5d /core/java/android
parent575877afd948baa2c6c48e87e4de4fd4678ec2e7 (diff)
parent2c842f3aa7e8394ae7288b9602f4fab38d8838d8 (diff)
Merge "Register AppHibernationManager in service registry" am: 44183743e0 am: 0de60cd4e8 am: 2c842f3aa7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572766 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I3419fcaa184043d07c6e02579b6dec13d23f356f
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/SystemServiceRegistry.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index dd5a9a8a28af..e16e40b6d572 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -47,6 +47,7 @@ import android.app.usage.IUsageStatsManager;
import android.app.usage.NetworkStatsManager;
import android.app.usage.StorageStatsManager;
import android.app.usage.UsageStatsManager;
+import android.apphibernation.AppHibernationManager;
import android.appwidget.AppWidgetManager;
import android.bluetooth.BluetoothManager;
import android.companion.CompanionDeviceManager;
@@ -1378,6 +1379,13 @@ public final class SystemServiceRegistry {
IBinder b = ServiceManager.getServiceOrThrow(Context.APP_INTEGRITY_SERVICE);
return new AppIntegrityManager(IAppIntegrityManager.Stub.asInterface(b));
}});
+ registerService(Context.APP_HIBERNATION_SERVICE, AppHibernationManager.class,
+ new CachedServiceFetcher<AppHibernationManager>() {
+ @Override
+ public AppHibernationManager createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(Context.APP_HIBERNATION_SERVICE);
+ return b == null ? null : new AppHibernationManager(ctx);
+ }});
registerService(Context.DREAM_SERVICE, DreamManager.class,
new CachedServiceFetcher<DreamManager>() {
@Override