summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matthew Ng <ngmatthew@google.com> 2017-09-01 01:46:24 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-01 01:46:24 +0000
commit9e7fdeb3474032df8c025cedb22869f6280179fc (patch)
tree1b62dc7ec0bf0ebdad6664cf04d7db1523dd99db
parent04e7d1fa208e8062d86d56f9846b63337e3fd2d3 (diff)
parent7673a55f3ed47d28152153759a0bd9e4771d6150 (diff)
Merge "Fixes TaskStackLayoutAlgorithm log errors when window rect is empty" into oc-mr1-dev
am: 7673a55f3e Change-Id: Ic89dad11832a55111b8be425ab3a1b53c8ebafa3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
index c2a7ed3fdad4..aecf95fc677f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
@@ -132,6 +132,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// Preloads the next task
RecentsConfiguration config = Recents.getConfiguration();
if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {
+ Rect windowRect = getWindowRect(null /* windowRectOverride */);
+ if (windowRect.isEmpty()) {
+ return;
+ }
+
// Load the next task only if we aren't svelte
SystemServicesProxy ssp = Recents.getSystemServices();
ActivityManager.RunningTaskInfo runningTaskInfo = ssp.getRunningTask();
@@ -146,8 +151,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// This callback is made when a new activity is launched and the old one is
// paused so ignore the current activity and try and preload the thumbnail for
// the previous one.
- updateDummyStackViewLayout(mBackgroundLayoutAlgorithm, stack,
- getWindowRect(null /* windowRectOverride */));
+ updateDummyStackViewLayout(mBackgroundLayoutAlgorithm, stack, windowRect);
// Launched from app is always the worst case (in terms of how many
// thumbnails/tasks visible)