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

Commit f57fbff1 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Add dumping information to ImeBackAnimationController

Bug: 322836622
Flag: android.view.inputmethod.predictive_back_ime STAGING
Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService "$@"
Change-Id: Ib379def6142c4c1142531f910a1dc7aa316338c8
parent 2ff61aaf
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ import android.window.OnBackAnimationCallback;

import com.android.internal.inputmethod.SoftInputShowHideReason;

import java.io.PrintWriter;

/**
 * Controller for IME predictive back animation
 *
@@ -271,4 +273,24 @@ public class ImeBackAnimationController implements OnBackAnimationCallback {
        return mPostCommitAnimator != null && mTriggerBack;
    }

    /**
     * Dump information about this ImeBackAnimationController
     *
     * @param prefix the prefix that will be prepended to each line of the produced output
     * @param writer the writer that will receive the resulting text
     */
    public void dump(String prefix, PrintWriter writer) {
        final String innerPrefix = prefix + "    ";
        writer.println(prefix + "ImeBackAnimationController:");
        writer.println(innerPrefix + "mLastProgress=" + mLastProgress);
        writer.println(innerPrefix + "mTriggerBack=" + mTriggerBack);
        writer.println(innerPrefix + "mIsPreCommitAnimationInProgress="
                + mIsPreCommitAnimationInProgress);
        writer.println(innerPrefix + "mStartRootScrollY=" + mStartRootScrollY);
        writer.println(innerPrefix + "isBackAnimationAllowed=" + isBackAnimationAllowed());
        writer.println(innerPrefix + "isAdjustPan=" + isAdjustPan());
        writer.println(innerPrefix + "isHideAnimationInProgress="
                + isHideAnimationInProgress());
    }

}
+5 −2
Original line number Diff line number Diff line
@@ -1799,8 +1799,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    }

    void dump(String prefix, PrintWriter pw) {
        pw.print(prefix); pw.println("InsetsController:");
        mState.dump(prefix + "  ", pw);
        final String innerPrefix = prefix + "    ";
        pw.println(prefix + "InsetsController:");
        mState.dump(innerPrefix, pw);
        pw.println(innerPrefix + "mIsPredictiveBackImeHideAnimInProgress="
                + mIsPredictiveBackImeHideAnimInProgress);
    }

    void dumpDebug(ProtoOutputStream proto, long fieldId) {
+2 −0
Original line number Diff line number Diff line
@@ -9579,6 +9579,8 @@ public final class ViewRootImpl implements ViewParent,
        mOnBackInvokedDispatcher.dump(prefix, writer);
        mImeBackAnimationController.dump(prefix, writer);
        writer.println(prefix + "View Hierarchy:");
        dumpViewHierarchy(innerPrefix, writer, mView);
    }