From 739b6b327fba7a69694bbefead8ba9abacc1574d Mon Sep 17 00:00:00 2001 From: August Date: Thu, 16 Aug 2018 00:30:51 +0800 Subject: [PATCH] Fix compile issue after extend PROP_VALUE_MAX --- android/frameworks/native/cmds/installd/installd_deps.h | 2 +- android/hardware/aw/camera/CameraHardware2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/frameworks/native/cmds/installd/installd_deps.h b/android/frameworks/native/cmds/installd/installd_deps.h index 509317803e..f473eceed5 100644 --- a/android/frameworks/native/cmds/installd/installd_deps.h +++ b/android/frameworks/native/cmds/installd/installd_deps.h @@ -34,7 +34,7 @@ extern int get_property(const char *key, const char *default_value); // Size constants. Should be checked to be equal to the cutils requirements. constexpr size_t kPropertyKeyMax = 32u; -constexpr size_t kPropertyValueMax = 92u; +constexpr size_t kPropertyValueMax = 149u; // Compute the output path for dex2oat. extern bool calculate_oat_file_path(char path[PKG_PATH_MAX], diff --git a/android/hardware/aw/camera/CameraHardware2.cpp b/android/hardware/aw/camera/CameraHardware2.cpp index 2c88c3eb97..afffb2f7f5 100755 --- a/android/hardware/aw/camera/CameraHardware2.cpp +++ b/android/hardware/aw/camera/CameraHardware2.cpp @@ -2544,7 +2544,7 @@ void CameraHardware::makeFDOrientionArray() void CameraHardware::getCurrentOriention(int * oriention, int compensation,bool reverse,int re_direction) { - char rota[100]; + char rota[PROPERTY_VALUE_MAX]; property_get("sys.current.rotation",rota,"Unknow"); mOriention = atoi(rota); //LOGV("FDOriention: %d",mFDOriention[mOriention]);