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

Commit b4ca2011 authored by Shawn Lin's avatar Shawn Lin Committed by Android (Google) Code Review
Browse files

Merge changes from topic "screen_decor" into tm-d1-dev

* changes:
  Fix flickering when rapidly switch resolutions
  Revert change "Change Rounded corner overlay to be in Overlay layer" Revert CL ag/18494304
parents 9e34a19e 7ea6094f
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@ import android.view.InputWindowHandle;
import android.view.SurfaceControl;
import android.view.WindowManager;

import com.android.server.policy.WindowManagerPolicy;

/**
 * An internal implementation of an {@link InputMonitor} that uses a spy window.
 *
@@ -69,9 +67,7 @@ class GestureMonitorSpyWindow {

        final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
        t.setInputWindowInfo(mInputSurface, mWindowHandle);
        // Gesture monitor should be above handwriting event surface, hence setting it to
        // WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1
        t.setLayer(mInputSurface, WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1);
        t.setLayer(mInputSurface, Integer.MAX_VALUE);
        t.setPosition(mInputSurface, 0, 0);
        t.setCrop(mInputSurface, null /* crop to parent surface */);
        t.show(mInputSurface);
+1 −4
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@ import android.view.InputWindowHandle;
import android.view.SurfaceControl;
import android.view.WindowManager;

import com.android.server.policy.WindowManagerPolicy;

final class HandwritingEventReceiverSurface {

    public static final String TAG = HandwritingEventReceiverSurface.class.getSimpleName();
@@ -38,8 +36,7 @@ final class HandwritingEventReceiverSurface {
    // is above gesture monitors, then edge-back and swipe-up gestures won't work when this surface
    // is intercepting.
    // TODO(b/217538817): Specify the ordering in WM by usage.
    private static final int HANDWRITING_SURFACE_LAYER =
            WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER;
    private static final int HANDWRITING_SURFACE_LAYER = Integer.MAX_VALUE - 1;

    private final InputWindowHandle mWindowHandle;
    private final InputChannel mClientChannel;
+0 −4
Original line number Diff line number Diff line
@@ -156,10 +156,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
    int FINISH_LAYOUT_REDO_ANIM = 0x0008;
    /** Layer for the screen off animation */
    int COLOR_FADE_LAYER = 0x40000001;
    /** Layer for Input overlays for capturing inputs for gesture detection, etc. */
    int INPUT_DISPLAY_OVERLAY_LAYER = 0x7f000000;
    /** Layer for Screen Decoration: The top most visible layer just below input overlay layers */
    int SCREEN_DECOR_DISPLAY_OVERLAY_LAYER = INPUT_DISPLAY_OVERLAY_LAYER - 1;

    /**
     * Register shortcuts for window manager to dispatch.
+4 −3
Original line number Diff line number Diff line
@@ -3233,10 +3233,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    public void setRotationAnimation(ScreenRotationAnimation screenRotationAnimation) {
        if (mScreenRotationAnimation != null) {
            mScreenRotationAnimation.kill();
        }
        final ScreenRotationAnimation prev = mScreenRotationAnimation;
        mScreenRotationAnimation = screenRotationAnimation;
        if (prev != null) {
            prev.kill();
        }

        // Hide the windows which are not significant in rotation animation. So that the windows
        // don't need to block the unfreeze time.
+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ final class InputManagerCallback implements InputManagerService.WindowManagerCal
                    .setContainerLayer()
                    .setName(name)
                    .setCallsite("createSurfaceForGestureMonitor")
                    .setParent(dc.getOverlayLayer())
                    .setParent(dc.getSurfaceControl())
                    .build();
        }
    }
Loading