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

Commit f35d43f9 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 2dc9c784: Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb

* commit '2dc9c784':
  Fix issue #3382992: IME close animation stutters from URL bar
parents 796f1af0 2dc9c784
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -11398,6 +11398,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
        }
    }

    /** @hide */
    public void hackTurnOffWindowResizeAnim(boolean off) {
        mAttachInfo.mTurnOffWindowResizeAnim = off;
    }
    
    /**
     * Interface definition for a callback to be invoked when a key event is
     * dispatched to this view. The callback will be invoked before the key
@@ -11663,6 +11668,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
         */
        boolean mScalingRequired;

        /**
         * If set, ViewRoot doesn't use its lame animation for when the window resizes.
         */
        boolean mTurnOffWindowResizeAnim;
        
        /**
         * Left position of this view's window
         */
+1 −0
Original line number Diff line number Diff line
@@ -772,6 +772,7 @@ public final class ViewRoot extends Handler implements ViewParent,
                if (!mAttachInfo.mContentInsets.equals(mPendingContentInsets)) {
                    if (mWidth > 0 && mHeight > 0 &&
                            mSurface != null && mSurface.isValid() &&
                            !mAttachInfo.mTurnOffWindowResizeAnim &&
                            mAttachInfo.mHardwareRenderer != null &&
                            mAttachInfo.mHardwareRenderer.isEnabled() &&
                            lp != null && !PixelFormat.formatHasAlpha(lp.format)) {
+16 −0
Original line number Diff line number Diff line
@@ -2026,6 +2026,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
        }

        @Override
        public void setBackgroundDrawable(Drawable d) {
            super.setBackgroundDrawable(d);
            if (getWindowToken() != null) {
                updateWindowResizeState();
            }
        }

        public void setWindowFrame(Drawable drawable) {
            if (getForeground() != drawable) {
                setForeground(drawable);
@@ -2126,10 +2134,18 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
        }

        void updateWindowResizeState() {
            Drawable bg = getBackground();
            hackTurnOffWindowResizeAnim(bg == null || bg.getOpacity()
                    != PixelFormat.OPAQUE);
        }
        
        @Override
        protected void onAttachedToWindow() {
            super.onAttachedToWindow();
            
            updateWindowResizeState();
            
            final Callback cb = getCallback();
            if (cb != null && mFeatureId < 0) {
                cb.onAttachedToWindow();