Skip to content

Commit

Permalink
Changed: Enable background mode and wait for results toggle for new p…
Browse files Browse the repository at this point in the history
…lugin configs
  • Loading branch information
agnostic-apollo committed Feb 21, 2022
1 parent 26e1f5e commit 70d97e7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions app/src/main/java/com/termux/tasker/EditConfigurationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.termux.shared.activities.TextIOActivity;
import com.termux.shared.activity.media.AppCompatActivityUtils;
import com.termux.shared.data.DataUtils;
import com.termux.shared.data.IntentUtils;
import com.termux.shared.errors.Error;
import com.termux.shared.logger.Logger;
import com.termux.shared.models.TextIOInfo;
Expand Down Expand Up @@ -107,6 +108,8 @@ protected void onCreate(final Bundle savedInstanceState) {
final Bundle localeBundle = intent.getBundleExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE);
BundleScrubber.scrub(localeBundle);

Logger.logInfo(LOG_TAG, "Bundle Received: " + IntentUtils.getBundleString(localeBundle));

TextView mHelp = findViewById(R.id.textview_help);
mHelp.setText(this.getString(R.string.help, TermuxConstants.TERMUX_TASKER_GITHUB_REPO_URL));

Expand Down Expand Up @@ -135,8 +138,16 @@ protected void onCreate(final Bundle savedInstanceState) {
setInTerminalView();

// Currently savedInstanceState bundle is not supported
if (savedInstanceState != null || localeBundle == null)
if (savedInstanceState != null || localeBundle == null) {
Logger.logInfo(LOG_TAG, "Not loading values from null bundle");
// Enable by default
mInTerminalCheckbox.setChecked(false);
mWaitForResult.setChecked(true);
updateStdinViewVisibility(false);
updateSessionActionViewVisibility(false);
updateBackgroundCustomLogLevelViewVisibility(false);
return;
}

String errmsg;
// If bundle is valid, then load values from bundle
Expand Down Expand Up @@ -175,7 +186,7 @@ protected void onCreate(final Bundle savedInstanceState) {
processBackgroundCustomLogLevel(backgroundCustomLogLevel);
updateBackgroundCustomLogLevelViewVisibility(inTerminal);

final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT);
final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT, true);
mWaitForResult.setChecked(waitForResult);
}

Expand Down

0 comments on commit 70d97e7

Please sign in to comment.