Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2517dfd1 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Update TutorialFragments to work without hand gesture animations.

Test: manual

TutorialFragments needed to implement getHandAnimationResId, however not all TutorialFragments will need a hand gesture animation. Updated TutorialFragment to remove this requirement.

Change-Id: I2f75d6447dcceb226569181176deed1d5e80fa5f
parent 34fbea6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import com.android.quickstep.interaction.TutorialController.TutorialType;
/** Shows the Home gesture interactive tutorial. */
public class AssistantGestureTutorialFragment extends TutorialFragment {
    @Override
    int getHandAnimationResId() {
    Integer getHandAnimationResId() {
        return R.drawable.assistant_gesture;
    }

+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import com.android.quickstep.interaction.TutorialController.TutorialType;
/** Shows the Back gesture interactive tutorial. */
public class BackGestureTutorialFragment extends TutorialFragment {
    @Override
    int getHandAnimationResId() {
    Integer getHandAnimationResId() {
        return R.drawable.back_gesture;
    }

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import com.android.quickstep.interaction.TutorialController.TutorialType;
/** Shows the Home gesture interactive tutorial. */
public class HomeGestureTutorialFragment extends TutorialFragment {
    @Override
    int getHandAnimationResId() {
    Integer getHandAnimationResId() {
        return R.drawable.home_gesture;
    }

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import com.android.quickstep.interaction.TutorialController.TutorialType;
/** Shows the Overview gesture interactive tutorial. */
public class OverviewGestureTutorialFragment extends TutorialFragment {
    @Override
    int getHandAnimationResId() {
    Integer getHandAnimationResId() {
        return R.drawable.overview_gesture;
    }

+5 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
    final View mFakeTaskView;
    final View mRippleView;
    final RippleDrawable mRippleDrawable;
    final TutorialHandAnimation mHandCoachingAnimation;
    @Nullable final TutorialHandAnimation mHandCoachingAnimation;
    final ImageView mHandCoachingView;
    final Button mActionTextButton;
    final Button mActionButton;
@@ -145,13 +145,16 @@ abstract class TutorialController implements BackGestureAttemptCallback,
    void onActionTextButtonClicked(View button) {}

    void showHandCoachingAnimation() {
        if (isComplete()) {
        if (isComplete() || mHandCoachingAnimation == null) {
            return;
        }
        mHandCoachingAnimation.startLoopedAnimation(mTutorialType);
    }

    void hideHandCoachingAnimation() {
        if (mHandCoachingAnimation == null) {
            return;
        }
        mHandCoachingAnimation.stop();
        mHandCoachingView.setVisibility(View.INVISIBLE);
    }
Loading