diff options
author | Tom Taylor <tomtaylor@google.com> | 2020-01-24 10:21:50 -0800 |
---|---|---|
committer | Tom Taylor <tomtaylor@google.com> | 2020-01-28 11:01:50 -0800 |
commit | 03079ec3e1811088c8dc8abc9ebd849d2ae70a29 (patch) | |
tree | 9739db6f764e5905932cc39e2195b2b77d53a55e /mms | |
parent | 9497e10f8f7420cfbfb1ae4a03a639d7232f75b7 (diff) | |
download | base-03079ec3e1811088c8dc8abc9ebd849d2ae70a29.tar.gz |
Add optional messageId methods for sending/receiving mms's
Bug: 148235962
Test: manually tested the new MMS apis using the Messages app
Change-Id: I578a9875ba9b0d73c03a61c5878c396d76f8aa52
Diffstat (limited to 'mms')
-rw-r--r-- | mms/java/android/telephony/MmsManager.java | 14 | ||||
-rw-r--r-- | mms/java/com/android/internal/telephony/IMms.aidl | 9 |
2 files changed, 16 insertions, 7 deletions
diff --git a/mms/java/android/telephony/MmsManager.java b/mms/java/android/telephony/MmsManager.java index cf55eba6e5ba..f07cd5e34062 100644 --- a/mms/java/android/telephony/MmsManager.java +++ b/mms/java/android/telephony/MmsManager.java @@ -55,10 +55,12 @@ public class MmsManager { * sending the message. * @param sentIntent if not NULL this <code>PendingIntent</code> is broadcast when the message * is successfully sent, or failed + * @param messageId an id that uniquely identifies the message requested to be sent. + * Used for logging and diagnostics purposes. The id may be 0. */ public void sendMultimediaMessage(int subId, @NonNull Uri contentUri, @Nullable String locationUrl, @Nullable Bundle configOverrides, - @Nullable PendingIntent sentIntent) { + @Nullable PendingIntent sentIntent, long messageId) { try { final IMms iMms = IMms.Stub.asInterface(ServiceManager.getService("imms")); if (iMms == null) { @@ -66,7 +68,7 @@ public class MmsManager { } iMms.sendMessage(subId, ActivityThread.currentPackageName(), contentUri, - locationUrl, configOverrides, sentIntent); + locationUrl, configOverrides, sentIntent, messageId); } catch (RemoteException e) { // Ignore it } @@ -83,18 +85,22 @@ public class MmsManager { * downloading the message. * @param downloadedIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is downloaded, or the download is failed + * @param messageId an id that uniquely identifies the message requested to be downloaded. + * Used for logging and diagnostics purposes. The id may be 0. + * downloaded. * @throws IllegalArgumentException if locationUrl or contentUri is empty */ public void downloadMultimediaMessage(int subId, @NonNull String locationUrl, @NonNull Uri contentUri, @Nullable Bundle configOverrides, - @Nullable PendingIntent downloadedIntent) { + @Nullable PendingIntent downloadedIntent, long messageId) { try { final IMms iMms = IMms.Stub.asInterface(ServiceManager.getService("imms")); if (iMms == null) { return; } iMms.downloadMessage(subId, ActivityThread.currentPackageName(), - locationUrl, contentUri, configOverrides, downloadedIntent); + locationUrl, contentUri, configOverrides, downloadedIntent, + messageId); } catch (RemoteException e) { // Ignore it } diff --git a/mms/java/com/android/internal/telephony/IMms.aidl b/mms/java/com/android/internal/telephony/IMms.aidl index 8be511186800..e0e0a4a812e4 100644 --- a/mms/java/com/android/internal/telephony/IMms.aidl +++ b/mms/java/com/android/internal/telephony/IMms.aidl @@ -37,9 +37,11 @@ interface IMms { * sending the message. See {@link android.telephony.SmsManager} for the value names and types. * @param sentIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is successfully sent, or failed + * @param messageId An id that uniquely identifies the message requested to be sent. */ void sendMessage(int subId, String callingPkg, in Uri contentUri, - String locationUrl, in Bundle configOverrides, in PendingIntent sentIntent); + String locationUrl, in Bundle configOverrides, in PendingIntent sentIntent, + in long messageId); /** * Download an MMS message using known location and transaction id @@ -54,10 +56,11 @@ interface IMms { * types. * @param downloadedIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is downloaded, or the download is failed - */ + * @param messageId An id that uniquely identifies the message requested to be downloaded. + */ void downloadMessage(int subId, String callingPkg, String locationUrl, in Uri contentUri, in Bundle configOverrides, - in PendingIntent downloadedIntent); + in PendingIntent downloadedIntent, in long messageId); /** * Import a text message into system's SMS store |