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

Commit d0432b2d authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Adding a drag flag to make drag shadow opaque."

parents 2e93eba5 0e95bc4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36377,6 +36377,7 @@ package android.view {
    field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0
    field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1
    field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA;
    field public static final int DRAG_FLAG_OPAQUE = 512; // 0x200
    field public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
    field public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
    field public static final int DRAWING_CACHE_QUALITY_LOW = 524288; // 0x80000
+1 −0
Original line number Diff line number Diff line
@@ -38687,6 +38687,7 @@ package android.view {
    field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0
    field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1
    field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA;
    field public static final int DRAG_FLAG_OPAQUE = 512; // 0x200
    field public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
    field public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
    field public static final int DRAWING_CACHE_QUALITY_LOW = 524288; // 0x80000
+7 −0
Original line number Diff line number Diff line
@@ -3593,6 +3593,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    public static final int DRAG_FLAG_GLOBAL = 1;
    /**
     * Flag indicating that the drag shadow will be opaque.  When
     * {@link #startDrag(ClipData, DragShadowBuilder, Object, int)} is called
     * with this flag set, the drag shadow will be opaque, otherwise, it will be semitransparent.
     */
    public static final int DRAG_FLAG_OPAQUE = 1 << 9;
    /**
     * Vertical scroll factor cached by {@link #getVerticalScrollFactor}.
     */
+0 −1
Original line number Diff line number Diff line
@@ -334,7 +334,6 @@ final class Session extends IWindowSession.Stub
            try {
                surfaceControl.setPosition(touchX - thumbCenterX,
                        touchY - thumbCenterY);
                surfaceControl.setAlpha(.7071f);
                surfaceControl.setLayer(mService.mDragState.getDragLayerLw());
                surfaceControl.setLayerStack(display.getLayerStack());
                surfaceControl.show();
+5 −0
Original line number Diff line number Diff line
@@ -7482,9 +7482,14 @@ public class WindowManagerService extends IWindowManager.Stub
                        // TODO(multi-display): support other displays
                        final DisplayContent displayContent = getDefaultDisplayContentLocked();
                        final Display display = displayContent.getDisplay();

                        SurfaceControl surface = new SurfaceControl(session, "drag surface",
                                width, height, PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
                        surface.setLayerStack(display.getLayerStack());
                        if ((flags & View.DRAG_FLAG_OPAQUE) == 0) {
                            surface.setAlpha(.7071f);
                        }

                        if (SHOW_TRANSACTIONS) Slog.i(TAG, "  DRAG "
                                + surface + ": CREATE");
                        outSurface.copyFrom(surface);