Messaging: Add "Mark as read" quick action for message notifications
Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com> Change-Id: I7194dca022e5062926fa35709de282721ca64320
This commit is contained in:
@@ -43,7 +43,8 @@ import java.util.HashSet;
|
||||
public abstract class NotificationState {
|
||||
private static final int CONTENT_INTENT_REQUEST_CODE_OFFSET = 0;
|
||||
private static final int CLEAR_INTENT_REQUEST_CODE_OFFSET = 1;
|
||||
private static final int NUM_REQUEST_CODES_NEEDED = 2;
|
||||
private static final int READ_INTENT_REQUEST_CODE_OFFSET = 2;
|
||||
private static final int NUM_REQUEST_CODES_NEEDED = 3;
|
||||
|
||||
public interface FailedMessageQuery {
|
||||
static final String FAILED_MESSAGES_WHERE_CLAUSE =
|
||||
@@ -78,6 +79,11 @@ public abstract class NotificationState {
|
||||
*/
|
||||
public abstract PendingIntent getClearIntent();
|
||||
|
||||
/**
|
||||
* The intent to be triggered when mark as read is pressed.
|
||||
*/
|
||||
public abstract PendingIntent getReadIntent();
|
||||
|
||||
protected Uri getAttachmentUri() {
|
||||
return null;
|
||||
}
|
||||
@@ -116,6 +122,10 @@ public abstract class NotificationState {
|
||||
return mBaseRequestCode + CLEAR_INTENT_REQUEST_CODE_OFFSET;
|
||||
}
|
||||
|
||||
public int getReadIntentRequestCode() {
|
||||
return mBaseRequestCode + READ_INTENT_REQUEST_CODE_OFFSET;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate icon needed for notifications.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user