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

Commit ad62b78f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add trace for mirrorSurfaceControl" into main

parents 6208d594 25a39913
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2659,10 +2659,11 @@ public abstract class WallpaperService extends Service {
            if (mEngine == null || mEngine.mSurfaceControl == null) {
                return null;
            }
            Trace.beginSection("WPMS.mirrorSurfaceControl");
            try {
                CompletableFuture<SurfaceControl> futureResult = new CompletableFuture<>();
                Message msg = mCaller.obtainMessageO(MSG_MIRROR_SURFACE_CONTROL, futureResult);
                mCaller.sendMessage(msg);
            try {
                return futureResult.get(5, TimeUnit.SECONDS);
            } catch (InterruptedException | ExecutionException e) {
                Log.e(TAG, "mirrorSurfaceControl failed with an exception: ", e);
@@ -2670,6 +2671,8 @@ public abstract class WallpaperService extends Service {
            } catch (TimeoutException e) {
                Log.e(TAG, "mirrorSurfaceControl timed out", e);
                return null;
            } finally {
                Trace.endSection();
            }
        }