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

Commit bf57c8ad authored by Dongwon Kang's avatar Dongwon Kang Committed by Android (Google) Code Review
Browse files

Merge "MediaResourceMonitor: Change argument type from string to int" into nyc-dev

parents f8d40938 69c23dd9
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -96,8 +96,11 @@ static void notifyResourceGranted(int pid, const Vector<MediaResource> &resource
    if (binder != NULL) {
    if (binder != NULL) {
        sp<IMediaResourceMonitor> service = interface_cast<IMediaResourceMonitor>(binder);
        sp<IMediaResourceMonitor> service = interface_cast<IMediaResourceMonitor>(binder);
        for (size_t i = 0; i < resources.size(); ++i) {
        for (size_t i = 0; i < resources.size(); ++i) {
            service->notifyResourceGranted(pid, String16(asString(resources[i].mType)),
            if (resources[i].mSubType == MediaResource::kAudioCodec) {
                    String16(asString(resources[i].mSubType)), resources[i].mValue);
                service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC);
            } else if (resources[i].mSubType == MediaResource::kVideoCodec) {
                service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC);
            }
        }
        }
    }
    }
}
}