summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-03-18 02:09:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-18 02:09:37 +0000
commit93bb3969c19bc11cba775ddf337062577a8032d7 (patch)
tree91799a382c98f64aee9f5f5043c27e4f04f96e6b /packages/SystemUI
parent95478f67a459490d2dd6c1fa525c29ef90b34b93 (diff)
parentbb5278b663a0a5b05bf7f8d2dfe27f1aa5f01142 (diff)
downloadframeworks_base-93bb3969c19bc11cba775ddf337062577a8032d7.zip
frameworks_base-93bb3969c19bc11cba775ddf337062577a8032d7.tar.gz
frameworks_base-93bb3969c19bc11cba775ddf337062577a8032d7.tar.bz2
Merge "Fixing issue with cards being rendered under the nav bar after a configuration change due to improperly setting the system insets."
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsService.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java8
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
index 25dd269..485b136 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
@@ -58,12 +58,13 @@ class SystemUIMessageHandler extends Handler {
Bundle data = msg.getData();
Rect windowRect = (Rect) data.getParcelable("windowRect");
Rect systemInsets = (Rect) data.getParcelable("systemInsets");
- RecentsConfiguration.getInstance().updateSystemInsets(systemInsets);
// Create a dummy task stack & compute the rect for the thumbnail to animate to
TaskStack stack = new TaskStack(context);
TaskStackView tsv = new TaskStackView(context, stack);
- tsv.computeRects(windowRect.width(), windowRect.height() - systemInsets.top);
+ // Since the nav bar height is already accounted for in the windowRect, don't pass
+ // in a bottom inset
+ tsv.computeRects(windowRect.width(), windowRect.height() - systemInsets.top, 0);
tsv.boundScroll();
TaskViewTransform transform = tsv.getStackTransform(0);
Rect taskRect = new Rect(transform.rect);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 4ec055e..62cf394 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -428,16 +428,15 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
}
/** Computes the stack and task rects */
- public void computeRects(int width, int height) {
+ public void computeRects(int width, int height, int insetBottom) {
// Note: We let the stack view be the full height because we want the cards to go under the
// navigation bar if possible. However, the stack rects which we use to calculate
// max scroll, etc. need to take the nav bar into account
// Compute the stack rects
- RecentsConfiguration config = RecentsConfiguration.getInstance();
mRect.set(0, 0, width, height);
mStackRect.set(mRect);
- mStackRect.bottom -= config.systemInsets.bottom;
+ mStackRect.bottom -= insetBottom;
int smallestDimension = Math.min(width, height);
int padding = (int) (Constants.Values.TaskStackView.StackPaddingPct * smallestDimension / 2f);
@@ -466,7 +465,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
" awaitingFirstLayout: " + mAwaitingFirstLayout, Console.AnsiGreen);
// Compute our stack/task rects
- computeRects(width, height);
+ RecentsConfiguration config = RecentsConfiguration.getInstance();
+ computeRects(width, height, config.systemInsets.bottom);
// Debug logging
if (Constants.DebugFlags.UI.MeasureAndLayout) {