From 24251b68f15c503a88bfdcd2faeb34e50a7d6747 Mon Sep 17 00:00:00 2001 From: Winson Date: Mon, 4 Apr 2016 18:45:24 -0700 Subject: [PATCH] Fixing tiny issue with empty state graphic not being centered correctly. - The centering is based on the size not including insets, so it should be offset by the top/left insets. Bug: 28005632 Change-Id: I114bcaadddb0d4777d4c013097c0d1a20e4fab0b --- .../src/com/android/systemui/recents/views/RecentsView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java index e0d048660b966..ef81f9ee28173 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -367,8 +367,10 @@ public class RecentsView extends FrameLayout { int topBottomInsets = mSystemInsets.top + mSystemInsets.bottom; int childWidth = mEmptyView.getMeasuredWidth(); int childHeight = mEmptyView.getMeasuredHeight(); - int childLeft = left + Math.max(0, (right - left - leftRightInsets - childWidth)) / 2; - int childTop = top + Math.max(0, (bottom - top - topBottomInsets - childHeight)) / 2; + int childLeft = left + mSystemInsets.left + + Math.max(0, (right - left - leftRightInsets - childWidth)) / 2; + int childTop = top + mSystemInsets.top + + Math.max(0, (bottom - top - topBottomInsets - childHeight)) / 2; mEmptyView.layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight); }