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

Commit fc63a30d authored by Andy Hung's avatar Andy Hung
Browse files

MediaMetrics: Convert to AIDL

Test: adb shell dumpsys media.metrics
Bug: 173831888
Change-Id: I11a3b960f18b38cdfed702638120f657cf01295c
parent b861a678
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

#include <binder/Parcel.h>
#include <jni.h>
#include <media/IMediaMetricsService.h>
#include <media/MediaMetricsItem.h>
#include <nativehelper/JNIHelp.h>
#include <variant>
@@ -151,12 +150,7 @@ static jint android_media_MediaMetrics_submit_bytebuffer(
        return (jint)BAD_VALUE;
    }

    sp<IMediaMetricsService> service = mediametrics::BaseItem::getService();
    if (service == nullptr) {
        ALOGW("Cannot retrieve mediametrics service");
        return (jint)NO_INIT;
    }
    return (jint)service->submitBuffer((char *)buffer, length);
    return (jint)mediametrics::BaseItem::submitBuffer((char *)buffer, length);
}

// Helper function to convert a native PersistableBundle to a Java