Merge "Register AppHibernationManager in service registry" am: 44183743e0

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572766

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf8ac130fe7800af2d83b16f2ae90a7df5558c62
This commit is contained in:
Kevin Han
2021-02-24 00:32:44 +00:00
committed by Automerger Merge Worker

View File

@@ -43,6 +43,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;
@@ -1295,6 +1296,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