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

Commit fb7fe7aa authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Use existing async handler for IMMS.MyPackageMonitor

This is a follow up CL to my previous CL [1], which made

  InputMethodManagerService#mMyPackageMonitor

use

  InputMethodManagerService#mHandler.getLooper().

One thing I overlooked is that

  PackageMonitor#register(Context, Looper, UserHandle, boolean)

internally creates a new (non-async) Handler instance, while we
already have an async Handler in

  InputMethodManagerService#mHandler.

Let's just pass the existing handler for potentially better
performance and simplicity.

There must be no observable behavior difference.

 [1]: I1ed05d753ca72326aeb5eaf7b402f0d280ed5dc8
      f5ae5353

Bug: 309837937
Bug: 327861441
Test: presubmit
Change-Id: I033d47ca66be3eaf541b581152f7683c98bd5352
parent 53ce8719
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1932,7 +1932,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                    }
                }, "Lazily initialize IMMS#mImeDrawsImeNavBarRes");

                mMyPackageMonitor.register(mContext, mHandler.getLooper(), UserHandle.ALL, true);
                mMyPackageMonitor.register(mContext, UserHandle.ALL, mHandler);
                mSettingsObserver.registerContentObserverLocked(currentUserId);

                final IntentFilter broadcastFilterForAllUsers = new IntentFilter();