summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nagaraja <nlnu@google.com> 2019-08-23 22:06:14 -0700
committer android-build-merger <android-build-merger@google.com> 2019-08-23 22:06:14 -0700
commitf7db1c403ea9e4a6588a853b8bea06f70f5825d9 (patch)
tree11729f144a5b17c50cb116ce6ba0837438ada6b2
parent8649477e7408b363e259aa0d987c51258174539e (diff)
parente83d4f6c7dbeb0c0232badcf11fbb5ab9fdcb7bc (diff)
Merge "Added Part & Addr Constants." am: f5d5de8a0f am: 633db92447 am: 40efe816dd
am: e83d4f6c7d Change-Id: I58a2924860ac78bf9611fdb887b7ea7e0a313caa
-rw-r--r--api/current.txt2
-rw-r--r--telephony/java/android/provider/Telephony.java36
2 files changed, 37 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt
index dcc0aa5cfbbd..dffe7844edf0 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -39163,6 +39163,7 @@ package android.provider {
}
public static final class Telephony.Mms.Addr implements android.provider.BaseColumns {
+ method @NonNull public static android.net.Uri getAddrUriForMessage(@NonNull String);
field public static final String ADDRESS = "address";
field public static final String CHARSET = "charset";
field public static final String CONTACT_ID = "contact_id";
@@ -39191,6 +39192,7 @@ package android.provider {
}
public static final class Telephony.Mms.Part implements android.provider.BaseColumns {
+ method @NonNull public static android.net.Uri getPartUriForMessage(@NonNull String);
field public static final String CHARSET = "chset";
field public static final String CONTENT_DISPOSITION = "cd";
field public static final String CONTENT_ID = "cid";
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index 291c605a7b10..48373585231f 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -3034,6 +3034,20 @@ public final class Telephony {
* <P>Type: INTEGER</P>
*/
public static final String CHARSET = "charset";
+
+ /**
+ * Generates a Addr {@link Uri} for message, used to perform Addr table operation
+ * for mms.
+ *
+ * @param messageId the messageId used to generate Addr {@link Uri} dynamically
+ * @return the addrUri used to perform Addr table operation for mms
+ */
+ @NonNull
+ public static Uri getAddrUriForMessage(@NonNull String messageId) {
+ Uri addrUri = Mms.CONTENT_URI.buildUpon()
+ .appendPath(String.valueOf(messageId)).appendPath("addr").build();
+ return addrUri;
+ }
}
/**
@@ -3052,11 +3066,16 @@ public final class Telephony {
}
/**
+ * The name of part table.
+ */
+ private static final String TABLE_PART = "part";
+
+ /**
* The {@code content://} style URL for this table. Can be appended with a part ID to
* address individual parts.
*/
@NonNull
- public static final Uri CONTENT_URI = Uri.withAppendedPath(Mms.CONTENT_URI, "part");
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(Mms.CONTENT_URI, TABLE_PART);
/**
* The identifier of the message which this part belongs to.
@@ -3135,6 +3154,21 @@ public final class Telephony {
* <P>Type: TEXT</P>
*/
public static final String TEXT = "text";
+
+ /**
+ * Generates a Part {@link Uri} for message, used to perform Part table operation
+ * for mms.
+ *
+ * @param messageId the messageId used to generate Part {@link Uri} dynamically
+ * @return the partUri used to perform Part table operation for mms
+ */
+ @NonNull
+ public static Uri getPartUriForMessage(@NonNull String messageId) {
+ Uri partUri = Mms.CONTENT_URI.buildUpon()
+ .appendPath(String.valueOf(messageId)).appendPath(
+ TABLE_PART).build();
+ return partUri;
+ }
}
/**