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
This commit is contained in:
Robert Carr
2017-02-28 17:18:29 -08:00
parent b70ef8d79b
commit b6c47cd1b4

View File

@@ -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) {