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

Commit ee693978 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo
Browse files

Handle cancellation of 3rd party IME explicitly.

When a 3rd party IME is enabled for the first time, a warning dialog is
shown.
The dialog has a cancel button, and it triggers
onSaveInputMethodPreference(). However, when it's cancelled by the back
button, it did not trigger onSaveInputMethodPreference().

It still works as intended on stock Android, but on ARC++ we need the
callback to be always fired every time it's cancelled.

Test: manual
Bug: 112442972
Change-Id: Ibdbaa020957ccd5a77a7fe5c67937edd19b8455f
parent e1a4bdb3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -263,6 +263,10 @@ public class InputMethodPreference extends RestrictedSwitchPreference implements
            // The user canceled to enable a 3rd party IME.
            setCheckedInternal(false);
        });
        builder.setOnCancelListener((dialog) -> {
            // The user canceled to enable a 3rd party IME.
            setCheckedInternal(false);
        });
        mDialog = builder.create();
        mDialog.show();
    }