Merge commit '5d2a7b26d6bb06f71904ecd7c828ae90d79b27ef' * commit '5d2a7b26d6bb06f71904ecd7c828ae90d79b27ef': Add DoCoMo vendor specific OMNA WSP content type number
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user