diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-10-04 17:18:23 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-10-05 12:51:14 +0800 |
commit | 7286d95dfc85d2b89184938419ecb511395d3e2d (patch) | |
tree | 5a2bb3496d5f2d52a9a48f82a1ee8047748f0640 | |
parent | eec1a7791b8c390c5088dc1a606e8de0f670f0c4 (diff) | |
download | hardware_ti_omap4-7286d95dfc85d2b89184938419ecb511395d3e2d.zip hardware_ti_omap4-7286d95dfc85d2b89184938419ecb511395d3e2d.tar.gz hardware_ti_omap4-7286d95dfc85d2b89184938419ecb511395d3e2d.tar.bz2 |
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
-rw-r--r-- | camera/inc/CameraProperties.h | 12 |
1 files 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 <errno.h>
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
+#include "cutils/properties.h"
namespace android {
@@ -143,9 +145,13 @@ public: Properties()
{
mProperties = new DefaultKeyedVector<String8, String8>(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()
{
|