Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68f32a3f authored by shubang's avatar shubang
Browse files

Ues tuner service for getFrontendIds

Test: acloud; sample TIS
Change-Id: I86a2454da4d4bb33d940db1b6396a8e8dee0bbd1
parent 6d432142
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -54,10 +54,21 @@ TunerClient::~TunerClient() {

vector<FrontendId> TunerClient::getFrontendIds() {
    vector<FrontendId> ids;
    // TODO: pending aidl interface
    /*if (mTunerService != NULL) {
        return mTunerService->getFrontendIds();
    }*/

    if (mTunerService != NULL) {
        vector<int32_t> v;
        int aidl_return;
        Status s = mTunerService->getFrontendIds(&v, &aidl_return);
        if (!s.isOk() || aidl_return != (int) Result::SUCCESS
                || v.size() == 0) {
            ids.clear();
            return ids;
        }
        for (int32_t id : v) {
            ids.push_back(static_cast<FrontendId>(id));
        }
        return ids;
    }

    if (mTuner != NULL) {
        Result res;