这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 70d97e7

Browse files
Changed: Enable background mode and wait for results toggle for new plugin configs
1 parent 26e1f5e commit 70d97e7

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

app/src/main/java/com/termux/tasker/EditConfigurationActivity.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.termux.shared.activities.TextIOActivity;
1010
import com.termux.shared.activity.media.AppCompatActivityUtils;
1111
import com.termux.shared.data.DataUtils;
12+
import com.termux.shared.data.IntentUtils;
1213
import com.termux.shared.errors.Error;
1314
import com.termux.shared.logger.Logger;
1415
import com.termux.shared.models.TextIOInfo;
@@ -107,6 +108,8 @@ protected void onCreate(final Bundle savedInstanceState) {
107108
final Bundle localeBundle = intent.getBundleExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE);
108109
BundleScrubber.scrub(localeBundle);
109110

111+
Logger.logInfo(LOG_TAG, "Bundle Received: " + IntentUtils.getBundleString(localeBundle));
112+
110113
TextView mHelp = findViewById(R.id.textview_help);
111114
mHelp.setText(this.getString(R.string.help, TermuxConstants.TERMUX_TASKER_GITHUB_REPO_URL));
112115

@@ -135,8 +138,16 @@ protected void onCreate(final Bundle savedInstanceState) {
135138
setInTerminalView();
136139

137140
// Currently savedInstanceState bundle is not supported
138-
if (savedInstanceState != null || localeBundle == null)
141+
if (savedInstanceState != null || localeBundle == null) {
142+
Logger.logInfo(LOG_TAG, "Not loading values from null bundle");
143+
// Enable by default
144+
mInTerminalCheckbox.setChecked(false);
145+
mWaitForResult.setChecked(true);
146+
updateStdinViewVisibility(false);
147+
updateSessionActionViewVisibility(false);
148+
updateBackgroundCustomLogLevelViewVisibility(false);
139149
return;
150+
}
140151

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

178-
final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT);
189+
final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT, true);
179190
mWaitForResult.setChecked(waitForResult);
180191
}
181192

0 commit comments

Comments
 (0)