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

Commit 1a2749a1 authored by Wu Ahan's avatar Wu Ahan
Browse files

Log event logs about wallpaper surface request visibility

Bug: 212940778
Bug: 221194708
Test: See b/221194708
Change-Id: I1911bd25e87eb925f693d0e6db6da6840055f77b
parent 2071ba65
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -65,3 +65,5 @@ option java_package com.android.server.wm
# bootanim finished:
31007 wm_boot_animation_done (time|2|3)

# Request surface flinger to show / hide the wallpaper surface.
33001 wm_wallpaper_surface (Display Id|1|5),(visible|1)
+9 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import static com.android.server.wm.WindowSurfaceControllerProto.SHOWN;

import android.os.Debug;
import android.os.Trace;
import android.util.EventLog;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.SurfaceControl;
@@ -124,6 +125,10 @@ class WindowSurfaceController {
        setShown(false);
        try {
            transaction.hide(mSurfaceControl);
            if (mAnimator.mIsWallpaper) {
                EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
                        mAnimator.mWin.getDisplayId(), 0 /* request hidden */);
            }
        } catch (RuntimeException e) {
            Slog.w(TAG, "Exception hiding surface in " + this);
        }
@@ -249,6 +254,10 @@ class WindowSurfaceController {

        setShown(true);
        t.show(mSurfaceControl);
        if (mAnimator.mIsWallpaper) {
            EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
                    mAnimator.mWin.getDisplayId(), 1 /* request shown */);
        }
        return true;
    }