Search in sources :

Example 6 with InPara

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;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 7 with InPara

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);
        }
    }
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 8 with InPara

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;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 9 with InPara

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;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 10 with InPara

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;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Aggregations

InPara (com.tencent.wstt.gt.InPara)30 ArrayList (java.util.ArrayList)4 ParamConst (com.tencent.wstt.gt.manager.ParamConst)2 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 OutPara (com.tencent.wstt.gt.OutPara)1