mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Adds Settings button back to Back gesture tutorial.
Uses a simpler Intent which actually works :) Fixes: 149348244 Bug: 148542211 Change-Id: I5e28c63d1eec93b4642e398c7532e7ec4809d6e2
This commit is contained in:
@@ -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