Search in sources :

Example 26 with InPara

use of com.tencent.wstt.gt.InPara in project GT by Tencent.

the class DefaultInParaManager method clear.

@Override
public void clear() {
    synchronized (inParaMap) {
        List<InPara> tmpList = getAll();
        inParaMap.clear();
        sortedInParas.clear();
        sortedInParaList.clear();
        for (InPara para : tmpList) {
            IpUIManager.list_ip.remove(para);
        }
    }
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 27 with InPara

use of com.tencent.wstt.gt.InPara in project GT by Tencent.

the class DefaultInParaManager method getInPara.

@Override
public double getInPara(String paraName, double origVal) {
    InPara iv = inParaMap.get(paraName);
    double value = origVal;
    if (null != iv) {
        List<String> vals = iv.getValues();
        String val = vals.get(0);
        if (matchInParaType(val, "double")) {
            value = Double.parseDouble(val);
        }
    }
    return value;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 28 with InPara

use of com.tencent.wstt.gt.InPara in project GT by Tencent.

the class DefaultInParaManager method getInPara.

@Override
public boolean getInPara(String paraName, boolean origVal) {
    InPara iv = inParaMap.get(paraName);
    boolean value = origVal;
    if (null != iv) {
        List<String> vals = iv.getValues();
        String val = vals.get(0);
        if (matchInParaType(val, "boolean")) {
            value = Boolean.parseBoolean(val);
        }
    }
    return value;
}
Also used : InPara(com.tencent.wstt.gt.InPara)

Example 29 with InPara

use of com.tencent.wstt.gt.InPara in project GT by Tencent.

the class IpUIManager method getACInputParams.

public static List<InPara> getACInputParams() {
    List<InPara> show_iv = new ArrayList<InPara>();
    for (int i = 1; i < list_ip.size(); i++) {
        InPara ip = list_ip.get(i);
        if (ip.getKey().equals(ParamConst.DIVID_TITLE)) {
            break;
        }
        show_iv.add(list_ip.get(i));
    }
    return show_iv;
}
Also used : InPara(com.tencent.wstt.gt.InPara) ArrayList(java.util.ArrayList)

Example 30 with InPara

use of com.tencent.wstt.gt.InPara in project GT by Tencent.

the class ConnectedState method getInPara.

/**
	 * 下面这些对应的用户接口
	 * @Override
	 */
public String getInPara(String paraName, String origVal, boolean isGlobal) {
    // connected态的这个方法需要直接调aidl接口
    InPara iv = getInPara(paraName, isGlobal);
    String 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 = null;
            } else {
                result = val;
            }
        }
    }
    return result;
}
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