Detects nav bar gestures to progress through Home tutorial.

Home gesture also exits Back and Home tutorials on the
completion screens (as does back gesture).

Test: Manually verified Back and Home tutorial flows.
Bug: 148542211
Change-Id: I8026745e875e9ccb8cfd60bc438213b2d896254d
This commit is contained in:
Andy Wickham committed 2020-04-24 18:13:05 +00:00
1 parent c9fa578444
commit 6b6287f414
7 files changed
+176 -16

No files matched your search

@@ -21,6 +21,7 @@ import android.view.View;
import com.android.launcher3.R;
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureResult;
import com.android.quickstep.interaction.NavBarGestureHandler.NavBarGestureResult;
/** A {@link TutorialController} for the Home tutorial. */
final class HomeGestureTutorialController extends TutorialController {
@@ -82,4 +83,21 @@ final class HomeGestureTutorialController extends TutorialController {
break;
}
}
@Override
public void onNavBarGestureAttempted(NavBarGestureResult result) {
switch (mTutorialType) {
case HOME_NAVIGATION:
if (result == NavBarGestureResult.HOME_GESTURE_COMPLETED) {
hideHandCoachingAnimation();
mTutorialFragment.changeController(HOME_NAVIGATION_COMPLETE);
}
break;
case HOME_NAVIGATION_COMPLETE:
if (result == NavBarGestureResult.HOME_GESTURE_COMPLETED) {
mTutorialFragment.closeTutorial();
}
break;
}
}
}