- final String[] words=Utils.shellwords(toNonNull(lines[i]));
- final String[] args=new String[words.length-1];//NOPMD variable size depends on words.length
- System.arraycopy(words, 1, args, 0, args.length);
-
- Utils.processCommand(context, toNonNull(words[0]), args, toNonNull(address));
+ final Intent process_intent = new Intent(context, FonBotMainService.class);
+ process_intent.setAction(FonBotMainService.ACTION_PROCESS_COMMAND);
+ process_intent.putExtra(FonBotMainService.EXTRA_COMMAND_LINE, lines[i]);
+ process_intent.putExtra(FonBotMainService.EXTRA_SMS_ORIGIN_ADDRESS, originAddress);
+ context.startService(process_intent);