Add InputMethodBindingController#getSelectedMethod()

This is a preparation before making

  InputMethodManagerService#mSwitchingController

per-user.

The following code is often used in InputMethodManagerService.

  final var settings =
     InputMethodSettingsRepository.get(userId);
  final var imi =
     settings.getMethodMap().get(getSelectedMethodIdLocked());

Let's add a utility method to InputMethodBindingController so that we
can avoid the above common code.

This is a mechanical refactoring CL. There must be no observable
behavior change.

Bug: 305849394
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I0eda340a55141617a7a5c2642e7bebbfe71e71f9
2 files changed