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

Commit 6365c0e7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Plumb pid to Layer Metadata during Layer creation"

parents 5b3573cf 2bc43dca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -547,6 +547,12 @@ public final class SurfaceControl implements Parcelable {
     */
    public static final int METADATA_ACCESSIBILITY_ID = 5;

    /**
     * owner PID.
     * @hide
     */
    public static final int METADATA_OWNER_PID = 6;

    /**
     * A wrapper around HardwareBuffer that contains extra information about how to
     * interpret the screenshot HardwareBuffer.
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.server.wm;

import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Surface.SCALING_MODE_SCALE_TO_WINDOW;
import static android.view.SurfaceControl.METADATA_OWNER_PID;
import static android.view.SurfaceControl.METADATA_OWNER_UID;
import static android.view.SurfaceControl.METADATA_WINDOW_TYPE;

@@ -105,6 +105,7 @@ class WindowSurfaceController {
                .setFlags(flags)
                .setMetadata(METADATA_WINDOW_TYPE, windowType)
                .setMetadata(METADATA_OWNER_UID, ownerUid)
                .setMetadata(METADATA_OWNER_PID, mWindowSession.mPid)
                .setCallsite("WindowSurfaceController");

        final boolean useBLAST = mService.mUseBLAST && ((win.getAttrs().privateFlags &