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

Commit 2895b2d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Tuner JNI: Correct memcpy of C2DataIdInfo" am: 55a580b2 am: 57536536

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536948

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I046a2ed3bbaece122a563031cd8309021f2401a7
parents 1f07b60a 57536536
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -291,8 +291,9 @@ MQ& Dvr::getDvrMQ() {
C2DataIdInfo::C2DataIdInfo(uint32_t index, uint64_t value) : C2Param(kParamSize, index) {
    CHECK(isGlobal());
    CHECK_EQ(C2Param::INFO, kind());
    DummyInfo info{value};
    memcpy(this + 1, static_cast<C2Param *>(&info) + 1, kParamSize - sizeof(C2Param));
    mInfo = StubInfo(value);
    memcpy(static_cast<C2Param *>(this) + 1, static_cast<C2Param *>(&mInfo) + 1,
            kParamSize - sizeof(C2Param));
}

/////////////// MediaEvent ///////////////////////
+3 −2
Original line number Diff line number Diff line
@@ -250,8 +250,9 @@ class C2DataIdInfo : public C2Param {
public:
    C2DataIdInfo(uint32_t index, uint64_t value);
private:
    typedef C2GlobalParam<C2Info, C2Int64Value, 0> DummyInfo;
    static const size_t kParamSize = sizeof(DummyInfo);
    typedef C2GlobalParam<C2Info, C2Int64Value, 0> StubInfo;
    StubInfo mInfo;
    static const size_t kParamSize = sizeof(StubInfo);
};

}  // namespace android