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

Commit 5d908ab4 authored by Santos Cordon's avatar Santos Cordon
Browse files

Log each time the layer stack changes for DisplayDevice.

Test: Manually note change in logcat.
Bug: 258910717
Change-Id: I2dc91f6c40afb91b3f0187c09be3c6639ae739b5
parent 99dc404b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.display.DisplayViewport;
import android.os.IBinder;
import android.util.Slog;
import android.view.Display;
import android.view.DisplayAddress;
import android.view.Surface;
@@ -37,6 +38,7 @@ import java.io.PrintWriter;
 * </p>
 */
abstract class DisplayDevice {
    private static final String TAG = "DisplayDevice";
    private static final Display.Mode EMPTY_DISPLAY_MODE = new Display.Mode.Builder().build();

    private final DisplayAdapter mDisplayAdapter;
@@ -266,10 +268,13 @@ abstract class DisplayDevice {
    /**
     * Sets the display layer stack while in a transaction.
     */
    public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack) {
    public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack,
            int layerStackTag) {
        if (mCurrentLayerStack != layerStack) {
            mCurrentLayerStack = layerStack;
            t.setDisplayLayerStack(mDisplayToken, layerStack);
            Slog.i(TAG, "[" + layerStackTag + "] Layerstack set to " + layerStack + " for "
                    + mUniqueId);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ final class LogicalDisplay {
            DisplayDevice device,
            boolean isBlanked) {
        // Set the layer stack.
        device.setLayerStackLocked(t, isBlanked ? BLANK_LAYER_STACK : mLayerStack);
        device.setLayerStackLocked(t, isBlanked ? BLANK_LAYER_STACK : mLayerStack, mDisplayId);
        // Also inform whether the device is the same one sent to inputflinger for its layerstack.
        // Prevent displays that are disabled from receiving input.
        // TODO(b/188914255): Remove once input can dispatch against device vs layerstack.