Don't scroll to home card if overview isn't visible
Consider these steps: - Swipe up for recents - Scroll over several cards - Swipe up for all apps - Press home Before this change, there was a delay as recents scrolled back to the workspace card before going home, even though it wasn't visible. Change-Id: I1c0edc8e02d1d1d236f47882695903e33e6b09ae
This commit is contained in:
-16
@@ -1,16 +0,0 @@
|
||||
db_files
|
||||
*.iml
|
||||
.project
|
||||
.classpath
|
||||
.project.properties
|
||||
gen/
|
||||
tests/stress/gen/
|
||||
WallpaperPicker/gen/
|
||||
WallpaperPicker/.project.properties
|
||||
bin/
|
||||
.idea/
|
||||
.gradle/
|
||||
local.properties
|
||||
gradle/
|
||||
build/
|
||||
gradlew*
|
||||
@@ -83,7 +83,8 @@ public class RecentsViewStateController implements StateHandler {
|
||||
|
||||
// Scroll to the workspace card before changing to the NORMAL state.
|
||||
int currPage = mRecentsView.getCurrentPage();
|
||||
if (toState == NORMAL && currPage != 0 && !config.userControlled) {
|
||||
LauncherState fromState = mLauncher.getStateManager().getState();
|
||||
if (fromState.overviewUi && toState == NORMAL && currPage != 0 && !config.userControlled) {
|
||||
int maxSnapDuration = PagedView.SLOW_PAGE_SNAP_ANIMATION_DURATION;
|
||||
int durationPerPage = maxSnapDuration / 10;
|
||||
int snapDuration = Math.min(maxSnapDuration, durationPerPage * currPage);
|
||||
|
||||
Reference in New Issue
Block a user