use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class ConnectedState method getInPara.
@Override
public short getInPara(String paraName, short origVal, boolean isGlobal) {
// connected态的这个方法需要直接调aidl接口
InPara iv = getInPara(paraName, isGlobal);
short result = origVal;
if (null != iv) {
if (InPara.DISPLAY_DISABLE == iv.getDisplayProperty()) {
result = origVal;
} else {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (val.equals("<null>")) {
result = 0;
} else if (matchInParaType(val, "short")) {
result = Short.parseShort(vals.get(0));
}
}
}
return result;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method removeOutPara.
@Override
public void removeOutPara(String paraName) {
synchronized (inParaMap) {
InPara para = inParaMap.remove(paraName);
int position = sortedInParas.indexOfValue(para);
if (position > 0) {
sortedInParas.remove(sortedInParas.keyAt(position));
sortedInParaList.remove(para);
}
if (null != IpUIManager.list_ip && IpUIManager.list_ip.contains(para)) {
IpUIManager.list_ip.remove(para);
}
}
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method getInPara.
@Override
public String getInPara(String paraName, String origVal) {
InPara iv = inParaMap.get(paraName);
String value = origVal;
if (null != iv) {
List<String> vals = iv.getValues();
value = vals.get(0);
}
return value;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method getInPara.
@Override
public long getInPara(String paraName, long origVal) {
InPara iv = inParaMap.get(paraName);
long value = origVal;
if (null != iv) {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (matchInParaType(val, "long")) {
value = Long.parseLong(val);
}
}
return value;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method getInPara.
@Override
public short getInPara(String paraName, short origVal) {
InPara iv = inParaMap.get(paraName);
short value = origVal;
if (null != iv) {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (matchInParaType(val, "short")) {
value = Short.parseShort(val);
}
}
return value;
}