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

Commit d893a478 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adds Settings button back to Back gesture tutorial." into ub-launcher3-rvc-dev

parents dc48fc4f ee1203e4
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -131,10 +131,10 @@

    <!-- Title shown on the confirmation screen after successful gesture. [CHAR LIMIT=30] -->
    <string name="gesture_tutorial_confirm_title" translatable="false">All set</string>
    <!-- Button text shown on a button on the confirm screen. [CHAR LIMIT=14] -->
    <string name="gesture_tutorial_action_button_label" translatable="false">Done</string>
    <!-- Button text shown on a text button on the confirm screen. [CHAR LIMIT=14] -->
    <string name="gesture_tutorial_action_text_button_label" translatable="false">Settings</string>
    <!-- Button text shown on a button on the confirm screen to leave the tutorial. [CHAR LIMIT=14] -->
    <string name="gesture_tutorial_action_button_label_done" translatable="false">Done</string>
    <!-- Button text shown on a button to go to Settings. [CHAR LIMIT=14] -->
    <string name="gesture_tutorial_action_button_label_settings" translatable="false">Settings</string>

    <!-- ******* Overview ******* -->
    <!-- Label for a button that causes the current overview app to be shared. [CHAR_LIMIT=40] -->
+4 −2
Original line number Diff line number Diff line
@@ -68,13 +68,16 @@ final class BackGestureTutorialController extends TutorialController {
    @Override
    Integer getActionButtonStringId() {
        if (mTutorialType == BACK_NAVIGATION_COMPLETE) {
            return R.string.gesture_tutorial_action_button_label;
            return R.string.gesture_tutorial_action_button_label_done;
        }
        return null;
    }

    @Override
    Integer getActionTextButtonStringId() {
        if (mTutorialType == BACK_NAVIGATION_COMPLETE) {
            return R.string.gesture_tutorial_action_button_label_settings;
        }
        return null;
    }

@@ -86,7 +89,6 @@ final class BackGestureTutorialController extends TutorialController {
    @Override
    void onActionTextButtonClicked(View button) {
        mTutorialFragment.startSystemNavigationSetting();
        mTutorialFragment.closeTutorial();
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ final class HomeGestureTutorialController extends TutorialController {
    @Override
    Integer getActionButtonStringId() {
        if (mTutorialType == HOME_NAVIGATION_COMPLETE) {
            return R.string.gesture_tutorial_action_button_label;
            return R.string.gesture_tutorial_action_button_label_done;
        }
        return null;
    }
+1 −12
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */
package com.android.quickstep.interaction;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.graphics.Insets;
import android.os.Bundle;
@@ -35,8 +34,6 @@ import androidx.fragment.app.FragmentActivity;
import com.android.launcher3.R;
import com.android.quickstep.interaction.TutorialController.TutorialType;

import java.net.URISyntaxException;

abstract class TutorialFragment extends Fragment implements OnTouchListener {

    private static final String LOG_TAG = "TutorialFragment";
@@ -182,14 +179,6 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener {
    }

    void startSystemNavigationSetting() {
        try {
            startActivityForResult(
                    Intent.parseUri(SYSTEM_NAVIGATION_SETTING_INTENT, /* flags= */ 0),
                    /* requestCode= */ 0);
        } catch (URISyntaxException e) {
            Log.e(LOG_TAG, "The launch Intent Uri is wrong syntax: " + e);
        } catch (ActivityNotFoundException e) {
            Log.e(LOG_TAG, "The launch Activity not found: " + e);
        }
        startActivity(new Intent("com.android.settings.GESTURE_NAVIGATION_SETTINGS"));
    }
}