Start role service earlier.
Role service is modularized in this release and allows lower level roles to be introduced after role logic is moved from PermissionController APK into the system server JAR. So move starting role service earlier as well to allow lower level roles. This has no immediate effect because currently initialization for all roles happens upon user start, but once role logic is inside system server, we can allows initializing certain roles earlier in the boot process, e.g. via SystemService.onBootPhase(). Fixes: 178565325 Test: presubmit Change-Id: I8d183553f08aa6200aa3566afaabd40a7ce9489c
This commit is contained in:
@@ -1341,6 +1341,13 @@ public final class SystemServer implements Dumpable {
|
||||
mSystemServiceManager.startService(DropBoxManagerService.class);
|
||||
t.traceEnd();
|
||||
|
||||
// Grants default permissions and defines roles
|
||||
t.traceBegin("StartRoleManagerService");
|
||||
LocalManagerRegistry.addManager(RoleServicePlatformHelper.class,
|
||||
new RoleServicePlatformHelperImpl(mSystemContext));
|
||||
mSystemServiceManager.startService(ROLE_SERVICE_CLASS);
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("StartVibratorManagerService");
|
||||
mSystemServiceManager.startService(VibratorManagerService.Lifecycle.class);
|
||||
t.traceEnd();
|
||||
@@ -2051,13 +2058,6 @@ public final class SystemServer implements Dumpable {
|
||||
t.traceEnd();
|
||||
}
|
||||
|
||||
// Grants default permissions and defines roles
|
||||
t.traceBegin("StartRoleManagerService");
|
||||
LocalManagerRegistry.addManager(RoleServicePlatformHelper.class,
|
||||
new RoleServicePlatformHelperImpl(mSystemContext));
|
||||
mSystemServiceManager.startService(ROLE_SERVICE_CLASS);
|
||||
t.traceEnd();
|
||||
|
||||
// We need to always start this service, regardless of whether the
|
||||
// FEATURE_VOICE_RECOGNIZERS feature is set, because it needs to take care
|
||||
// of initializing various settings. It will internally modify its behavior
|
||||
|
||||
Reference in New Issue
Block a user