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

Commit b716e344 authored by Wu Ahan's avatar Wu Ahan Committed by Android (Google) Code Review
Browse files

Merge "Log event logs about wallpaper surface request visibility" into tm-dev

parents 215136fd 1a2749a1
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;
    }