Merge "Return mSynchronouslyBoundPages as getPagesToBindSynchronously between onInitialBindCompleteand finishBindingItems" into sc-v2-dev

This commit is contained in:
Alex Chau
2021-09-29 08:25:49 +00:00
committed by Android (Google) Code Review
+10 -2
View File
@@ -2118,8 +2118,16 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
@Override
public IntSet getPagesToBindSynchronously(IntArray orderedScreenIds) {
IntSet visibleIds = mPagesToBindSynchronously.isEmpty()
? mWorkspace.getCurrentPageScreenIds() : mPagesToBindSynchronously;
IntSet visibleIds;
if (!mPagesToBindSynchronously.isEmpty()) {
visibleIds = mPagesToBindSynchronously;
} else if (!mWorkspaceLoading) {
visibleIds = mWorkspace.getCurrentPageScreenIds();
} else {
// If workspace binding is still in progress, getCurrentPageScreenIds won't be accurate,
// and we should use mSynchronouslyBoundPages that's set during initial binding.
visibleIds = mSynchronouslyBoundPages;
}
IntArray actualIds = new IntArray();
IntSet result = new IntSet();