Gallery2 - Handle special character '×' (in addition to 'x') in the resolution string.
(×) is multiplication sign. It looks like some Camera apps specify
this as part of resolution.
Bug: 216176283
Test: make and Presubmit
Change-Id: I2836f7121293f1d594afaf76ef46d4e68190e355
diff --git a/src/com/android/gallery3d/data/LocalVideo.java b/src/com/android/gallery3d/data/LocalVideo.java
index 787e7f0..10aec13 100755
--- a/src/com/android/gallery3d/data/LocalVideo.java
+++ b/src/com/android/gallery3d/data/LocalVideo.java
@@ -118,7 +118,11 @@
private void parseResolution(String resolution) {
if (resolution == null) return;
int m = resolution.indexOf('x');
- if (m == -1) return;
+ if (m == -1) {
+ // Fix b/216176283 - Handle special character '×' in the resolution.
+ m = resolution.indexOf('×');
+ if (m == -1) return;
+ }
try {
int w = Integer.parseInt(resolution.substring(0, m));
int h = Integer.parseInt(resolution.substring(m + 1));