Merge "Propagate UIDs for all SurfaceControl instances" into oc-dev
am: 6c34dd58f6
Change-Id: Ia3aa4d9537f141a3132afefbcdac5b0bda61722b
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user