diff options
author | Takaoka G. Tadashi <takaoka@google.com> | 2009-12-02 20:47:32 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-02 20:47:32 -0800 |
commit | bdb9b3042ad019bede603fe2fa0aed8ba5217876 (patch) | |
tree | e60d8f3b4bd9740f3090fc7fe8fa640f267e3eae /telephony | |
parent | 658915aeec20f199e032dfa7a64483469ea7b8d7 (diff) | |
parent | 5d2a7b26d6bb06f71904ecd7c828ae90d79b27ef (diff) | |
download | frameworks_base-bdb9b3042ad019bede603fe2fa0aed8ba5217876.zip frameworks_base-bdb9b3042ad019bede603fe2fa0aed8ba5217876.tar.gz frameworks_base-bdb9b3042ad019bede603fe2fa0aed8ba5217876.tar.bz2 |
am 5d2a7b26: am 7d51517c: Merge change I611c15cf into eclair-mr2
Merge commit '5d2a7b26d6bb06f71904ecd7c828ae90d79b27ef'
* commit '5d2a7b26d6bb06f71904ecd7c828ae90d79b27ef':
Add DoCoMo vendor specific OMNA WSP content type number
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/WapPushOverSms.java | 6 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/WspTypeDecoder.java | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/WapPushOverSms.java b/telephony/java/com/android/internal/telephony/WapPushOverSms.java index 9970940..4deb29c 100644 --- a/telephony/java/com/android/internal/telephony/WapPushOverSms.java +++ b/telephony/java/com/android/internal/telephony/WapPushOverSms.java @@ -109,6 +109,7 @@ public class WapPushOverSms { String mimeType = pduDecoder.getValueString(); if (mimeType == null) { binaryContentType = (int)pduDecoder.getValue32(); + // TODO we should have more generic way to map binaryContentType code to mimeType. switch (binaryContentType) { case WspTypeDecoder.CONTENT_TYPE_B_DRM_RIGHTS_XML: mimeType = WspTypeDecoder.CONTENT_MIME_TYPE_B_DRM_RIGHTS_XML; @@ -128,6 +129,9 @@ public class WapPushOverSms { case WspTypeDecoder.CONTENT_TYPE_B_MMS: mimeType = WspTypeDecoder.CONTENT_MIME_TYPE_B_MMS; break; + case WspTypeDecoder.CONTENT_TYPE_B_VND_DOCOMO_PF: + mimeType = WspTypeDecoder.CONTENT_MIME_TYPE_B_VND_DOCOMO_PF; + break; default: if (Config.LOGD) { Log.w(LOG_TAG, @@ -148,6 +152,8 @@ public class WapPushOverSms { binaryContentType = WspTypeDecoder.CONTENT_TYPE_B_PUSH_CO; } else if (mimeType.equals(WspTypeDecoder.CONTENT_MIME_TYPE_B_MMS)) { binaryContentType = WspTypeDecoder.CONTENT_TYPE_B_MMS; + } else if (mimeType.equals(WspTypeDecoder.CONTENT_MIME_TYPE_B_VND_DOCOMO_PF)) { + binaryContentType = WspTypeDecoder.CONTENT_TYPE_B_VND_DOCOMO_PF; } else { if (Config.LOGD) Log.w(LOG_TAG, "Received PDU. Unknown Content-Type = " + mimeType); return Intents.RESULT_SMS_HANDLED; diff --git a/telephony/java/com/android/internal/telephony/WspTypeDecoder.java b/telephony/java/com/android/internal/telephony/WspTypeDecoder.java index 3bbe0e1..336bc82 100644 --- a/telephony/java/com/android/internal/telephony/WspTypeDecoder.java +++ b/telephony/java/com/android/internal/telephony/WspTypeDecoder.java @@ -30,12 +30,16 @@ public class WspTypeDecoder { public static final int PDU_TYPE_PUSH = 0x06; public static final int PDU_TYPE_CONFIRMED_PUSH = 0x07; + // TODO we should have mapping between those binary code and mime type string. + // see http://www.openmobilealliance.org/tech/omna/omna-wsp-content-type.aspx + public static final int CONTENT_TYPE_B_DRM_RIGHTS_XML = 0x4a; public static final int CONTENT_TYPE_B_DRM_RIGHTS_WBXML = 0x4b; public static final int CONTENT_TYPE_B_PUSH_SI = 0x2e; public static final int CONTENT_TYPE_B_PUSH_SL = 0x30; public static final int CONTENT_TYPE_B_PUSH_CO = 0x32; public static final int CONTENT_TYPE_B_MMS = 0x3e; + public static final int CONTENT_TYPE_B_VND_DOCOMO_PF = 0x0310; public static final String CONTENT_MIME_TYPE_B_DRM_RIGHTS_XML = "application/vnd.oma.drm.rights+xml"; @@ -45,6 +49,7 @@ public class WspTypeDecoder { public static final String CONTENT_MIME_TYPE_B_PUSH_SL = "application/vnd.wap.slc"; public static final String CONTENT_MIME_TYPE_B_PUSH_CO = "application/vnd.wap.coc"; public static final String CONTENT_MIME_TYPE_B_MMS = "application/vnd.wap.mms-message"; + public static final String CONTENT_MIME_TYPE_B_VND_DOCOMO_PF = "application/vnd.docomo.pf"; public static final int PARAMETER_ID_X_WAP_APPLICATION_ID = 0x2f; |