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

Commit 09cd5ea5 authored by Tenghui Zhu's avatar Tenghui Zhu Committed by android-build-merger
Browse files

Merge "Merge "Update the light center when the root view\'s layout changed"...

Merge "Merge "Update the light center when the root view\'s layout changed" into nyc-dev am: e78ba24c am: 56d4dae9" into nyc-mr1-dev-plus-aosp
am: d09ad72e

* commit 'd09ad72e':
  Update the light center when the root view's layout changed

Change-Id: Ifb58bf9a0a0e3b11d9c59d2c04218d63c294f0ae
parents 95deb033 d09ad72e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -22857,6 +22857,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
         */
        boolean mKeepScreenOn;
        /**
         * Set during a traveral if the light center needs to be updated.
         */
        boolean mNeedsUpdateLightCenter;
        /**
         * Bitwise-or of all of the values that views have passed to setSystemUiVisibility().
         */
+10 −3
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ import android.view.accessibility.IAccessibilityInteractionConnection;
import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.widget.Scroller;

@@ -928,6 +927,11 @@ public final class ViewRootImpl implements ViewParent,
                // Recompute system ui visibility.
                mAttachInfo.mRecomputeGlobalAttributes = true;
            }
            if ((mWindowAttributesChangesFlag
                    & WindowManager.LayoutParams.LAYOUT_CHANGED) != 0) {
                // Request to update light center.
                mAttachInfo.mNeedsUpdateLightCenter = true;
            }
            if (mWindowAttributes.packageName == null) {
                mWindowAttributes.packageName = mBasePackageName;
            }
@@ -2234,13 +2238,16 @@ public final class ViewRootImpl implements ViewParent,
            }
            mAttachInfo.mWindowLeft = frame.left;
            mAttachInfo.mWindowTop = frame.top;

            // Update the light position for the new window offsets.
        }
        if (windowMoved || mAttachInfo.mNeedsUpdateLightCenter) {
            // Update the light position for the new offsets.
            if (mAttachInfo.mHardwareRenderer != null) {
                mAttachInfo.mHardwareRenderer.setLightCenter(mAttachInfo);
            }
            mAttachInfo.mNeedsUpdateLightCenter = false;
        }
    }

    private void handleOutOfResourcesException(Surface.OutOfResourcesException e) {
        Log.e(mTag, "OutOfResourcesException initializing HW surface", e);
        try {