From b6c47cd1b443abcfcf4849a0209d4c729589ff67 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 28 Feb 2017 17:18:29 -0800 Subject: [PATCH] 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 --- .../core/java/com/android/server/wm/TaskStack.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java index 34e99a6e64c57..b79ea71f36192 100644 --- a/services/core/java/com/android/server/wm/TaskStack.java +++ b/services/core/java/com/android/server/wm/TaskStack.java @@ -1425,16 +1425,6 @@ public class TaskStack extends WindowContainer 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) {