summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-06-18 12:50:11 +0800
committerdianlujitao <dianlujitao@lineageos.org>2018-06-18 12:50:22 +0800
commit2b941edd76daf8b10a90d173f9bbb51bb7064784 (patch)
tree48ade73c66f6021a321fb28aa94163ad31a2a421
parent995cd62aa254f8136baca280a55d795df4cc2381 (diff)
downloadandroid_hardware_lineage_interfaces-2b941edd76daf8b10a90d173f9bbb51bb7064784.tar.gz
android_hardware_lineage_interfaces-2b941edd76daf8b10a90d173f9bbb51bb7064784.tar.bz2
android_hardware_lineage_interfaces-2b941edd76daf8b10a90d173f9bbb51bb7064784.zip
livedisplay: Fix uninitialized default PA
Change-Id: Ida4a01a36401a4f8f52a36106cbb0a2456274dc8
-rw-r--r--livedisplay/1.0/default/impl/LegacyMM.cpp2
-rw-r--r--livedisplay/1.0/default/impl/SDM.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/livedisplay/1.0/default/impl/LegacyMM.cpp b/livedisplay/1.0/default/impl/LegacyMM.cpp
index f7ff180..ce613a8 100644
--- a/livedisplay/1.0/default/impl/LegacyMM.cpp
+++ b/livedisplay/1.0/default/impl/LegacyMM.cpp
@@ -64,6 +64,8 @@ using android::sp;
using android::status_t;
LegacyMM::LegacyMM() {
+ memset(&mDefaultPictureAdjustment, 0, sizeof(HSIC));
+
mController = std::make_unique<LegacyMMController>();
if (mController == nullptr) {
LOG(ERROR) << "Failed to create LegacyMMController";
diff --git a/livedisplay/1.0/default/impl/SDM.cpp b/livedisplay/1.0/default/impl/SDM.cpp
index 80eccec..24470a7 100644
--- a/livedisplay/1.0/default/impl/SDM.cpp
+++ b/livedisplay/1.0/default/impl/SDM.cpp
@@ -93,6 +93,8 @@ using ::android::sp;
using ::android::status_t;
SDM::SDM() : mActiveModeId(-1) {
+ memset(&mDefaultPictureAdjustment, 0, sizeof(HSIC));
+
mController = std::make_unique<SDMController>();
if (mController == nullptr) {
LOG(ERROR) << "Failed to create SDMController";