summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2013-07-10 13:56:12 -0700
committerTom Taylor <tomtaylor@google.com>2013-07-10 13:56:12 -0700
commit5a3a32b8e4c9c24397dfeaf74894b907b218f8b9 (patch)
tree89ede691c2afbab2f2b5b24ca69a8bcdee219b34
parentaabb0893321d3c557abbbb06cafd6974f2ff3c21 (diff)
downloadMms-5a3a32b8e4c9c24397dfeaf74894b907b218f8b9.tar.gz
When a video attachment from MMS is saved to the device, the content is not displayed on the Gallery appandroid-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3.1_r1jb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-dev
Bug 9578924 This is bug reported on the GS4. Fix by removing leading periods from the saved filename. Change-Id: I6f025efc567c33dfdfd926ecf5131b258047315a
-rw-r--r--src/com/android/mms/ui/ComposeMessageActivity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/mms/ui/ComposeMessageActivity.java b/src/com/android/mms/ui/ComposeMessageActivity.java
index 3b55a597..12b421c3 100644
--- a/src/com/android/mms/ui/ComposeMessageActivity.java
+++ b/src/com/android/mms/ui/ComposeMessageActivity.java
@@ -1616,6 +1616,9 @@ public class ComposeMessageActivity extends Activity
if (isDrm) {
extension += DrmUtils.getConvertExtension(type);
}
+ // Remove leading periods. The gallery ignores files starting with a period.
+ fileName = fileName.replaceAll("^.", "");
+
File file = getUniqueDestination(dir + fileName, extension);
// make sure the path is valid and directories created for this file.