Skip to content

Commit

Permalink
Changed: Renamed typo TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION to `T…
Browse files Browse the repository at this point in the history
…ERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION`
  • Loading branch information
agnostic-apollo committed Aug 24, 2021
1 parent f97f07d commit b68a398
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/termux/app/TermuxActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public void onServiceConnected(ComponentName componentName, IBinder service) {
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) {
Expand All @@ -376,7 +376,7 @@ public void onServiceConnected(ComponentName componentName, IBinder service) {
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());
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/termux/app/TermuxService.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private void actionServiceExecute(Intent intent) {
}

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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.List;

/*
* Version: v0.25.0
* Version: v0.26.0
*
* Changelog
*
Expand Down Expand Up @@ -178,6 +178,10 @@
* `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`.
*
*/

/**
Expand Down Expand Up @@ -763,8 +767,8 @@ public static final class TERMUX_APP {
*/
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 */
Expand Down

0 comments on commit b68a398

Please sign in to comment.