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

Commit bcee3cc3 authored by Albert Chaulk's avatar Albert Chaulk Committed by android-build-merger
Browse files

Merge "Propagate UIDs for all SurfaceControl instances" into oc-dev am: 6c34dd58

am: eccbbe4c

Change-Id: I350bb7899eaa1e9919d6fdf8079afd11be4e9918
parents c4d6ea41 eccbbe4c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -16,10 +16,13 @@

package android.view;

import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE;

import android.graphics.Bitmap;
import android.graphics.GraphicBuffer;
import android.graphics.Rect;
import android.graphics.Region;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;
import android.view.Surface.OutOfResourcesException;
@@ -302,7 +305,7 @@ public class SurfaceControl {
    public SurfaceControl(SurfaceSession session,
            String name, int w, int h, int format, int flags)
                    throws OutOfResourcesException {
        this(session, name, w, h, format, flags, null, -1, -1);
        this(session, name, w, h, format, flags, null, INVALID_WINDOW_TYPE, Binder.getCallingUid());
    }

    public SurfaceControl(SurfaceSession session, String name, int w, int h, int format, int flags,
+6 −0
Original line number Diff line number Diff line
@@ -742,6 +742,12 @@ public interface WindowManager extends ViewManager {
         */
        public static final int LAST_SYSTEM_WINDOW      = 2999;

        /**
         * @hide
         * Used internally when there is no suitable type available.
         */
        public static final int INVALID_WINDOW_TYPE = -1;

        /**
         * Return true if the window type is an alert window.
         *
+4 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.Binder;
import android.os.Debug;
import android.os.Trace;
import android.util.ArraySet;
@@ -683,9 +684,11 @@ class WindowSurfacePlacer {
            final DisplayInfo displayInfo = displayContent.getDisplayInfo();

            // Create a new surface for the thumbnail
            WindowState window = appToken.findMainWindow();
            SurfaceControl surfaceControl = new SurfaceControl(mService.mFxSession,
                    "thumbnail anim", dirty.width(), dirty.height(),
                    PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
                    PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN,
                    appToken.windowType, window.mOwnerUid);
            surfaceControl.setLayerStack(display.getLayerStack());
            if (SHOW_TRANSACTIONS) {
                Slog.i(TAG, "  THUMBNAIL " + surfaceControl + ": CREATE");