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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user