summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt5
-rw-r--r--services/core/java/com/android/server/MmsServiceBroker.java9
-rw-r--r--telephony/java/com/android/internal/telephony/IMms.aidl10
3 files changed, 21 insertions, 3 deletions
diff --git a/api/current.txt b/api/current.txt
index cee64a3..a3a99c7 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -25926,7 +25926,6 @@ package android.provider {
}
public static abstract interface Telephony.BaseMmsColumns implements android.provider.BaseColumns {
- field public static final java.lang.String ARCHIVED = "archived";
field public static final java.lang.String CONTENT_CLASS = "ct_cls";
field public static final java.lang.String CONTENT_LOCATION = "ct_l";
field public static final java.lang.String CONTENT_TYPE = "ct_t";
@@ -26153,7 +26152,6 @@ package android.provider {
public static abstract interface Telephony.TextBasedSmsColumns {
field public static final java.lang.String ADDRESS = "address";
- field public static final java.lang.String ARCHIVED = "archived";
field public static final java.lang.String BODY = "body";
field public static final java.lang.String CREATOR = "creator";
field public static final java.lang.String DATE = "date";
@@ -26191,6 +26189,7 @@ package android.provider {
}
public static abstract interface Telephony.ThreadsColumns implements android.provider.BaseColumns {
+ field public static final java.lang.String ARCHIVED = "archived";
field public static final java.lang.String DATE = "date";
field public static final java.lang.String ERROR = "error";
field public static final java.lang.String HAS_ATTACHMENT = "has_attachment";
@@ -29399,6 +29398,7 @@ package android.telephony {
public final class SmsManager {
method public android.net.Uri addMultimediaMessageDraft(byte[]);
method public android.net.Uri addTextMessageDraft(java.lang.String, java.lang.String);
+ method public boolean archiveStoredConversation(long, boolean);
method public boolean deleteStoredConversation(long);
method public boolean deleteStoredMessage(android.net.Uri);
method public java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
@@ -29425,7 +29425,6 @@ package android.telephony {
method public void updateMmsSendStatus(int, boolean);
method public void updateSmsSendStatus(int, boolean);
method public boolean updateStoredMessageStatus(android.net.Uri, android.content.ContentValues);
- field public static final java.lang.String MESSAGE_STATUS_ARCHIVED = "archived";
field public static final java.lang.String MESSAGE_STATUS_READ = "read";
field public static final java.lang.String MESSAGE_STATUS_SEEN = "seen";
field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4
diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java
index 616b670..2fad73e 100644
--- a/services/core/java/com/android/server/MmsServiceBroker.java
+++ b/services/core/java/com/android/server/MmsServiceBroker.java
@@ -326,6 +326,15 @@ public class MmsServiceBroker extends SystemService {
}
@Override
+ public boolean archiveStoredConversation(String callingPkg, long conversationId,
+ boolean archived) throws RemoteException {
+ mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS,
+ "Update SMS/MMS message");
+ return getServiceGuarded()
+ .archiveStoredConversation(callingPkg, conversationId, archived);
+ }
+
+ @Override
public Uri addTextMessageDraft(String callingPkg, String address, String text)
throws RemoteException {
mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Add SMS draft");
diff --git a/telephony/java/com/android/internal/telephony/IMms.aidl b/telephony/java/com/android/internal/telephony/IMms.aidl
index 651205f..30ef725 100644
--- a/telephony/java/com/android/internal/telephony/IMms.aidl
+++ b/telephony/java/com/android/internal/telephony/IMms.aidl
@@ -183,6 +183,16 @@ interface IMms {
in ContentValues statusValues);
/**
+ * Archive or unarchive a stored conversation
+ *
+ * @param callingPkg the package name of the calling app
+ * @param conversationId the ID of the message conversation
+ * @param archived true to archive the conversation, false otherwise
+ * @return true if update is successful, false otherwise
+ */
+ boolean archiveStoredConversation(String callingPkg, long conversationId, boolean archived);
+
+ /**
* Add a text message draft to system SMS store
*
* @param callingPkg the package name of the calling app