Messaging: Fix modifiers
We either have too few or too many Change-Id: I09a9a38b859c68526fcbcdbc7862afe1d693f6c0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +37,7 @@ import com.android.messaging.util.Assert;
|
||||
public class BlockedParticipantsData extends BindableData implements
|
||||
LoaderManager.LoaderCallbacks<Cursor> {
|
||||
public interface BlockedParticipantsDataListener {
|
||||
public void onBlockedParticipantsCursorUpdated(final Cursor cursor);
|
||||
void onBlockedParticipantsCursorUpdated(final Cursor cursor);
|
||||
}
|
||||
private static final String BINDING_ID = "bindingId";
|
||||
private static final int BLOCKED_PARTICIPANTS_LOADER = 1;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -103,12 +104,12 @@ public class ConversationData extends BindableData {
|
||||
}
|
||||
|
||||
public interface ConversationDataListener {
|
||||
public void onConversationMessagesCursorUpdated(ConversationData data, Cursor cursor,
|
||||
void onConversationMessagesCursorUpdated(ConversationData data, Cursor cursor,
|
||||
@Nullable ConversationMessageData newestMessage, boolean isSync);
|
||||
public void onConversationMetadataUpdated(ConversationData data);
|
||||
public void closeConversation(String conversationId);
|
||||
public void onConversationParticipantDataLoaded(ConversationData data);
|
||||
public void onSubscriptionListDataLoaded(ConversationData data);
|
||||
void onConversationMetadataUpdated(ConversationData data);
|
||||
void closeConversation(String conversationId);
|
||||
void onConversationParticipantDataLoaded(ConversationData data);
|
||||
void onSubscriptionListDataLoaded(ConversationData data);
|
||||
}
|
||||
|
||||
private static class ReversedCursor extends CursorWrapper {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,8 +52,8 @@ public class ConversationListData extends BindableData
|
||||
"(" + ConversationListViewColumns.ARCHIVE_STATUS + " = 0)";
|
||||
|
||||
public interface ConversationListDataListener {
|
||||
public void onConversationListCursorUpdated(ConversationListData data, Cursor cursor);
|
||||
public void setBlockedParticipantsAvailable(boolean blockedAvailable);
|
||||
void onConversationListCursorUpdated(ConversationListData data, Cursor cursor);
|
||||
void setBlockedParticipantsAvailable(boolean blockedAvailable);
|
||||
}
|
||||
|
||||
private ConversationListDataListener mListener;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -261,11 +262,11 @@ public class ConversationListItemData {
|
||||
/**
|
||||
* Get the name of the view for this data item
|
||||
*/
|
||||
public static final String getConversationListView() {
|
||||
public static String getConversationListView() {
|
||||
return CONVERSATION_LIST_VIEW;
|
||||
}
|
||||
|
||||
public static final String getConversationListViewSql() {
|
||||
public static String getConversationListViewSql() {
|
||||
return CONVERSATION_LIST_VIEW_SQL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -620,7 +621,7 @@ public class ConversationMessageData {
|
||||
|
||||
// Data definitions
|
||||
|
||||
public static final String getConversationMessagesQuerySql() {
|
||||
public static String getConversationMessagesQuerySql() {
|
||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||
+ " AND "
|
||||
// Inject the conversation id
|
||||
@@ -628,7 +629,7 @@ public class ConversationMessageData {
|
||||
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
||||
}
|
||||
|
||||
static final String getConversationMessageIdsQuerySql() {
|
||||
static String getConversationMessageIdsQuerySql() {
|
||||
return CONVERSATION_MESSAGES_IDS_QUERY_SQL
|
||||
+ " AND "
|
||||
// Inject the conversation id
|
||||
@@ -636,7 +637,7 @@ public class ConversationMessageData {
|
||||
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
||||
}
|
||||
|
||||
public static final String getNotificationQuerySql() {
|
||||
public static String getNotificationQuerySql() {
|
||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||
+ " AND "
|
||||
+ "(" + DatabaseHelper.MessageColumns.STATUS + " in ("
|
||||
@@ -648,7 +649,7 @@ public class ConversationMessageData {
|
||||
+ NOTIFICATION_QUERY_SQL_GROUP_BY;
|
||||
}
|
||||
|
||||
public static final String getWearableQuerySql() {
|
||||
public static String getWearableQuerySql() {
|
||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||
+ " AND "
|
||||
+ DatabaseHelper.MESSAGES_TABLE + "." + MessageColumns.CONVERSATION_ID + "=?"
|
||||
@@ -808,37 +809,37 @@ public class ConversationMessageData {
|
||||
+ DatabaseHelper.MESSAGES_TABLE + '.' + MessageColumns.RECEIVED_TIMESTAMP + " DESC";
|
||||
|
||||
interface ConversationMessageViewColumns extends BaseColumns {
|
||||
static final String _ID = MessageColumns._ID;
|
||||
static final String CONVERSATION_ID = MessageColumns.CONVERSATION_ID;
|
||||
static final String PARTICIPANT_ID = MessageColumns.SENDER_PARTICIPANT_ID;
|
||||
static final String PARTS_COUNT = "parts_count";
|
||||
static final String SENT_TIMESTAMP = MessageColumns.SENT_TIMESTAMP;
|
||||
static final String RECEIVED_TIMESTAMP = MessageColumns.RECEIVED_TIMESTAMP;
|
||||
static final String SEEN = MessageColumns.SEEN;
|
||||
static final String READ = MessageColumns.READ;
|
||||
static final String PROTOCOL = MessageColumns.PROTOCOL;
|
||||
static final String STATUS = MessageColumns.STATUS;
|
||||
static final String SMS_MESSAGE_URI = MessageColumns.SMS_MESSAGE_URI;
|
||||
static final String SMS_PRIORITY = MessageColumns.SMS_PRIORITY;
|
||||
static final String SMS_MESSAGE_SIZE = MessageColumns.SMS_MESSAGE_SIZE;
|
||||
static final String MMS_SUBJECT = MessageColumns.MMS_SUBJECT;
|
||||
static final String MMS_EXPIRY = MessageColumns.MMS_EXPIRY;
|
||||
static final String RAW_TELEPHONY_STATUS = MessageColumns.RAW_TELEPHONY_STATUS;
|
||||
static final String SELF_PARTICIPANT_ID = MessageColumns.SELF_PARTICIPANT_ID;
|
||||
static final String SENDER_FULL_NAME = ParticipantColumns.FULL_NAME;
|
||||
static final String SENDER_FIRST_NAME = ParticipantColumns.FIRST_NAME;
|
||||
static final String SENDER_DISPLAY_DESTINATION = ParticipantColumns.DISPLAY_DESTINATION;
|
||||
static final String SENDER_NORMALIZED_DESTINATION =
|
||||
String _ID = MessageColumns._ID;
|
||||
String CONVERSATION_ID = MessageColumns.CONVERSATION_ID;
|
||||
String PARTICIPANT_ID = MessageColumns.SENDER_PARTICIPANT_ID;
|
||||
String PARTS_COUNT = "parts_count";
|
||||
String SENT_TIMESTAMP = MessageColumns.SENT_TIMESTAMP;
|
||||
String RECEIVED_TIMESTAMP = MessageColumns.RECEIVED_TIMESTAMP;
|
||||
String SEEN = MessageColumns.SEEN;
|
||||
String READ = MessageColumns.READ;
|
||||
String PROTOCOL = MessageColumns.PROTOCOL;
|
||||
String STATUS = MessageColumns.STATUS;
|
||||
String SMS_MESSAGE_URI = MessageColumns.SMS_MESSAGE_URI;
|
||||
String SMS_PRIORITY = MessageColumns.SMS_PRIORITY;
|
||||
String SMS_MESSAGE_SIZE = MessageColumns.SMS_MESSAGE_SIZE;
|
||||
String MMS_SUBJECT = MessageColumns.MMS_SUBJECT;
|
||||
String MMS_EXPIRY = MessageColumns.MMS_EXPIRY;
|
||||
String RAW_TELEPHONY_STATUS = MessageColumns.RAW_TELEPHONY_STATUS;
|
||||
String SELF_PARTICIPANT_ID = MessageColumns.SELF_PARTICIPANT_ID;
|
||||
String SENDER_FULL_NAME = ParticipantColumns.FULL_NAME;
|
||||
String SENDER_FIRST_NAME = ParticipantColumns.FIRST_NAME;
|
||||
String SENDER_DISPLAY_DESTINATION = ParticipantColumns.DISPLAY_DESTINATION;
|
||||
String SENDER_NORMALIZED_DESTINATION =
|
||||
ParticipantColumns.NORMALIZED_DESTINATION;
|
||||
static final String SENDER_PROFILE_PHOTO_URI = ParticipantColumns.PROFILE_PHOTO_URI;
|
||||
static final String SENDER_CONTACT_ID = ParticipantColumns.CONTACT_ID;
|
||||
static final String SENDER_CONTACT_LOOKUP_KEY = ParticipantColumns.LOOKUP_KEY;
|
||||
static final String PARTS_IDS = "parts_ids";
|
||||
static final String PARTS_CONTENT_TYPES = "parts_content_types";
|
||||
static final String PARTS_CONTENT_URIS = "parts_content_uris";
|
||||
static final String PARTS_WIDTHS = "parts_widths";
|
||||
static final String PARTS_HEIGHTS = "parts_heights";
|
||||
static final String PARTS_TEXTS = "parts_texts";
|
||||
String SENDER_PROFILE_PHOTO_URI = ParticipantColumns.PROFILE_PHOTO_URI;
|
||||
String SENDER_CONTACT_ID = ParticipantColumns.CONTACT_ID;
|
||||
String SENDER_CONTACT_LOOKUP_KEY = ParticipantColumns.LOOKUP_KEY;
|
||||
String PARTS_IDS = "parts_ids";
|
||||
String PARTS_CONTENT_TYPES = "parts_content_types";
|
||||
String PARTS_CONTENT_URIS = "parts_content_uris";
|
||||
String PARTS_WIDTHS = "parts_widths";
|
||||
String PARTS_HEIGHTS = "parts_heights";
|
||||
String PARTS_TEXTS = "parts_texts";
|
||||
}
|
||||
|
||||
private static int sIndexIncrementer = 0;
|
||||
@@ -878,7 +879,7 @@ public class ConversationMessageData {
|
||||
private static final int INDEX_SENDER_CONTACT_LOOKUP_KEY = sIndexIncrementer++;
|
||||
|
||||
|
||||
private static String[] sProjection = {
|
||||
private static final String[] sProjection = {
|
||||
ConversationMessageViewColumns._ID,
|
||||
ConversationMessageViewColumns.CONVERSATION_ID,
|
||||
ConversationMessageViewColumns.PARTICIPANT_ID,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -70,16 +71,16 @@ public class DraftMessageData extends BindableData implements ReadDraftDataActio
|
||||
}
|
||||
|
||||
// Flags sent to onDraftChanged to help the receiver limit the amount of work done
|
||||
public static int ATTACHMENTS_CHANGED = 0x0001;
|
||||
public static int MESSAGE_TEXT_CHANGED = 0x0002;
|
||||
public static int MESSAGE_SUBJECT_CHANGED = 0x0004;
|
||||
public static final int ATTACHMENTS_CHANGED = 0x0001;
|
||||
public static final int MESSAGE_TEXT_CHANGED = 0x0002;
|
||||
public static final int MESSAGE_SUBJECT_CHANGED = 0x0004;
|
||||
// Whether the self participant data has been loaded
|
||||
public static int SELF_CHANGED = 0x0008;
|
||||
public static int ALL_CHANGED = 0x00FF;
|
||||
public static final int SELF_CHANGED = 0x0008;
|
||||
public static final int ALL_CHANGED = 0x00FF;
|
||||
// ALL_CHANGED intentionally doesn't include WIDGET_CHANGED. ConversationFragment needs to
|
||||
// be notified if the draft it is looking at is changed externally (by a desktop widget) so it
|
||||
// can reload the draft.
|
||||
public static int WIDGET_CHANGED = 0x0100;
|
||||
public static final int WIDGET_CHANGED = 0x0100;
|
||||
|
||||
private final String mConversationId;
|
||||
private ReadDraftDataActionMonitor mMonitor;
|
||||
@@ -91,7 +92,7 @@ public class DraftMessageData extends BindableData implements ReadDraftDataActio
|
||||
private String mMessageText;
|
||||
private String mMessageSubject;
|
||||
private String mSelfId;
|
||||
private MessageTextStats mMessageTextStats;
|
||||
private final MessageTextStats mMessageTextStats;
|
||||
private boolean mSending;
|
||||
|
||||
/** Keeps track of completed attachments in the message draft. This data is persisted to db */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -141,7 +142,7 @@ public class MessageData implements Parcelable {
|
||||
public static final int BUGLE_STATUS_INCOMING_DOWNLOAD_FAILED = 106;
|
||||
public static final int BUGLE_STATUS_INCOMING_EXPIRED_OR_NOT_AVAILABLE = 107;
|
||||
|
||||
public static final String getStatusDescription(int status) {
|
||||
public static String getStatusDescription(int status) {
|
||||
switch (status) {
|
||||
case BUGLE_STATUS_UNKNOWN:
|
||||
return "UNKNOWN";
|
||||
@@ -646,7 +647,7 @@ public class MessageData implements Parcelable {
|
||||
|| mProtocol == MessageData.PROTOCOL_MMS_PUSH_NOTIFICATION;
|
||||
}
|
||||
|
||||
public static final boolean getIsMmsNotification(final int protocol) {
|
||||
public static boolean getIsMmsNotification(final int protocol) {
|
||||
return (protocol == MessageData.PROTOCOL_MMS_PUSH_NOTIFICATION);
|
||||
}
|
||||
|
||||
@@ -654,7 +655,7 @@ public class MessageData implements Parcelable {
|
||||
return getIsMmsNotification(mProtocol);
|
||||
}
|
||||
|
||||
public static final boolean getIsSms(final int protocol) {
|
||||
public static boolean getIsSms(final int protocol) {
|
||||
return protocol == (MessageData.PROTOCOL_SMS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user