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

Commit d638a60a authored by Pascal Mütschard's avatar Pascal Mütschard Committed by Android (Google) Code Review
Browse files

Revert "Input latency & reliability tracking - hide flow"

Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: I0d0ce41e3a4f0d19ff482c2f5ab4884b5f758134
parent 553cb171
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -234,13 +234,9 @@ class IInputMethodWrapper extends IInputMethod.Stub
            }
            case DO_HIDE_SOFT_INPUT: {
                final SomeArgs args = (SomeArgs) msg.obj;
                final ImeTracker.Token statsToken = (ImeTracker.Token) args.arg3;
                if (isValid(inputMethod, target, "DO_HIDE_SOFT_INPUT")) {
                    ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                    inputMethod.hideSoftInputWithToken(msg.arg1, (ResultReceiver) args.arg2,
                            (IBinder) args.arg1, statsToken);
                } else {
                    ImeTracker.get().onFailed(statsToken, ImeTracker.PHASE_IME_WRAPPER_DISPATCH);
                            (IBinder) args.arg1);
                }
                args.recycle();
                return;
@@ -435,11 +431,9 @@ class IInputMethodWrapper extends IInputMethod.Stub

    @BinderThread
    @Override
    public void hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken,
            int flags, ResultReceiver resultReceiver) {
        ImeTracker.get().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
        mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_HIDE_SOFT_INPUT,
                flags, hideInputToken, resultReceiver, statsToken));
    public void hideSoftInput(IBinder hideInputToken, int flags, ResultReceiver resultReceiver) {
        mCaller.executeOrSendMessage(mCaller.obtainMessageIOO(DO_HIDE_SOFT_INPUT,
                flags, hideInputToken, resultReceiver));
    }

    @BinderThread
+7 −8
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ public class InputMethodService extends AbstractInputMethodService {
     */
    private IBinder mCurHideInputToken;

    /** The token tracking the current IME request or {@code null} otherwise. */
    /** The token tracking the current IME show request or {@code null} otherwise. */
    @Nullable
    private ImeTracker.Token mCurStatsToken;

@@ -875,12 +875,10 @@ public class InputMethodService extends AbstractInputMethodService {
        @MainThread
        @Override
        public void hideSoftInputWithToken(int flags, ResultReceiver resultReceiver,
                IBinder hideInputToken, @Nullable ImeTracker.Token statsToken) {
                IBinder hideInputToken) {
            mSystemCallingHideSoftInput = true;
            mCurHideInputToken = hideInputToken;
            mCurStatsToken = statsToken;
            hideSoftInput(flags, resultReceiver);
            mCurStatsToken = null;
            mCurHideInputToken = null;
            mSystemCallingHideSoftInput = false;
        }
@@ -891,7 +889,6 @@ public class InputMethodService extends AbstractInputMethodService {
        @MainThread
        @Override
        public void hideSoftInput(int flags, ResultReceiver resultReceiver) {
            ImeTracker.get().onProgress(mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
            if (DEBUG) Log.v(TAG, "hideSoftInput()");
            if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R
                    && !mSystemCallingHideSoftInput) {
@@ -933,9 +930,9 @@ public class InputMethodService extends AbstractInputMethodService {
            try {
                showSoftInput(flags, resultReceiver);
            } finally {
                mCurStatsToken = null;
                mCurShowInputToken = null;
                mSystemCallingShowSoftInput = false;
                mCurStatsToken = null;
            }
        }

@@ -2942,8 +2939,10 @@ public class InputMethodService extends AbstractInputMethodService {
        ImeTracing.getInstance().triggerServiceDump(
                "InputMethodService#applyVisibilityInInsetsConsumerIfNecessary", mDumper,
                null /* icProto */);
        if (setVisible) {
            ImeTracker.get().onProgress(mCurStatsToken,
                    ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER);
        }
        mPrivOps.applyImeVisibilityAsync(setVisible
                ? mCurShowInputToken : mCurHideInputToken, setVisible, mCurStatsToken);
    }
+1 −1
Original line number Diff line number Diff line
@@ -54,5 +54,5 @@ oneway interface IDisplayWindowInsetsController {
    /**
     * @see IWindow#hideInsets
     */
    void hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken);
    void hideInsets(int types, boolean fromIme);
}
+1 −2
Original line number Diff line number Diff line
@@ -78,9 +78,8 @@ oneway interface IWindow {
     *
     * @param types internal insets types (WindowInsets.Type.InsetsType) to hide
     * @param fromIme true if this request originated from IME (InputMethodService).
     * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
     */
    void hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken);
    void hideInsets(int types, boolean fromIme);

    void moved(int newX, int newY);
    void dispatchAppVisibility(boolean visible);
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public interface InsetsAnimationControlRunner {
    @AnimationType int getAnimationType();

    /**
     * @return The token tracking the current IME request or {@code null} otherwise.
     * @return The token tracking the current IME show request or {@code null} otherwise.
     */
    @Nullable
    ImeTracker.Token getStatsToken();
Loading