OSDN Git Service
(root)
/
android-x86
/
packages-apps-Camera2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c9c7dc
)
Print '.' for unprintable ascii code in Exif test
author
Earl Ou
<shunhsingou@google.com>
Thu, 18 Oct 2012 07:57:38 +0000
(15:57 +0800)
committer
Earl Ou
<shunhsingou@google.com>
Thu, 18 Oct 2012 07:57:38 +0000
(15:57 +0800)
Change-Id: Ie74d53c021044fdb7261c7558f5247119bf7dcc2
src/com/android/gallery3d/exif/ExifTag.java
patch
|
blob
|
history
diff --git
a/src/com/android/gallery3d/exif/ExifTag.java
b/src/com/android/gallery3d/exif/ExifTag.java
index
547a68f
..
def80a9
100644
(file)
--- a/
src/com/android/gallery3d/exif/ExifTag.java
+++ b/
src/com/android/gallery3d/exif/ExifTag.java
@@
-1389,7
+1389,16
@@
public class ExifTag {
}
break;
case ExifTag.TYPE_ASCII:
- sbuilder.append(getString());
+ String s = getString();
+ for (int i = 0, n = s.length(); i < n; i++) {
+ int code = s.codePointAt(i);
+ if (code == 0) continue;
+ if (code > 31 && code < 127) {
+ sbuilder.append((char) code);
+ } else {
+ sbuilder.append('.');
+ }
+ }
break;
case ExifTag.TYPE_UNSIGNED_LONG:
for(int i = 0, n = getComponentCount(); i < n; i++) {