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

Commit 12b6990c authored by Wu Ahan's avatar Wu Ahan Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980305

Change-Id: I15d9d8dda8b7cc34428bd98002a3e11206ed7dc2
parents 46e567fb b716e344
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;
    }