File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/src/main/java/com/termux/tasker Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 77import android .os .Bundle ;
88
99import com .termux .shared .crash .TermuxCrashUtils ;
10+ import com .termux .shared .data .DataUtils ;
1011import com .termux .shared .data .IntentUtils ;
1112import com .termux .shared .file .TermuxFileUtils ;
1213import com .termux .shared .file .filesystem .FileType ;
2122import com .termux .tasker .utils .PluginUtils ;
2223import com .termux .tasker .utils .TaskerPlugin ;
2324
25+ import java .util .ArrayList ;
2426import java .util .List ;
2527
2628/**
@@ -165,8 +167,10 @@ public void onReceive(final Context context, final Intent intent) {
165167 // Arguments are split on whitespaces unless quoted with single or double quotes
166168 // Double quotes and backslashes can be escaped with backslashes in arguments surrounded
167169 // with double quotes
168- List <String > arguments_list = ArgumentTokenizer .tokenize (arguments_string );
169- executionCommand .arguments = arguments_list .toArray (new String [arguments_list .size ()]);
170+ List <String > arguments_list = new ArrayList <>();
171+ if (!DataUtils .isNullOrEmpty (arguments_string ))
172+ arguments_list = ArgumentTokenizer .tokenize (arguments_string );
173+ executionCommand .arguments = arguments_list .toArray (new String [0 ]);
170174
171175
172176 Logger .logVerboseExtended (LOG_TAG , executionCommand .toString ());
You can’t perform that action at this time.
0 commit comments