From 88c6149db74482ac32c93e41d4d8bc0b77a73836 Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Tue, 4 Oct 2011 17:18:23 +0800 Subject: Set EXIF maker and model to system properties. Set EXIF maker to ro.product.manufacturer and EXIF model to ro.product.model. bug:5404097 Change-Id: Ibeaa2225b2593ae7cdcbf75f85e1923095017db6 --- camera/inc/CameraProperties.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/camera/inc/CameraProperties.h b/camera/inc/CameraProperties.h index 7a2eb54..df62215 100644 --- a/camera/inc/CameraProperties.h +++ b/camera/inc/CameraProperties.h @@ -27,6 +27,8 @@ #include #include #include +#include +#include "cutils/properties.h" namespace android { @@ -143,9 +145,13 @@ public: Properties() { mProperties = new DefaultKeyedVector(String8(DEFAULT_VALUE)); - // set properties that are same for all cameras - set(EXIF_MAKE, EXIF_MAKE_DEFAULT); - set(EXIF_MODEL, EXIF_MODEL_DEFAULT); + char property[PROPERTY_VALUE_MAX]; + property_get("ro.product.manufacturer", property, EXIF_MAKE_DEFAULT); + property[0] = toupper(property[0]); + set(EXIF_MAKE, property); + property_get("ro.product.model", property, EXIF_MODEL_DEFAULT); + property[0] = toupper(property[0]); + set(EXIF_MODEL, property); } ~Properties() { -- cgit v1.1