mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 18:55:31 +08:00
Changed: Renamed typo TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION
to TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION
This commit is contained in:
@@ -361,7 +361,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
boolean launchFailsafe = false;
|
||||
if (bundle != null) {
|
||||
launchFailsafe = bundle.getBoolean(TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION, false);
|
||||
launchFailsafe = bundle.getBoolean(TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION, false);
|
||||
}
|
||||
mTermuxTerminalSessionClient.addNewSession(launchFailsafe, null);
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
@@ -376,7 +376,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
||||
Intent i = getIntent();
|
||||
if (i != null && Intent.ACTION_RUN.equals(i.getAction())) {
|
||||
// Android 7.1 app shortcut from res/xml/shortcuts.xml.
|
||||
boolean isFailSafe = i.getBooleanExtra(TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION, false);
|
||||
boolean isFailSafe = i.getBooleanExtra(TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION, false);
|
||||
mTermuxTerminalSessionClient.addNewSession(isFailSafe, null);
|
||||
} else {
|
||||
mTermuxTerminalSessionClient.setCurrentSession(mTermuxTerminalSessionClient.getCurrentStoredSessionOrLast());
|
||||
|
@@ -368,7 +368,7 @@ public final class TermuxService extends Service implements TermuxTask.TermuxTas
|
||||
}
|
||||
|
||||
executionCommand.workingDirectory = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_WORKDIR, null);
|
||||
executionCommand.isFailsafe = intent.getBooleanExtra(TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION, false);
|
||||
executionCommand.isFailsafe = intent.getBooleanExtra(TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION, false);
|
||||
executionCommand.sessionAction = intent.getStringExtra(TERMUX_SERVICE.EXTRA_SESSION_ACTION);
|
||||
executionCommand.commandLabel = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_LABEL, "Execution Intent Command");
|
||||
executionCommand.commandDescription = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_DESCRIPTION, null);
|
||||
|
@@ -12,7 +12,7 @@ import java.util.IllegalFormatException;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Version: v0.25.0
|
||||
* Version: v0.26.0
|
||||
*
|
||||
* Changelog
|
||||
*
|
||||
@@ -178,6 +178,10 @@ import java.util.List;
|
||||
* `EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL`.
|
||||
* - Added following to `TERMUX_APP.RUN_COMMAND_SERVICE`:
|
||||
* `EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL`.
|
||||
*
|
||||
* - 0.26.0 (2021-08-25)
|
||||
* - Changed `TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION` to `TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION`.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -763,8 +767,8 @@ public final class TermuxConstants {
|
||||
*/
|
||||
public static final class TERMUX_ACTIVITY {
|
||||
|
||||
/** Intent action to start termux failsafe session */
|
||||
public static final String ACTION_FAILSAFE_SESSION = TermuxConstants.TERMUX_PACKAGE_NAME + ".app.failsafe_session"; // Default: "com.termux.app.failsafe_session"
|
||||
/** Intent extra for if termux failsafe session needs to be started and is used by {@link TERMUX_ACTIVITY} and {@link TERMUX_SERVICE#ACTION_STOP_SERVICE} */
|
||||
public static final String EXTRA_FAILSAFE_SESSION = TermuxConstants.TERMUX_PACKAGE_NAME + ".app.failsafe_session"; // Default: "com.termux.app.failsafe_session"
|
||||
|
||||
|
||||
/** Intent action to make termux request storage permissions */
|
||||
|
Reference in New Issue
Block a user