int Fpc1020Sensor::getEnrolledIds(android::Vector<uint32_t>& ids)
{
    if (!isIdle()) {
        return -EINVAL;
    }

    ALOGV("getEnrolledIds()");
    int ret = activate(false);
    if (ret) {
        return ret;
    }

    ret = sendCommand(CLIENT_CMD_GET_IDS_LIST);
    if (ret == 0) {
        fingerprint_get_ids_list_rsp_t *resp =
                (fingerprint_get_ids_list_rsp_t *) mQseecom.getReceiveBuffer();
        ALOGD("getEnrolledIds(): result %d, count %d", resp->result, resp->count);

        if (resp->result == 0) {
            for (uint32_t i = 0; i < resp->count; i++) {
                ids.push_back(resp->ids[i]);
            }
        }
    }

    deactivate();

    return ret;
}
Beispiel #2
0
MBOOL
FeatureStream::
queryGroupMember(
    MINT32 portIdx,
    MBOOL& beforeCRZ,
    android::Vector<MINT32>& vGroupPortIdx)
{
    FUNCTION_LOG_START;
    bool isGet=false;
    //default set the dma is before crz
    beforeCRZ=true;

    //parsing data
    for(int i=0;i<mCropPaths.size();i++)
    {
        //[1] check there is vipi in this scenario or not
        isGet=false;
        for(int j=0;j<mCropPaths[i].PortIdxVec.size();j++)
        {
            if(mCropPaths[i].PortIdxVec[j]== portIdx)
            {
                isGet=true;
            }
            else
            {}
            if(isGet)
            {
                break;
            }
        }

        //[2]add index of port in the same group
        if(isGet)
        {
            //update the dma position before/after crz
            if(mCropPaths[i].u4CropGroup != ECropGroupIndex_NONE)
            {
                beforeCRZ=false;
            }
            for(int j=0;j<mCropPaths[i].PortIdxVec.size();j++)
            {

                if((mCropPaths[i].PortIdxVec[j]== portIdx) || (portIdx == -1))
                {}
                else
                {
                    vGroupPortIdx.push_back(mCropPaths[i].PortIdxVec[j]);
                }
            }
            //suppose the dma should be only included in one group
            break;
        }
    }
    LOG_INF("return bcrz(%d)/size(%d)",beforeCRZ,vGroupPortIdx.size());
    FUNCTION_LOG_END;
    return true;
}
Beispiel #3
0
MBOOL
NormalStream::
queryCropInfo(
    android::Vector<MCropPathInfo>& mvCropPathInfo)
{
    for(int i=0;i<mCropPaths.size();i++)
    {

        MCropPathInfo crop;
        crop.mGroupIdx=mCropPaths[i].u4CropGroup;
        for(int j=0;j<mCropPaths[i].PortIdxVec.size();j++)
        {
            crop.mvPorts.push_back(mCropPaths[i].PortIdxVec[j]);
        }
        mvCropPathInfo.push_back(crop);
    }
    return true;
}
Beispiel #4
0
MBOOL
FeatureStream::
queryCropInfo(
    android::Vector<MCropPathInfo>& mvCropPathInfo)
{
    #if 0//CHRISTOPHER, do not need in current stage
    for(int i=0;i<mCropPaths.size();i++)
    {

        MCropPathInfo crop;
        crop.mGroupIdx=mCropPaths[i].u4CropGroup;
        for(int j=0;j<mCropPaths[i].PortIdxVec.size();j++)
        {
            crop.mvPorts.push_back(mCropPaths[i].PortIdxVec[j]);
        }
        mvCropPathInfo.push_back(crop);
    }
    #else
    LOG_ERR("do not support this function now");
    #endif
    return true;
}