Messaging: Fix modifiers

We either have too few or too many

Change-Id: I09a9a38b859c68526fcbcdbc7862afe1d693f6c0
This commit is contained in:
Michael W
2024-12-26 14:55:12 +01:00
parent 37d6d70835
commit 21cb2b6289
78 changed files with 528 additions and 464 deletions
@@ -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.
@@ -87,7 +88,7 @@ public class ConversationImagePartsView {
}
public interface PhotoViewQuery {
public final String[] PROJECTION = {
String[] PROJECTION = {
PhotoViewColumns.URI,
PhotoViewColumns.NAME,
PhotoViewColumns.CONTENT_URI,
@@ -99,22 +100,22 @@ public class ConversationImagePartsView {
Columns.STATUS,
};
public final int INDEX_URI = 0;
public final int INDEX_SENDER_FULL_NAME = 1;
public final int INDEX_CONTENT_URI = 2;
public final int INDEX_THUMBNAIL_URI = 3;
public final int INDEX_CONTENT_TYPE = 4;
int INDEX_URI = 0;
int INDEX_SENDER_FULL_NAME = 1;
int INDEX_CONTENT_URI = 2;
int INDEX_THUMBNAIL_URI = 3;
int INDEX_CONTENT_TYPE = 4;
// Columns in addition to those specified by PhotoContract
public final int INDEX_DISPLAY_DESTINATION = 5;
public final int INDEX_RECEIVED_TIMESTAMP = 6;
public final int INDEX_STATUS = 7;
int INDEX_DISPLAY_DESTINATION = 5;
int INDEX_RECEIVED_TIMESTAMP = 6;
int INDEX_STATUS = 7;
}
static final String getViewName() {
static String getViewName() {
return VIEW_NAME;
}
static final String getCreateSql() {
static String getCreateSql() {
return CREATE_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.
@@ -59,12 +60,11 @@ public abstract class DataModel {
return Factory.get().getDataModel();
}
public static final void startActionService(final Action action) {
public static void startActionService(final Action action) {
get().getActionService().startAction(action);
}
public static final void scheduleAction(final Action action,
final int code, final long delayMs) {
public static void scheduleAction(final Action action, final int code, final long delayMs) {
get().getActionService().scheduleAction(action, code, delayMs);
}
@@ -44,7 +44,7 @@ import com.android.messaging.util.LogUtil;
public class DatabaseHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "bugle_db";
private static final int getDatabaseVersion(final Context context) {
private static int getDatabaseVersion(final Context context) {
return Integer.parseInt(context.getResources().getString(R.string.database_version));
}
@@ -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.
@@ -65,7 +66,7 @@ public class DatabaseWrapper {
}
// track transaction on a per thread basis
private static ThreadLocal<Stack<TransactionData>> sTransactionDepth =
private static final ThreadLocal<Stack<TransactionData>> sTransactionDepth =
new ThreadLocal<Stack<TransactionData>>() {
@Override
public Stack<TransactionData> initialValue() {
@@ -73,7 +74,7 @@ public class DatabaseWrapper {
}
};
private static String[] sFormatStrings = new String[] {
private static final String[] sFormatStrings = new String[] {
"took %d ms to %s",
" took %d ms to %s",
" took %d ms to %s",
@@ -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.
@@ -146,11 +147,11 @@ public abstract class MessageNotificationState extends NotificationState {
*/
static class MessageLineInfo extends NotificationLineInfo {
final CharSequence mText;
Uri mAttachmentUri;
String mAttachmentType;
final Uri mAttachmentUri;
final String mAttachmentType;
final String mAuthorFullName;
final String mAuthorFirstName;
boolean mIsManualDownloadNeeded;
final boolean mIsManualDownloadNeeded;
final String mMessageId;
MessageLineInfo(final boolean isGroup, final String authorFullName,
@@ -792,7 +793,7 @@ public abstract class MessageNotificationState extends NotificationState {
* with notifications for other conversations on a wearable device.
*/
public static class BundledMessageNotificationState extends MultiMessageNotificationState {
public int mGroupOrder;
public final int mGroupOrder;
public BundledMessageNotificationState(final ConversationInfoList convList,
final int groupOrder) {
super(convList);
@@ -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.
@@ -46,14 +47,14 @@ public abstract class NotificationState {
private static final int NUM_REQUEST_CODES_NEEDED = 2;
public interface FailedMessageQuery {
static final String FAILED_MESSAGES_WHERE_CLAUSE =
String FAILED_MESSAGES_WHERE_CLAUSE =
"((" + MessageColumns.STATUS + " = " +
MessageData.BUGLE_STATUS_OUTGOING_FAILED + " OR " +
MessageColumns.STATUS + " = " +
MessageData.BUGLE_STATUS_INCOMING_DOWNLOAD_FAILED + ") AND " +
DatabaseHelper.MessageColumns.SEEN + " = 0)";
static final String FAILED_ORDER_BY = DatabaseHelper.MessageColumns.CONVERSATION_ID + ", " +
String FAILED_ORDER_BY = DatabaseHelper.MessageColumns.CONVERSATION_ID + ", " +
DatabaseHelper.MessageColumns.SENT_TIMESTAMP + " asc";
}
@@ -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.
@@ -310,7 +311,7 @@ public class ParticipantRefresh {
+ ParticipantData.OTHER_THAN_SELF_SUB_ID
+ " )";
private static final Set<Integer> getExistingSubIds() {
private static Set<Integer> getExistingSubIds() {
final DatabaseWrapper db = DataModel.get().getDatabase();
final HashSet<Integer> existingSubIds = new HashSet<Integer>();
@@ -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.
@@ -43,7 +44,7 @@ public abstract class Action implements Parcelable {
public final String actionKey;
// If derived classes keep their data in actionParameters then parcelable is trivial
protected Bundle actionParameters;
protected final Bundle actionParameters;
// This does not get written to the parcel
private final List<Action> mBackgroundActions = new LinkedList<Action>();
@@ -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.
@@ -52,8 +53,8 @@ public class ActionMonitor {
* @param result value returned by {@link Action#executeAction}
*/
@RunsOnMainThread
abstract void onActionExecuted(ActionMonitor monitor, final Action action,
final Object data, final Object result);
void onActionExecuted(ActionMonitor monitor, final Action action,
final Object data, final Object result);
}
/**
@@ -67,14 +68,14 @@ public class ActionMonitor {
* {@link Action#processBackgroundResponse}
*/
@RunsOnMainThread
abstract void onActionSucceeded(ActionMonitor monitor,
final Action action, final Object data, final Object result);
void onActionSucceeded(ActionMonitor monitor,
final Action action, final Object data, final Object result);
/**
* @param result value returned by {@link Action#processBackgroundFailure}
*/
@RunsOnMainThread
abstract void onActionFailed(ActionMonitor monitor, final Action action,
final Object data, final Object result);
void onActionFailed(ActionMonitor monitor, final Action action,
final Object data, final Object result);
}
/**
@@ -291,9 +292,8 @@ public class ActionMonitor {
* else the value returned by {@link Action#processBackgroundResponse}
* or {@link Action#processBackgroundFailure}
*/
private final void complete(final Action action,
final int expectedOldState, final Object result,
final boolean succeeded) {
private void complete(final Action action, final int expectedOldState, final Object result,
final boolean succeeded) {
ActionCompletedListener completedListener = null;
synchronized (mLock) {
setState(action, expectedOldState, STATE_COMPLETE);
@@ -419,7 +419,7 @@ public class ActionMonitor {
* Map of action monitors indexed by actionKey
*/
@VisibleForTesting
static SimpleArrayMap<String, ActionMonitor> sActionMonitors =
static final SimpleArrayMap<String, ActionMonitor> sActionMonitors =
new SimpleArrayMap<String, ActionMonitor>();
/**
@@ -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,14 +52,14 @@ public class DownloadMmsAction extends Action implements Parcelable {
*/
public interface DownloadMmsActionListener {
@RunsOnMainThread
abstract void onDownloadMessageStarting(final ActionMonitor monitor,
final Object data, final MessageData message);
void onDownloadMessageStarting(final ActionMonitor monitor,
final Object data, final MessageData message);
@RunsOnMainThread
abstract void onDownloadMessageSucceeded(final ActionMonitor monitor,
final Object data, final MessageData message);
void onDownloadMessageSucceeded(final ActionMonitor monitor,
final Object data, final MessageData message);
@RunsOnMainThread
abstract void onDownloadMessageFailed(final ActionMonitor monitor,
final Object data, final MessageData message);
void onDownloadMessageFailed(final ActionMonitor monitor,
final Object data, final MessageData message);
}
/**
@@ -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.
@@ -43,12 +44,12 @@ public class GetOrCreateConversationAction extends Action implements Parcelable
*/
public interface GetOrCreateConversationActionListener {
@RunsOnMainThread
abstract void onGetOrCreateConversationSucceeded(final ActionMonitor monitor,
final Object data, final String conversationId);
void onGetOrCreateConversationSucceeded(final ActionMonitor monitor,
final Object data, final String conversationId);
@RunsOnMainThread
abstract void onGetOrCreateConversationFailed(final ActionMonitor monitor,
final Object data);
void onGetOrCreateConversationFailed(final ActionMonitor monitor,
final Object data);
}
public static GetOrCreateConversationActionMonitor getOrCreateConversation(
@@ -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.
@@ -37,11 +38,11 @@ public class ReadDraftDataAction extends Action implements Parcelable {
*/
public interface ReadDraftDataActionListener {
@RunsOnMainThread
abstract void onReadDraftDataSucceeded(final ReadDraftDataAction action,
final Object data, final MessageData message,
final ConversationListItemData conversation);
void onReadDraftDataSucceeded(final ReadDraftDataAction action,
final Object data, final MessageData message,
final ConversationListItemData conversation);
@RunsOnMainThread
abstract void onReadDraftDataFailed(final ReadDraftDataAction action, final Object data);
void onReadDraftDataFailed(final ReadDraftDataAction action, final Object data);
}
/**
@@ -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.
@@ -306,19 +307,19 @@ class SyncCursorPair {
*
* @return The next element (which becomes the current)
*/
public DatabaseMessage next();
DatabaseMessage next();
/**
* Close the cursor
*/
public void close();
void close();
/**
* Get the position
*/
public int getPosition();
int getPosition();
/**
* Get the count
*/
public int getCount();
int getCount();
}
private static final String ORDER_BY_DATE_DESC = "date DESC";
@@ -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.
@@ -28,10 +29,10 @@ import com.android.messaging.util.Assert;
public class UpdateDestinationBlockedAction extends Action {
public interface UpdateDestinationBlockedActionListener {
@Assert.RunsOnMainThread
abstract void onUpdateDestinationBlockedAction(final UpdateDestinationBlockedAction action,
final boolean success,
final boolean block,
final String destination);
void onUpdateDestinationBlockedAction(final UpdateDestinationBlockedAction action,
final boolean success,
final boolean block,
final String destination);
}
public static class UpdateDestinationBlockedActionMonitor extends ActionMonitor
@@ -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.
@@ -19,7 +20,7 @@ package com.android.messaging.datamodel.binding;
import java.util.concurrent.atomic.AtomicLong;
public class Binding<T extends BindableData> extends BindingBase<T> {
private static AtomicLong sBindingIdx = new AtomicLong(System.currentTimeMillis() * 1000);
private static final AtomicLong sBindingIdx = new AtomicLong(System.currentTimeMillis() * 1000);
private String mBindingId;
private T mData;
@@ -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);
}
@@ -45,7 +45,7 @@ import java.util.List;
public class AvatarRequest extends UriImageRequest<AvatarRequestDescriptor> {
private static final float SCALING_FACTOR = 1.33f;
private TypedArray mColors;
private final TypedArray mColors;
public AvatarRequest(final Context context,
final AvatarRequestDescriptor descriptor) {
@@ -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.
@@ -29,7 +30,7 @@ public class CustomVCardEntryConstructor implements VCardInterpreter {
/**
* Called when the parsing started.
*/
public void onStart();
void onStart();
/**
* The method called when one vCard entry is created. Children come before their parent in
@@ -46,13 +47,13 @@ public class CustomVCardEntryConstructor implements VCardInterpreter {
* END:VCARD
* </code>
*/
public void onEntryCreated(final CustomVCardEntry entry);
void onEntryCreated(final CustomVCardEntry entry);
/**
* Called when the parsing ended.
* Able to be use this method for showing performance log, etc.
*/
public void onEnd();
void onEnd();
}
/**
@@ -130,4 +131,4 @@ public class CustomVCardEntryConstructor implements VCardInterpreter {
public void onPropertyCreated(VCardProperty property) {
mCurrentEntry.addProperty(property);
}
}
}
@@ -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.
@@ -26,9 +27,9 @@ import java.util.List;
* extensions).
*/
public interface MediaRequest<T extends RefCountedMediaResource> {
public static final int REQUEST_ENCODE_MEDIA = 1;
public static final int REQUEST_DECODE_MEDIA = 2;
public static final int REQUEST_LOAD_MEDIA = 3;
int REQUEST_ENCODE_MEDIA = 1;
int REQUEST_DECODE_MEDIA = 2;
int REQUEST_LOAD_MEDIA = 3;
/**
* Returns a unique key used for storing and looking up the MediaRequest.