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

Commit 2fbfac69 authored by Antonio Kantek's avatar Antonio Kantek
Browse files

Input method codehealth small enhancements

This changelist improves:
* HardwareKeyboardShortcutController.java by removing the unnecessary constructor.
* InputMethodDeviceConfigs.java by avoiding reassigning 'mHideImeWhenNoEditorFocus' on every iteration.
* ZeroJankProxy.java Interrupting the current thread in case of
  InterruptedException.

Bug: 368677912
Test: presubmit
Flag: EXEMPT refactoring
Change-Id: I8a99c65bccb7209029087cedbc47b907e5b97b67
parent dc9932a2
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -33,9 +33,6 @@ final class HardwareKeyboardShortcutController {
    @GuardedBy("ImfLock.class")
    private final ArrayList<InputMethodSubtypeHandle> mSubtypeHandles = new ArrayList<>();

    HardwareKeyboardShortcutController() {
    }

    @GuardedBy("ImfLock.class")
    void update(@NonNull InputMethodSettings settings) {
        mSubtypeHandles.clear();
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ final class InputMethodDeviceConfigs {
                if (KEY_HIDE_IME_WHEN_NO_EDITOR_FOCUS.equals(name)) {
                    mHideImeWhenNoEditorFocus = properties.getBoolean(name,
                            true /* defaultValue */);
                    break;
                }
            }
        };
+1 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@ final class ZeroJankProxy implements IInputMethodManagerImpl.Callback {
                                    flags),
                    this::offload).get();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new RuntimeException(e);
        } catch (ExecutionException e) {
            throw new RuntimeException(e);