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
|
@Override
|
||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
out.writeList(cmds);
|
out.writeStringList(cmds);
|
||||||
out.writeList(played);
|
out.writeStringList(played);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readFromParcel(Parcel in) {
|
private void readFromParcel(Parcel in) {
|
||||||
in.readList(cmds, getClass().getClassLoader());
|
in.readStringList(cmds);
|
||||||
in.readList(played, getClass().getClassLoader());
|
in.readStringList(played);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class CommandBuilder {
|
||||||
protected final CommandPlayer commandPlayer;
|
protected final CommandPlayer commandPlayer;
|
||||||
protected boolean alreadyExecuted = false;
|
protected boolean alreadyExecuted = false;
|
||||||
private List<Struct> listStruct = new ArrayList<Struct>();
|
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){
|
public CommandBuilder(CommandPlayer commandPlayer){
|
||||||
this.commandPlayer = commandPlayer;
|
this.commandPlayer = commandPlayer;
|
||||||
|
@ -71,7 +71,7 @@ public class CommandBuilder {
|
||||||
listStruct.add(struct);
|
listStruct.add(struct);
|
||||||
listCommands.add(name);
|
listCommands.add(name);
|
||||||
for(Object o : args) {
|
for(Object o : args) {
|
||||||
if(o == null) {
|
if(o != null) {
|
||||||
listCommands.add(o.toString());
|
listCommands.add(o.toString());
|
||||||
} else {
|
} else {
|
||||||
listCommands.add("");
|
listCommands.add("");
|
||||||
|
|
|
@ -13,6 +13,7 @@ import org.mozilla.javascript.Scriptable;
|
||||||
import org.mozilla.javascript.ScriptableObject;
|
import org.mozilla.javascript.ScriptableObject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JSCommandBuilder extends CommandBuilder {
|
public class JSCommandBuilder extends CommandBuilder {
|
||||||
|
@ -54,6 +55,8 @@ public class JSCommandBuilder extends CommandBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private JSCommandBuilder addCommand(String name, Object... args){
|
private JSCommandBuilder addCommand(String name, Object... args){
|
||||||
|
listCommands.add(name);
|
||||||
|
listCommands.add(Arrays.toString(args));
|
||||||
Object obj = jsScope.get(name);
|
Object obj = jsScope.get(name);
|
||||||
if (obj instanceof Function) {
|
if (obj instanceof Function) {
|
||||||
Function jsFunction = (Function) obj;
|
Function jsFunction = (Function) obj;
|
||||||
|
|
Loading…
Reference in a new issue