Changed: Renamed typo TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION to TERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION

This commit is contained in:
agnostic-apollo
2021-08-25 02:01:28 +05:00
parent f97f07df3f
commit b68a398fa8
3 changed files with 10 additions and 6 deletions

View File

@@ -361,7 +361,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
Bundle bundle = getIntent().getExtras(); Bundle bundle = getIntent().getExtras();
boolean launchFailsafe = false; boolean launchFailsafe = false;
if (bundle != null) { 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); mTermuxTerminalSessionClient.addNewSession(launchFailsafe, null);
} catch (WindowManager.BadTokenException e) { } catch (WindowManager.BadTokenException e) {
@@ -376,7 +376,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
Intent i = getIntent(); Intent i = getIntent();
if (i != null && Intent.ACTION_RUN.equals(i.getAction())) { if (i != null && Intent.ACTION_RUN.equals(i.getAction())) {
// Android 7.1 app shortcut from res/xml/shortcuts.xml. // 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); mTermuxTerminalSessionClient.addNewSession(isFailSafe, null);
} else { } else {
mTermuxTerminalSessionClient.setCurrentSession(mTermuxTerminalSessionClient.getCurrentStoredSessionOrLast()); mTermuxTerminalSessionClient.setCurrentSession(mTermuxTerminalSessionClient.getCurrentStoredSessionOrLast());

View File

@@ -368,7 +368,7 @@ public final class TermuxService extends Service implements TermuxTask.TermuxTas
} }
executionCommand.workingDirectory = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_WORKDIR, null); 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.sessionAction = intent.getStringExtra(TERMUX_SERVICE.EXTRA_SESSION_ACTION);
executionCommand.commandLabel = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_LABEL, "Execution Intent Command"); executionCommand.commandLabel = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_LABEL, "Execution Intent Command");
executionCommand.commandDescription = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_DESCRIPTION, null); executionCommand.commandDescription = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_COMMAND_DESCRIPTION, null);

View File

@@ -12,7 +12,7 @@ import java.util.IllegalFormatException;
import java.util.List; import java.util.List;
/* /*
* Version: v0.25.0 * Version: v0.26.0
* *
* Changelog * Changelog
* *
@@ -178,6 +178,10 @@ import java.util.List;
* `EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL`. * `EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL`.
* - Added following to `TERMUX_APP.RUN_COMMAND_SERVICE`: * - Added following to `TERMUX_APP.RUN_COMMAND_SERVICE`:
* `EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL`. * `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 { public static final class TERMUX_ACTIVITY {
/** Intent action to start termux 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 ACTION_FAILSAFE_SESSION = TermuxConstants.TERMUX_PACKAGE_NAME + ".app.failsafe_session"; // Default: "com.termux.app.failsafe_session" 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 */ /** Intent action to make termux request storage permissions */