Fix getPagesToBindSynchronously returning wrong page pairs

- Use WorkSpace.getPagePair instead for accurate value

Bug: 191657065
Test: manual
Change-Id: I584f1705fb5ed2f0d2bd776eb6cf4f60c69238ac
This commit is contained in:
Alex Chau committed 2021-09-06 10:58:48 +01:00
1 parent 4926bf706a
commit 62f129b878
2 files changed
+10 -14

No files matched your search

-4
View File
@@ -920,12 +920,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
/**
* Returns the page that is shown together with the given page when two panel is enabled.
* @throws IllegalStateException if called while two panel home isn't enabled.
*/
public int getPagePair(int page) {
if (!isTwoPanelEnabled()) {
throw new IllegalStateException("Two panel home isn't enabled.");
}
if (page % 2 == 0) {
return page + 1;
} else {