diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2010-05-05 15:58:33 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2010-05-05 15:58:33 -0700 |
commit | 82d2b433ed97042e131d362ed2252d6b8a5dea1f (patch) | |
tree | bb20c34b2d18a8bc2ca4278a113189da4059fbe7 | |
parent | 0e4f2d0f02475addb9a17329c4b82cd00dbe5ca9 (diff) | |
parent | e4d7b04e712b8629d7e6217a622d25c9655e6ae0 (diff) | |
download | Mms-82d2b433ed97042e131d362ed2252d6b8a5dea1f.tar.gz |
merge from open-source master
Change-Id: Ia4ff7a14539989ccd9347d132da2cae5cd521520
-rw-r--r-- | src/com/android/mms/model/MediaModelFactory.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/mms/model/MediaModelFactory.java b/src/com/android/mms/model/MediaModelFactory.java index c9ec75e4..fa66f77b 100644 --- a/src/com/android/mms/model/MediaModelFactory.java +++ b/src/com/android/mms/model/MediaModelFactory.java @@ -61,6 +61,7 @@ public class MediaModelFactory { PduPart part = null; if (src != null) { + src = unescapeXML(src); if (src.startsWith("cid:")) { part = pb.getPartByContentId("<" + src.substring("cid:".length()) + ">"); } else { @@ -81,6 +82,14 @@ public class MediaModelFactory { throw new IllegalArgumentException("No part found for the model."); } + private static String unescapeXML(String str) { + return str.replaceAll("<","<") + .replaceAll(">", ">") + .replaceAll(""","\"") + .replaceAll("'","'") + .replaceAll("&", "&"); + } + private static MediaModel getRegionMediaModel(Context context, String tag, String src, SMILRegionMediaElement srme, LayoutModel layouts, PduPart part) throws DrmException, IOException, MmsException { |