Add RoleManager into SystemServiceRegistry.
This change adds RoleManager into SystemServiceRegistry so that Context.getSystemService() can work properly for RoleManager. Bug: 110557011 Test: build Change-Id: I81b7ed87e71f0deee090252f5bedf42eb79806aa
This commit is contained in:
@@ -23,6 +23,7 @@ import android.app.admin.DevicePolicyManager;
|
||||
import android.app.admin.IDevicePolicyManager;
|
||||
import android.app.job.IJobScheduler;
|
||||
import android.app.job.JobScheduler;
|
||||
import android.app.role.RoleManager;
|
||||
import android.app.slice.SliceManager;
|
||||
import android.app.timedetector.TimeDetector;
|
||||
import android.app.timezone.RulesManager;
|
||||
@@ -1114,6 +1115,14 @@ final class SystemServiceRegistry {
|
||||
public PermissionManager createService(ContextImpl ctx) {
|
||||
return new PermissionManager(ctx.getOuterContext());
|
||||
}});
|
||||
|
||||
registerService(Context.ROLE_SERVICE, RoleManager.class,
|
||||
new CachedServiceFetcher<RoleManager>() {
|
||||
@Override
|
||||
public RoleManager createService(ContextImpl ctx)
|
||||
throws ServiceNotFoundException {
|
||||
return new RoleManager(ctx.getOuterContext());
|
||||
}});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user