Merge pull request #7210 from osmandapp/onVoiceRouterMessage
voice router message params
This commit is contained in:
commit
c2f8e12576
3 changed files with 9 additions and 6 deletions
|
@ -39,13 +39,13 @@ public class OnVoiceNavigationParams implements Parcelable {
|
|||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeList(cmds);
|
||||
out.writeList(played);
|
||||
out.writeStringList(cmds);
|
||||
out.writeStringList(played);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
in.readList(cmds, getClass().getClassLoader());
|
||||
in.readList(played, getClass().getClassLoader());
|
||||
in.readStringList(cmds);
|
||||
in.readStringList(played);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,7 +54,7 @@ public class CommandBuilder {
|
|||
protected final CommandPlayer commandPlayer;
|
||||
protected boolean alreadyExecuted = false;
|
||||
private List<Struct> listStruct = new ArrayList<Struct>();
|
||||
private List<String> listCommands = new ArrayList<String>();
|
||||
protected List<String> listCommands = new ArrayList<String>();
|
||||
|
||||
public CommandBuilder(CommandPlayer commandPlayer){
|
||||
this.commandPlayer = commandPlayer;
|
||||
|
@ -71,7 +71,7 @@ public class CommandBuilder {
|
|||
listStruct.add(struct);
|
||||
listCommands.add(name);
|
||||
for(Object o : args) {
|
||||
if(o == null) {
|
||||
if(o != null) {
|
||||
listCommands.add(o.toString());
|
||||
} else {
|
||||
listCommands.add("");
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.mozilla.javascript.Scriptable;
|
|||
import org.mozilla.javascript.ScriptableObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class JSCommandBuilder extends CommandBuilder {
|
||||
|
@ -54,6 +55,8 @@ public class JSCommandBuilder extends CommandBuilder {
|
|||
}
|
||||
|
||||
private JSCommandBuilder addCommand(String name, Object... args){
|
||||
listCommands.add(name);
|
||||
listCommands.add(Arrays.toString(args));
|
||||
Object obj = jsScope.get(name);
|
||||
if (obj instanceof Function) {
|
||||
Function jsFunction = (Function) obj;
|
||||
|
|
Loading…
Reference in a new issue