Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67211026 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove the dependency on SystemServerInitThreadPool from IMMS" into main

parents b42d14a9 6876f8f4
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -176,7 +176,6 @@ import com.android.server.AccessibilityManagerInternal;
import com.android.server.EventLogTags;
import com.android.server.LocalServices;
import com.android.server.ServiceThread;
import com.android.server.SystemServerInitThreadPool;
import com.android.server.SystemService;
import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
import com.android.server.input.InputManagerInternal;
@@ -1390,9 +1389,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                        getPackageManagerForUser(mContext, currentUserId),
                        newSettings.getEnabledInputMethodList());

                final var unused = SystemServerInitThreadPool.submit(
                        AdditionalSubtypeMapRepository::startWriterThread,
                        "Start AdditionalSubtypeMapRepository's writer thread");
                AdditionalSubtypeMapRepository.startWriterThread();

                if (mConcurrentMultiUserModeEnabled) {
                    for (int userId : mUserManagerInternal.getUserIds()) {
+3 −5
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ import com.android.internal.inputmethod.InputBindResult;
import com.android.internal.view.IInputMethodManager;
import com.android.server.LocalServices;
import com.android.server.ServiceThread;
import com.android.server.SystemServerInitThreadPool;
import com.android.server.SystemService;
import com.android.server.input.InputManagerInternal;
import com.android.server.pm.UserManagerInternal;
@@ -161,7 +160,7 @@ public class InputMethodManagerServiceTestBase {
                        .strictness(Strictness.LENIENT)
                        .spyStatic(InputMethodUtils.class)
                        .mockStatic(ServiceManager.class)
                        .mockStatic(SystemServerInitThreadPool.class)
                        .spyStatic(AdditionalSubtypeMapRepository.class)
                        .startMocking();

        mContext = spy(InstrumentationRegistry.getInstrumentation().getContext());
@@ -234,9 +233,8 @@ public class InputMethodManagerServiceTestBase {
        doNothing().when(() -> InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed(
                        any(PackageManager.class), anyList()));

        // Used by lazy initializing draw IMS nav bar at InputMethodManagerService#systemRunning(),
        // which is ok to be mocked out for now.
        doReturn(null).when(() -> SystemServerInitThreadPool.submit(any(), anyString()));
        // The background writer thread in AdditionalSubtypeMapRepository should be stubbed out.
        doNothing().when(AdditionalSubtypeMapRepository::startWriterThread);

        mServiceThread =
                new ServiceThread(