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

Commit 9449efd8 authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Clean up predictive_back_ime flag" into main

parents 54016404 5eabba90
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ import static android.view.inputmethod.Flags.FLAG_CONNECTIONLESS_HANDWRITING;
import static android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API;
import static android.view.inputmethod.Flags.FLAG_VERIFY_KEY_EVENT;
import static android.view.inputmethod.Flags.ctrlShiftShortcut;
import static android.view.inputmethod.Flags.predictiveBackIme;

import android.annotation.CallSuper;
import android.annotation.DrawableRes;
@@ -3189,11 +3188,11 @@ public class InputMethodService extends AbstractInputMethodService {
            return;
        }
        if (mWindow != null) {
            if (getApplicationInfo().isOnBackInvokedCallbackEnabled() && predictiveBackIme()) {
            if (getApplicationInfo().isOnBackInvokedCallbackEnabled()) {
                // Register the compat callback as system-callback if IME has opted in for
                // predictive back (and predictiveBackIme feature flag is enabled). This indicates
                // to the receiving process (application process) that a predictive IME dismiss
                // animation may be played instead of invoking the callback.
                // predictive back. This indicates to the receiving process (application process)
                // that a predictive IME dismiss animation may be played instead of invoking the
                // callback.
                mWindow.getOnBackInvokedDispatcher().registerSystemOnBackInvokedCallback(
                        mCompatBackCallback);
            } else {
+1 −2
Original line number Diff line number Diff line
@@ -66,8 +66,7 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer {
                        mController.getHost().getInputMethodManager(), null /* icProto */);
            }
            boolean insetsChanged = false;
            if (Flags.predictiveBackIme() && !running && isShowRequested()
                    && mAnimationState == ANIMATION_STATE_HIDE) {
            if (!running && isShowRequested() && mAnimationState == ANIMATION_STATE_HIDE) {
                // A user controlled hide animation may have ended in the shown state (e.g.
                // cancelled predictive back animation) -> Insets need to be reset to shown.
                insetsChanged |= applyLocalVisibilityOverride();
+0 −8
Original line number Diff line number Diff line
@@ -109,14 +109,6 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "predictive_back_ime"
    namespace: "input_method"
    description: "Predictive back animation for IMEs"
    bug: "322836622"
    is_fixed_read_only: true
}

flag {
    name: "ctrl_shift_shortcut"
    namespace: "input_method"