Add config for device specific IMMS

Bug: 245798405
Test: m
Change-Id: I337e2804871ce66553306696d6819b21e3307081
This commit is contained in:
Antonio Kantek
2022-09-08 21:23:05 +00:00
committed by Yuncheol Heo
parent e1309aad17
commit bc0bb0da46
3 changed files with 17 additions and 1 deletions

View File

@@ -1665,7 +1665,18 @@ public final class SystemServer implements Dumpable {
// Bring up services needed for UI.
if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
t.traceBegin("StartInputMethodManagerLifecycle");
mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);
String immsClassName = context.getResources().getString(
R.string.config_deviceSpecificInputMethodManagerService);
if (immsClassName.isEmpty()) {
mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);
} else {
try {
Slog.i(TAG, "Starting custom IMMS: " + immsClassName);
mSystemServiceManager.startService(immsClassName);
} catch (Throwable e) {
reportWtf("starting " + immsClassName, e);
}
}
t.traceEnd();
t.traceBegin("StartAccessibilityManagerService");