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

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

Merge "Rename IMMS#mPackageMonitorHandler to mIoHandler" into main

parents 7d916685 662575c1
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
    private final Handler mHandler;

    @NonNull
    private final Handler mPackageMonitorHandler;
    private final Handler mIoHandler;

    @MultiUserUnawareField
    @UserIdInt
@@ -1237,7 +1237,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            Context context,
            boolean experimentalConcurrentMultiUserModeEnabled,
            @Nullable ServiceThread serviceThreadForTesting,
            @Nullable ServiceThread packageMonitorThreadForTesting,
            @Nullable ServiceThread ioThreadForTesting,
            @Nullable IntFunction<InputMethodBindingController> bindingControllerForTesting) {
        synchronized (ImfLock.class) {
            mExperimentalConcurrentMultiUserModeEnabled =
@@ -1258,15 +1258,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            thread.start();
            mHandler = Handler.createAsync(thread.getLooper(), this);
            {
                final ServiceThread packageMonitorThread =
                        packageMonitorThreadForTesting != null
                                ? packageMonitorThreadForTesting
                final ServiceThread ioThread =
                        ioThreadForTesting != null
                                ? ioThreadForTesting
                                : new ServiceThread(
                                        PACKAGE_MONITOR_THREAD_NAME,
                                        Process.THREAD_PRIORITY_FOREGROUND,
                                        true /* allowIo */);
                packageMonitorThread.start();
                mPackageMonitorHandler = Handler.createAsync(packageMonitorThread.getLooper());
                ioThread.start();
                mIoHandler = Handler.createAsync(ioThread.getLooper());
            }
            SystemLocaleWrapper.onStart(context, this::onActionLocaleChanged, mHandler);
            mImeTrackerService = new ImeTrackerService(serviceThreadForTesting != null
@@ -1537,7 +1537,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                    }
                }, "Lazily initialize IMMS#mImeDrawsImeNavBarRes");

                mMyPackageMonitor.register(mContext, UserHandle.ALL, mPackageMonitorHandler);
                mMyPackageMonitor.register(mContext, UserHandle.ALL, mIoHandler);
                mSettingsObserver.registerContentObserverLocked(currentUserId);

                final IntentFilter broadcastFilterForAllUsers = new IntentFilter();
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ final class InputMethodSettingsRepository {
                                    userId,
                                    AdditionalSubtypeMapRepository.get(userId),
                                    DirectBootAwareness.AUTO);
                    sPerUserMap.put(userId, settings);
                    put(userId, settings);
                }
            }
        });
+5 −5
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class InputMethodManagerServiceTestBase {
    protected IInputMethodInvoker mMockInputMethodInvoker;
    protected InputMethodManagerService mInputMethodManagerService;
    protected ServiceThread mServiceThread;
    protected ServiceThread mPackageMonitorThread;
    protected ServiceThread mIoThread;
    protected boolean mIsLargeScreen;
    private InputManagerGlobal.TestSession mInputManagerGlobalSession;

@@ -226,14 +226,14 @@ public class InputMethodManagerServiceTestBase {
                        "immstest1",
                        Process.THREAD_PRIORITY_FOREGROUND,
                        true /* allowIo */);
        mPackageMonitorThread =
        mIoThread =
                new ServiceThread(
                        "immstest2",
                        Process.THREAD_PRIORITY_FOREGROUND,
                        true /* allowIo */);
        mInputMethodManagerService = new InputMethodManagerService(mContext,
                InputMethodManagerService.shouldEnableExperimentalConcurrentMultiUserMode(mContext),
                mServiceThread, mPackageMonitorThread,
                mServiceThread, mIoThread,
                unusedUserId -> mMockInputMethodBindingController);
        spyOn(mInputMethodManagerService);

@@ -267,8 +267,8 @@ public class InputMethodManagerServiceTestBase {
            mInputMethodManagerService.mInputMethodDeviceConfigs.destroy();
        }

        if (mPackageMonitorThread != null) {
            mPackageMonitorThread.quitSafely();
        if (mIoThread != null) {
            mIoThread.quitSafely();
        }

        if (mServiceThread != null) {