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

Commit b6c47cd1 authored by Robert Carr's avatar Robert Carr
Browse files

Pinned animation: Avoid expensive defensive programming.

Sys-trace revealed contention here as the overwhelming
cause of missed frames during the animation (typically contention
with relayout). The checks aren't necessary, and there is a visible
gain from removing the contention here.

Bug: 35396882
Test: Manual
Change-Id: I5151c603ac445c7832c9c499b663e5b9ec54e9f4
parent b70ef8d7
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1425,16 +1425,6 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
    }

    public boolean setPinnedStackSize(Rect bounds, Rect tempTaskBounds) {
        synchronized (mService.mWindowMap) {
            if (mDisplayContent == null) {
                return false;
            }
            if (mStackId != PINNED_STACK_ID) {
                Slog.w(TAG_WM, "Attempt to use pinned stack resize animation helper on"
                        + "non pinned stack");
                return false;
            }
        }
        try {
            mService.mActivityManager.resizePinnedStack(bounds, tempTaskBounds);
        } catch (RemoteException e) {