diff --git a/core/api/current.txt b/core/api/current.txt index e4fc9f3a57d15..5944991d347ce 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -41215,8 +41215,11 @@ package android.telephony { field public static final String MMS_CONFIG_UA_PROF_URL = "uaProfUrl"; field public static final String MMS_CONFIG_USER_AGENT = "userAgent"; field public static final int MMS_ERROR_CONFIGURATION_ERROR = 7; // 0x7 + field public static final int MMS_ERROR_DATA_DISABLED = 11; // 0xb field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4 + field public static final int MMS_ERROR_INACTIVE_SUBSCRIPTION = 10; // 0xa field public static final int MMS_ERROR_INVALID_APN = 2; // 0x2 + field public static final int MMS_ERROR_INVALID_SUBSCRIPTION_ID = 9; // 0x9 field public static final int MMS_ERROR_IO_ERROR = 5; // 0x5 field public static final int MMS_ERROR_NO_DATA_NETWORK = 8; // 0x8 field public static final int MMS_ERROR_RETRY = 6; // 0x6 diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 5171cf9dcea76..e8e22b6fb08d2 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -2633,6 +2633,19 @@ public final class SmsManager { * sending the message. * @param sentIntent if not NULL this PendingIntent is * broadcast when the message is successfully sent, or failed + * The result code will be Activity.RESULT_OK for success + * or one of these errors:
+ * MMS_ERROR_UNSPECIFIED
+ * MMS_ERROR_INVALID_APN
+ * MMS_ERROR_UNABLE_CONNECT_MMS
+ * MMS_ERROR_HTTP_FAILURE
+ * MMS_ERROR_IO_ERROR
+ * MMS_ERROR_RETRY
+ * MMS_ERROR_CONFIGURATION_ERROR
+ * MMS_ERROR_NO_DATA_NETWORK
+ * MMS_ERROR_INVALID_SUBSCRIPTION_ID
+ * MMS_ERROR_INACTIVE_SUBSCRIPTION
+ * MMS_ERROR_DATA_DISABLED
* @throws IllegalArgumentException if contentUri is empty */ public void sendMultimediaMessage(Context context, Uri contentUri, String locationUrl, @@ -2661,6 +2674,19 @@ public final class SmsManager { * sending the message. * @param sentIntent if not NULL this PendingIntent is * broadcast when the message is successfully sent, or failed + * The result code will be Activity.RESULT_OK for success + * or one of these errors:
+ * MMS_ERROR_UNSPECIFIED
+ * MMS_ERROR_INVALID_APN
+ * MMS_ERROR_UNABLE_CONNECT_MMS
+ * MMS_ERROR_HTTP_FAILURE
+ * MMS_ERROR_IO_ERROR
+ * MMS_ERROR_RETRY
+ * MMS_ERROR_CONFIGURATION_ERROR
+ * MMS_ERROR_NO_DATA_NETWORK
+ * MMS_ERROR_INVALID_SUBSCRIPTION_ID
+ * MMS_ERROR_INACTIVE_SUBSCRIPTION
+ * MMS_ERROR_DATA_DISABLED
* @param messageId an id that uniquely identifies the message requested to be sent. * Used for logging and diagnostics purposes. The id may be 0. * @throws IllegalArgumentException if contentUri is empty @@ -2707,6 +2733,19 @@ public final class SmsManager { * downloading the message. * @param downloadedIntent if not NULL this PendingIntent is * broadcast when the message is downloaded, or the download is failed + * The result code will be Activity.RESULT_OK for success + * or one of these errors:
+ * MMS_ERROR_UNSPECIFIED
+ * MMS_ERROR_INVALID_APN
+ * MMS_ERROR_UNABLE_CONNECT_MMS
+ * MMS_ERROR_HTTP_FAILURE
+ * MMS_ERROR_IO_ERROR
+ * MMS_ERROR_RETRY
+ * MMS_ERROR_CONFIGURATION_ERROR
+ * MMS_ERROR_NO_DATA_NETWORK
+ * MMS_ERROR_INVALID_SUBSCRIPTION_ID
+ * MMS_ERROR_INACTIVE_SUBSCRIPTION
+ * MMS_ERROR_DATA_DISABLED
* @throws IllegalArgumentException if locationUrl or contentUri is empty */ public void downloadMultimediaMessage(Context context, String locationUrl, Uri contentUri, @@ -2737,6 +2776,19 @@ public final class SmsManager { * downloading the message. * @param downloadedIntent if not NULL this PendingIntent is * broadcast when the message is downloaded, or the download is failed + * The result code will be Activity.RESULT_OK for success + * or one of these errors:
+ * MMS_ERROR_UNSPECIFIED
+ * MMS_ERROR_INVALID_APN
+ * MMS_ERROR_UNABLE_CONNECT_MMS
+ * MMS_ERROR_HTTP_FAILURE
+ * MMS_ERROR_IO_ERROR
+ * MMS_ERROR_RETRY
+ * MMS_ERROR_CONFIGURATION_ERROR
+ * MMS_ERROR_NO_DATA_NETWORK
+ * MMS_ERROR_INVALID_SUBSCRIPTION_ID
+ * MMS_ERROR_INACTIVE_SUBSCRIPTION
+ * MMS_ERROR_DATA_DISABLED
* @param messageId an id that uniquely identifies the message requested to be downloaded. * Used for logging and diagnostics purposes. The id may be 0. * @throws IllegalArgumentException if locationUrl or contentUri is empty @@ -2768,15 +2820,62 @@ public final class SmsManager { } // MMS send/download failure result codes + + /** + * Unspecific MMS error occurred during send/download. + */ public static final int MMS_ERROR_UNSPECIFIED = 1; + + /** + * ApnException occurred during MMS network setup. + */ public static final int MMS_ERROR_INVALID_APN = 2; + + /** + * An error occurred during the MMS connection setup. + */ public static final int MMS_ERROR_UNABLE_CONNECT_MMS = 3; + + /** + * An error occurred during the HTTP client setup. + */ public static final int MMS_ERROR_HTTP_FAILURE = 4; + + /** + * An I/O error occurred reading the PDU. + */ public static final int MMS_ERROR_IO_ERROR = 5; + + /** + * An error occurred while retrying sending/downloading the MMS. + */ public static final int MMS_ERROR_RETRY = 6; + + /** + * The carrier-dependent configuration values could not be loaded. + */ public static final int MMS_ERROR_CONFIGURATION_ERROR = 7; + + /** + * There is no data network. + */ public static final int MMS_ERROR_NO_DATA_NETWORK = 8; + /** + * The subscription id for the send/download is invalid. + */ + public static final int MMS_ERROR_INVALID_SUBSCRIPTION_ID = 9; + + /** + * The subscription id for the send/download is inactive. + */ + public static final int MMS_ERROR_INACTIVE_SUBSCRIPTION = 10; + + /** + * Data is disabled for the MMS APN. + */ + public static final int MMS_ERROR_DATA_DISABLED = 11; + /** Intent extra name for MMS sending result data in byte array type */ public static final String EXTRA_MMS_DATA = "android.telephony.extra.MMS_DATA"; /** Intent extra name for HTTP status code for MMS HTTP failure in integer type */