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

Commit 5b9364b6 authored by Cosmin Băieș's avatar Cosmin Băieș Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add logs for analysing b/297000797"" into main

parents 724b86c4 6c629310
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -685,12 +685,7 @@ public class InputMethodService extends AbstractInputMethodService {
    private ImeTracker.Token mCurStatsToken;

    final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> {
        Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, start info: " + info
                + " before onComputeInsets, tmpInsets: " + mTmpInsets,
                new Throwable());
        onComputeInsets(mTmpInsets);
        Log.i("b/297000797", "IME#OnComputeInternalInsetsListener,"
                + " after onComputeInsets, tmpInsets: " + mTmpInsets);
        if (!mViewsCreated) {
            // The IME views are not ready, keep visible insets untouched.
            mTmpInsets.visibleTopInsets = 0;
@@ -710,7 +705,6 @@ public class InputMethodService extends AbstractInputMethodService {
        }
        mNavigationBarController.updateTouchableInsets(mTmpInsets, info);

        Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, end info: " + info);
        if (mInputFrame != null) {
            setImeExclusionRect(mTmpInsets.visibleTopInsets);
        }
@@ -1469,15 +1463,6 @@ public class InputMethodService extends AbstractInputMethodService {
            proto.write(TOUCHABLE_REGION, touchableRegion.toString());
            proto.end(token);
        }

        @Override
        public String toString() {
            return "Insets{contentTopInsets=" + contentTopInsets
                    + " visibleTopInsets=" + visibleTopInsets
                    + " touchableInsets=" + touchableInsets
                    + " touchableRegion=" + touchableRegion.getBounds()
                    + "}";
        }
    }

    /**
+0 −11
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.inputmethodservice.navigationbar.NavigationBarFrame;
import android.inputmethodservice.navigationbar.NavigationBarView;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -115,8 +114,6 @@ final class NavigationBarController {
    }

    void onNavButtonFlagsChanged(@InputMethodNavButtonFlags int navButtonFlags) {
        Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged: " + navButtonFlags,
                new Throwable());
        mImpl.onNavButtonFlagsChanged(navButtonFlags);
    }

@@ -238,10 +235,6 @@ final class NavigationBarController {

            if (ENABLE_HIDE_IME_CAPTION_BAR) {
                mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> {
                    Log.i("b/297000797", "NavigationBarController#onApplyWindowInsetsListener:"
                            + " mNavigationBarFrame: " + mNavigationBarFrame
                            + " captionBar visible: " + insets.isVisible(captionBar())
                            + " insets: " + insets);
                    if (mNavigationBarFrame != null) {
                        boolean visible = insets.isVisible(captionBar());
                        mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE);
@@ -460,10 +453,6 @@ final class NavigationBarController {
            mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown;

            if (ENABLE_HIDE_IME_CAPTION_BAR) {
                Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged,"
                                + " calling setImeCaptionBarInsetsHeight"
                                + " with: " + getImeCaptionBarHeight(),
                        new Throwable());
                mService.mWindow.getWindow().getDecorView().getWindowInsetsController()
                        .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight());
            }
+0 −2
Original line number Diff line number Diff line
@@ -1856,8 +1856,6 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            return;
        }
        Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom);
        Log.i("b/297000797", "InsetsController#setImeCaptionBarInsetsHeight,"
                + " height: " + height + " frame: " + mFrame);
        InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR);
        if (mImeCaptionBarInsetsHeight != height
                || (source != null && !newFrame.equals(source.getFrame()))) {
+0 −13
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
import android.view.WindowInsets.Type.InsetsType;

@@ -197,12 +196,6 @@ public class InsetsSource implements Parcelable {
     *         source.
     */
    public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) {
        if (getType() == WindowInsets.Type.ime()) {
            Log.i("b/297000797", "InsetsSource#calculateInsets tmpFrame: " + mTmpFrame
                    + " ignoreVisibility: " + ignoreVisibility
                    + " frame: " + mFrame
                    + " relativeFrame: " + relativeFrame, new Throwable());
        }
        return calculateInsets(relativeFrame, mFrame, ignoreVisibility);
    }

@@ -210,12 +203,6 @@ public class InsetsSource implements Parcelable {
     * Like {@link #calculateInsets(Rect, boolean)}, but will return visible insets.
     */
    public Insets calculateVisibleInsets(Rect relativeFrame) {
        if (getType() == WindowInsets.Type.ime()) {
            Log.i("b/297000797", "InsetsSource#calculateVisibleInsets tmpFrame: " + mTmpFrame
                    + " frame: " + mFrame
                    + " visibleFrame: " + mVisibleFrame
                    + " relativeFrame: " + relativeFrame, new Throwable());
        }
        return calculateInsets(relativeFrame, mVisibleFrame != null ? mVisibleFrame : mFrame,
                false /* ignoreVisibility */);
    }
+0 −4
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.util.proto.ProtoOutputStream;
@@ -381,9 +380,6 @@ public class InsetsState implements Parcelable {
            @InternalInsetsSide @Nullable SparseIntArray idSideMap,
            @Nullable boolean[] typeVisibilityMap, Insets insets, int type) {
        int index = indexOf(type);
        if (source.getId() == InsetsSource.ID_IME) {
            Log.i("b/297000797", "InsetsState#processSourceAsPublicType, ime insets: " + insets);
        }

        // Don't put Insets.NONE into typeInsetsMap. Otherwise, two WindowInsets can be considered
        // as non-equal while they provide the same insets of each type from WindowInsets#getInsets
Loading