Merge "Tuner JNI: Correct memcpy of C2DataIdInfo" am: 55a580b253
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536948 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ida939b2ade050cfdfa85a4885c9534892541f923
This commit is contained in:
@@ -291,8 +291,9 @@ MQ& Dvr::getDvrMQ() {
|
|||||||
C2DataIdInfo::C2DataIdInfo(uint32_t index, uint64_t value) : C2Param(kParamSize, index) {
|
C2DataIdInfo::C2DataIdInfo(uint32_t index, uint64_t value) : C2Param(kParamSize, index) {
|
||||||
CHECK(isGlobal());
|
CHECK(isGlobal());
|
||||||
CHECK_EQ(C2Param::INFO, kind());
|
CHECK_EQ(C2Param::INFO, kind());
|
||||||
DummyInfo info{value};
|
mInfo = StubInfo(value);
|
||||||
memcpy(this + 1, static_cast<C2Param *>(&info) + 1, kParamSize - sizeof(C2Param));
|
memcpy(static_cast<C2Param *>(this) + 1, static_cast<C2Param *>(&mInfo) + 1,
|
||||||
|
kParamSize - sizeof(C2Param));
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////// MediaEvent ///////////////////////
|
/////////////// MediaEvent ///////////////////////
|
||||||
|
|||||||
@@ -250,8 +250,9 @@ class C2DataIdInfo : public C2Param {
|
|||||||
public:
|
public:
|
||||||
C2DataIdInfo(uint32_t index, uint64_t value);
|
C2DataIdInfo(uint32_t index, uint64_t value);
|
||||||
private:
|
private:
|
||||||
typedef C2GlobalParam<C2Info, C2Int64Value, 0> DummyInfo;
|
typedef C2GlobalParam<C2Info, C2Int64Value, 0> StubInfo;
|
||||||
static const size_t kParamSize = sizeof(DummyInfo);
|
StubInfo mInfo;
|
||||||
|
static const size_t kParamSize = sizeof(StubInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace android
|
} // namespace android
|
||||||
|
|||||||
Reference in New Issue
Block a user