summaryrefslogtreecommitdiff
path: root/mms
diff options
context:
space:
mode:
authorNan Wu <wnan@google.com>2022-03-17 21:25:41 +0000
committerNan Wu <wnan@google.com>2022-03-22 16:58:07 +0000
commit98c4874deeda61b113ea70218d933414cca8f5ee (patch)
treeaa26e884d51bd43d1026d4559c078d14aeab8237 /mms
parent81aa343c4c7f5e42a29120bb88c9e8923e50d929 (diff)
downloadbase-98c4874deeda61b113ea70218d933414cca8f5ee.tar.gz
Add attribution tag to MMS Service
MmsManager picks up client app's attribution tag and send it to MmsServiceBroker. MmsServiceBroker includes it in the call to noteOp. It then calls MmsService sendMessage and pass it along. These changes are applied to sendMessage and downloadMessage methods only. Null entries are passed to noteOp methods in other methods like importTextMessage, etc. These methods were removed from MmsManager(ag/9431535), but not removed from IMms. Bug: 224831002 Test: Manually verify multimedia send/receive message. Change-Id: I83a1b5c4c184747d9a22f672b1dbd4f02950c645
Diffstat (limited to 'mms')
-rw-r--r--mms/java/android/telephony/MmsManager.java5
-rw-r--r--mms/java/com/android/internal/telephony/IMms.aidl8
2 files changed, 8 insertions, 5 deletions
diff --git a/mms/java/android/telephony/MmsManager.java b/mms/java/android/telephony/MmsManager.java
index d541da09f45d..b893b45611fb 100644
--- a/mms/java/android/telephony/MmsManager.java
+++ b/mms/java/android/telephony/MmsManager.java
@@ -70,7 +70,8 @@ public class MmsManager {
}
iMms.sendMessage(subId, ActivityThread.currentPackageName(), contentUri,
- locationUrl, configOverrides, sentIntent, messageId);
+ locationUrl, configOverrides, sentIntent, messageId,
+ mContext.getAttributionTag());
} catch (RemoteException e) {
// Ignore it
}
@@ -102,7 +103,7 @@ public class MmsManager {
}
iMms.downloadMessage(subId, ActivityThread.currentPackageName(),
locationUrl, contentUri, configOverrides, downloadedIntent,
- messageId);
+ messageId, mContext.getAttributionTag());
} 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 e0e0a4a812e4..3cdde10e4fc2 100644
--- a/mms/java/com/android/internal/telephony/IMms.aidl
+++ b/mms/java/com/android/internal/telephony/IMms.aidl
@@ -26,7 +26,7 @@ import android.os.Bundle;
*/
interface IMms {
/**
- * Send an MMS message
+ * Send an MMS message with attribution tag.
*
* @param subId the SIM id
* @param callingPkg the package name of the calling app
@@ -38,10 +38,11 @@ interface IMms {
* @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.
+ * @param attributionTag a tag that attributes the call to a client App.
*/
void sendMessage(int subId, String callingPkg, in Uri contentUri,
String locationUrl, in Bundle configOverrides, in PendingIntent sentIntent,
- in long messageId);
+ in long messageId, String attributionTag);
/**
* Download an MMS message using known location and transaction id
@@ -57,10 +58,11 @@ interface IMms {
* @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.
+ * @param attributionTag a tag that attributes the call to a client App.
*/
void downloadMessage(int subId, String callingPkg, String locationUrl,
in Uri contentUri, in Bundle configOverrides,
- in PendingIntent downloadedIntent, in long messageId);
+ in PendingIntent downloadedIntent, in long messageId, String attributionTag);
/**
* Import a text message into system's SMS store