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 | 88c6149db74482ac32c93e41d4d8bc0b77a73836 (patch) | |
tree | 4626e131e4d569cd2805f8e1bff1beaeb782326a | |
parent | f1e357b2cf26fa5a50789061e068e4f0bd4ea772 (diff) | |
download | hardware_ti_omap4xxx-88c6149db74482ac32c93e41d4d8bc0b77a73836.zip hardware_ti_omap4xxx-88c6149db74482ac32c93e41d4d8bc0b77a73836.tar.gz hardware_ti_omap4xxx-88c6149db74482ac32c93e41d4d8bc0b77a73836.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()
{
|