|
9 | 9 | import com.termux.shared.activities.TextIOActivity; |
10 | 10 | import com.termux.shared.activity.media.AppCompatActivityUtils; |
11 | 11 | import com.termux.shared.data.DataUtils; |
| 12 | +import com.termux.shared.data.IntentUtils; |
12 | 13 | import com.termux.shared.errors.Error; |
13 | 14 | import com.termux.shared.logger.Logger; |
14 | 15 | import com.termux.shared.models.TextIOInfo; |
@@ -107,6 +108,8 @@ protected void onCreate(final Bundle savedInstanceState) { |
107 | 108 | final Bundle localeBundle = intent.getBundleExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE); |
108 | 109 | BundleScrubber.scrub(localeBundle); |
109 | 110 |
|
| 111 | + Logger.logInfo(LOG_TAG, "Bundle Received: " + IntentUtils.getBundleString(localeBundle)); |
| 112 | + |
110 | 113 | TextView mHelp = findViewById(R.id.textview_help); |
111 | 114 | mHelp.setText(this.getString(R.string.help, TermuxConstants.TERMUX_TASKER_GITHUB_REPO_URL)); |
112 | 115 |
|
@@ -135,8 +138,16 @@ protected void onCreate(final Bundle savedInstanceState) { |
135 | 138 | setInTerminalView(); |
136 | 139 |
|
137 | 140 | // 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); |
139 | 149 | return; |
| 150 | + } |
140 | 151 |
|
141 | 152 | String errmsg; |
142 | 153 | // If bundle is valid, then load values from bundle |
@@ -175,7 +186,7 @@ protected void onCreate(final Bundle savedInstanceState) { |
175 | 186 | processBackgroundCustomLogLevel(backgroundCustomLogLevel); |
176 | 187 | updateBackgroundCustomLogLevelViewVisibility(inTerminal); |
177 | 188 |
|
178 | | - final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT); |
| 189 | + final boolean waitForResult = localeBundle.getBoolean(PluginBundleManager.EXTRA_WAIT_FOR_RESULT, true); |
179 | 190 | mWaitForResult.setChecked(waitForResult); |
180 | 191 | } |
181 | 192 |
|
|
0 commit comments