Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e7fdeb3 authored by Matthew Ng's avatar Matthew Ng Committed by android-build-merger
Browse files

Merge "Fixes TaskStackLayoutAlgorithm log errors when window rect is empty" into oc-mr1-dev

am: 7673a55f

Change-Id: Ic89dad11832a55111b8be425ab3a1b53c8ebafa3
parents 04e7d1fa 7673a55f
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -132,6 +132,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
            // Preloads the next task
            // Preloads the next task
            RecentsConfiguration config = Recents.getConfiguration();
            RecentsConfiguration config = Recents.getConfiguration();
            if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {
            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
                // Load the next task only if we aren't svelte
                SystemServicesProxy ssp = Recents.getSystemServices();
                SystemServicesProxy ssp = Recents.getSystemServices();
                ActivityManager.RunningTaskInfo runningTaskInfo = ssp.getRunningTask();
                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
                    // 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
                    // paused so ignore the current activity and try and preload the thumbnail for
                    // the previous one.
                    // the previous one.
                    updateDummyStackViewLayout(mBackgroundLayoutAlgorithm, stack,
                    updateDummyStackViewLayout(mBackgroundLayoutAlgorithm, stack, windowRect);
                            getWindowRect(null /* windowRectOverride */));


                    // Launched from app is always the worst case (in terms of how many
                    // Launched from app is always the worst case (in terms of how many
                    // thumbnails/tasks visible)
                    // thumbnails/tasks visible)