mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Adds Settings button back to Back gesture tutorial." into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d893a478a3
@@ -129,12 +129,12 @@
|
||||
<!-- Feedback shown during interactive parts of Home gesture tutorial when the gesture is horizontal instead of vertical. [CHAR LIMIT=100] -->
|
||||
<string name="home_gesture_feedback_wrong_swipe_direction" translatable="false">Make sure you swipe straight up</string>
|
||||
|
||||
<!-- 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>
|
||||
<!-- 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 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] -->
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user