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

Commit 160ddb09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "media.extractor pass client uid for attribution"

parents 32ebca36 74300e0e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define LOG_TAG "RemoteMediaExtractor"
#include <utils/Log.h>

#include <binder/IPCThreadState.h>
#include <media/stagefright/InterfaceUtils.h>
#include <media/MediaAnalyticsItem.h>
#include <media/MediaSource.h>
@@ -51,6 +52,11 @@ RemoteMediaExtractor::RemoteMediaExtractor(
    if (MEDIA_LOG) {
        mAnalyticsItem = MediaAnalyticsItem::create(kKeyExtractor);

        // we're in the extractor service, we want to attribute to the app
        // that invoked us.
        int uid = IPCThreadState::self()->getCallingUid();
        mAnalyticsItem->setUid(uid);

        // track the container format (mpeg, aac, wvm, etc)
        size_t ntracks = extractor->countTracks();
        mAnalyticsItem->setCString(kExtractorFormat, extractor->name());