Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −5 Original line number Diff line number Diff line Loading @@ -1406,16 +1406,13 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. final String defaultImiId = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_INPUT_METHOD, null, currentUserId); final boolean imeSelectedOnBoot = !TextUtils.isEmpty(defaultImiId); final InputMethodSettings newSettings = queryInputMethodServicesInternal(mContext, currentUserId, AdditionalSubtypeMapRepository.get(currentUserId), DirectBootAwareness.AUTO); InputMethodSettingsRepository.put(currentUserId, newSettings); final var settings = InputMethodSettingsRepository.get(currentUserId); postInputMethodSettingUpdatedLocked( !imeSelectedOnBoot /* resetDefaultEnabledIme */, currentUserId); updateFromSettingsLocked(true, currentUserId); InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed( getPackageManagerForUser(mContext, currentUserId), newSettings.getEnabledInputMethodList()); settings.getEnabledInputMethodList()); AdditionalSubtypeMapRepository.startWriterThread(); Loading services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java +11 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.window.ImeOnBackInvokedDispatcher; import androidx.test.platform.app.InstrumentationRegistry; import com.android.internal.compat.IPlatformCompat; import com.android.internal.inputmethod.DirectBootAwareness; import com.android.internal.inputmethod.IInputMethod; import com.android.internal.inputmethod.IInputMethodClient; import com.android.internal.inputmethod.IInputMethodSession; Loading Loading @@ -269,8 +270,15 @@ public class InputMethodManagerServiceTestBase { LocalServices.removeServiceForTest(InputMethodManagerInternal.class); lifecycle.onStart(); // Emulate that the user initialization is done. // Certain tests rely on TEST_IME_ID that is installed with AndroidTest.xml. // TODO(b/352615651): Consider just synthesizing test InputMethodInfo then injecting it. AdditionalSubtypeMapRepository.ensureInitializedAndGet(mCallingUserId); final var settings = InputMethodManagerService.queryInputMethodServicesInternal(mContext, mCallingUserId, AdditionalSubtypeMapRepository.get(mCallingUserId), DirectBootAwareness.AUTO); InputMethodSettingsRepository.put(mCallingUserId, settings); // Emulate that the user initialization is done. mInputMethodManagerService.getUserData(mCallingUserId).mBackgroundLoadLatch.countDown(); // After this boot phase, services can broadcast Intents. Loading @@ -283,6 +291,8 @@ public class InputMethodManagerServiceTestBase { @After public void tearDown() { InputMethodSettingsRepository.remove(mCallingUserId); if (mInputMethodManagerService != null) { mInputMethodManagerService.mInputMethodDeviceConfigs.destroy(); } Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −5 Original line number Diff line number Diff line Loading @@ -1406,16 +1406,13 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. final String defaultImiId = SecureSettingsWrapper.getString( Settings.Secure.DEFAULT_INPUT_METHOD, null, currentUserId); final boolean imeSelectedOnBoot = !TextUtils.isEmpty(defaultImiId); final InputMethodSettings newSettings = queryInputMethodServicesInternal(mContext, currentUserId, AdditionalSubtypeMapRepository.get(currentUserId), DirectBootAwareness.AUTO); InputMethodSettingsRepository.put(currentUserId, newSettings); final var settings = InputMethodSettingsRepository.get(currentUserId); postInputMethodSettingUpdatedLocked( !imeSelectedOnBoot /* resetDefaultEnabledIme */, currentUserId); updateFromSettingsLocked(true, currentUserId); InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed( getPackageManagerForUser(mContext, currentUserId), newSettings.getEnabledInputMethodList()); settings.getEnabledInputMethodList()); AdditionalSubtypeMapRepository.startWriterThread(); Loading
services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java +11 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.window.ImeOnBackInvokedDispatcher; import androidx.test.platform.app.InstrumentationRegistry; import com.android.internal.compat.IPlatformCompat; import com.android.internal.inputmethod.DirectBootAwareness; import com.android.internal.inputmethod.IInputMethod; import com.android.internal.inputmethod.IInputMethodClient; import com.android.internal.inputmethod.IInputMethodSession; Loading Loading @@ -269,8 +270,15 @@ public class InputMethodManagerServiceTestBase { LocalServices.removeServiceForTest(InputMethodManagerInternal.class); lifecycle.onStart(); // Emulate that the user initialization is done. // Certain tests rely on TEST_IME_ID that is installed with AndroidTest.xml. // TODO(b/352615651): Consider just synthesizing test InputMethodInfo then injecting it. AdditionalSubtypeMapRepository.ensureInitializedAndGet(mCallingUserId); final var settings = InputMethodManagerService.queryInputMethodServicesInternal(mContext, mCallingUserId, AdditionalSubtypeMapRepository.get(mCallingUserId), DirectBootAwareness.AUTO); InputMethodSettingsRepository.put(mCallingUserId, settings); // Emulate that the user initialization is done. mInputMethodManagerService.getUserData(mCallingUserId).mBackgroundLoadLatch.countDown(); // After this boot phase, services can broadcast Intents. Loading @@ -283,6 +291,8 @@ public class InputMethodManagerServiceTestBase { @After public void tearDown() { InputMethodSettingsRepository.remove(mCallingUserId); if (mInputMethodManagerService != null) { mInputMethodManagerService.mInputMethodDeviceConfigs.destroy(); } Loading