Merge "Do not run page snap animation if already on the default page" into ub-launcher3-dorval-polish

This commit is contained in:
TreeHugger Robot
2017-07-10 20:05:39 +00:00
committed by Android (Google) Code Review
+3 -6
View File
@@ -3979,8 +3979,9 @@ public class Workspace extends PagedView
}
}
private void moveToScreen(int page, boolean animate) {
if (!workspaceInModalState()) {
void moveToDefaultScreen(boolean animate) {
int page = getDefaultPage();
if (!workspaceInModalState() && getCurrentPage() != page) {
if (animate) {
snapToPage(page);
} else {
@@ -3993,10 +3994,6 @@ public class Workspace extends PagedView
}
}
void moveToDefaultScreen(boolean animate) {
moveToScreen(getDefaultPage(), animate);
}
void moveToCustomContentScreen(boolean animate) {
if (hasCustomContent()) {
int ccIndex = getPageIndexForScreenId(CUSTOM_CONTENT_SCREEN_ID);