Messaging: Fix modifiers
We either have too few or too many Change-Id: I09a9a38b859c68526fcbcdbc7862afe1d693f6c0
This commit is contained in:
@@ -34,30 +34,30 @@ public interface CarrierConfigValuesLoader {
|
|||||||
// Configuration keys and default values
|
// Configuration keys and default values
|
||||||
|
|
||||||
/** Boolean value: if MMS is enabled */
|
/** Boolean value: if MMS is enabled */
|
||||||
public static final String CONFIG_ENABLED_MMS = "enabledMMS";
|
String CONFIG_ENABLED_MMS = "enabledMMS";
|
||||||
public static final boolean CONFIG_ENABLED_MMS_DEFAULT = true;
|
boolean CONFIG_ENABLED_MMS_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if transaction ID should be appended to
|
* Boolean value: if transaction ID should be appended to
|
||||||
* the download URL of a single segment WAP push message
|
* the download URL of a single segment WAP push message
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLED_TRANS_ID = "enabledTransID";
|
String CONFIG_ENABLED_TRANS_ID = "enabledTransID";
|
||||||
public static final boolean CONFIG_ENABLED_TRANS_ID_DEFAULT = false;
|
boolean CONFIG_ENABLED_TRANS_ID_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if acknowledge or notify response to a download
|
* Boolean value: if acknowledge or notify response to a download
|
||||||
* should be sent to the WAP push message's download URL
|
* should be sent to the WAP push message's download URL
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLED_NOTIFY_WAP_MMSC = "enabledNotifyWapMMSC";
|
String CONFIG_ENABLED_NOTIFY_WAP_MMSC = "enabledNotifyWapMMSC";
|
||||||
public static final boolean CONFIG_ENABLED_NOTIFY_WAP_MMSC_DEFAULT = false;
|
boolean CONFIG_ENABLED_NOTIFY_WAP_MMSC_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if phone number alias can be used
|
* Boolean value: if phone number alias can be used
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ALIAS_ENABLED = "aliasEnabled";
|
String CONFIG_ALIAS_ENABLED = "aliasEnabled";
|
||||||
public static final boolean CONFIG_ALIAS_ENABLED_DEFAULT = false;
|
boolean CONFIG_ALIAS_ENABLED_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if audio is allowed in attachment
|
* Boolean value: if audio is allowed in attachment
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
|
String CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
|
||||||
public static final boolean CONFIG_ALLOW_ATTACH_AUDIO_DEFAULT = true;
|
boolean CONFIG_ALLOW_ATTACH_AUDIO_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if true, long sms messages are always sent as multi-part sms
|
* Boolean value: if true, long sms messages are always sent as multi-part sms
|
||||||
* messages, with no checked limit on the number of segments. If false, then
|
* messages, with no checked limit on the number of segments. If false, then
|
||||||
@@ -66,144 +66,144 @@ public interface CarrierConfigValuesLoader {
|
|||||||
* independent SMS messages (dependent on CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES flag).
|
* independent SMS messages (dependent on CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES flag).
|
||||||
* This feature exists for carriers that don't support multi-part sms.
|
* This feature exists for carriers that don't support multi-part sms.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLE_MULTIPART_SMS = "enableMultipartSMS";
|
String CONFIG_ENABLE_MULTIPART_SMS = "enableMultipartSMS";
|
||||||
public static final boolean CONFIG_ENABLE_MULTIPART_SMS_DEFAULT = true;
|
boolean CONFIG_ENABLE_MULTIPART_SMS_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if SMS delivery report is supported
|
* Boolean value: if SMS delivery report is supported
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLE_SMS_DELIVERY_REPORTS = "enableSMSDeliveryReports";
|
String CONFIG_ENABLE_SMS_DELIVERY_REPORTS = "enableSMSDeliveryReports";
|
||||||
public static final boolean CONFIG_ENABLE_SMS_DELIVERY_REPORTS_DEFAULT = true;
|
boolean CONFIG_ENABLE_SMS_DELIVERY_REPORTS_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if group MMS is supported
|
* Boolean value: if group MMS is supported
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLE_GROUP_MMS = "enableGroupMms";
|
String CONFIG_ENABLE_GROUP_MMS = "enableGroupMms";
|
||||||
public static final boolean CONFIG_ENABLE_GROUP_MMS_DEFAULT = true;
|
boolean CONFIG_ENABLE_GROUP_MMS_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if the content_disposition field of an MMS part should be parsed
|
* Boolean value: if the content_disposition field of an MMS part should be parsed
|
||||||
* Check wap-230-wsp-20010705-a.pdf, chapter 8.4.2.21. Most carriers support it except some.
|
* Check wap-230-wsp-20010705-a.pdf, chapter 8.4.2.21. Most carriers support it except some.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION =
|
String CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION =
|
||||||
"supportMmsContentDisposition";
|
"supportMmsContentDisposition";
|
||||||
public static final boolean CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION_DEFAULT = true;
|
boolean CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if the sms app should support a link to the system settings
|
* Boolean value: if the sms app should support a link to the system settings
|
||||||
* where amber alerts are configured.
|
* where amber alerts are configured.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks";
|
String CONFIG_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks";
|
||||||
public static final boolean CONFIG_CELL_BROADCAST_APP_LINKS_DEFAULT = true;
|
boolean CONFIG_CELL_BROADCAST_APP_LINKS_DEFAULT = true;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if multipart SMS should be sent as separate SMS messages
|
* Boolean value: if multipart SMS should be sent as separate SMS messages
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES =
|
String CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES =
|
||||||
"sendMultipartSmsAsSeparateMessages";
|
"sendMultipartSmsAsSeparateMessages";
|
||||||
public static final boolean CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_DEFAULT = false;
|
boolean CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if MMS read report is supported
|
* Boolean value: if MMS read report is supported
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLE_MMS_READ_REPORTS = "enableMMSReadReports";
|
String CONFIG_ENABLE_MMS_READ_REPORTS = "enableMMSReadReports";
|
||||||
public static final boolean CONFIG_ENABLE_MMS_READ_REPORTS_DEFAULT = false;
|
boolean CONFIG_ENABLE_MMS_READ_REPORTS_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if MMS delivery report is supported
|
* Boolean value: if MMS delivery report is supported
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ENABLE_MMS_DELIVERY_REPORTS = "enableMMSDeliveryReports";
|
String CONFIG_ENABLE_MMS_DELIVERY_REPORTS = "enableMMSDeliveryReports";
|
||||||
public static final boolean CONFIG_ENABLE_MMS_DELIVERY_REPORTS_DEFAULT = false;
|
boolean CONFIG_ENABLE_MMS_DELIVERY_REPORTS_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Boolean value: if "charset" value is supported in the "Content-Type" HTTP header
|
* Boolean value: if "charset" value is supported in the "Content-Type" HTTP header
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader";
|
String CONFIG_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader";
|
||||||
public static final boolean CONFIG_SUPPORT_HTTP_CHARSET_HEADER_DEFAULT = false;
|
boolean CONFIG_SUPPORT_HTTP_CHARSET_HEADER_DEFAULT = false;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximal MMS message size in bytes
|
* Integer value: maximal MMS message size in bytes
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
|
String CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
|
||||||
public static final int CONFIG_MAX_MESSAGE_SIZE_DEFAULT = 300 * 1024;
|
int CONFIG_MAX_MESSAGE_SIZE_DEFAULT = 300 * 1024;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximal MMS image height in pixels
|
* Integer value: maximal MMS image height in pixels
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
|
String CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
|
||||||
public static final int CONFIG_MAX_IMAGE_HEIGHT_DEFAULT = 480;
|
int CONFIG_MAX_IMAGE_HEIGHT_DEFAULT = 480;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximal MMS image width in pixels
|
* Integer value: maximal MMS image width in pixels
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
|
String CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
|
||||||
public static final int CONFIG_MAX_IMAGE_WIDTH_DEFAULT = 640;
|
int CONFIG_MAX_IMAGE_WIDTH_DEFAULT = 640;
|
||||||
/**
|
/**
|
||||||
* Integer value: limit on recipient list of an MMS message
|
* Integer value: limit on recipient list of an MMS message
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_RECIPIENT_LIMIT = "recipientLimit";
|
String CONFIG_RECIPIENT_LIMIT = "recipientLimit";
|
||||||
public static final int CONFIG_RECIPIENT_LIMIT_DEFAULT = Integer.MAX_VALUE;
|
int CONFIG_RECIPIENT_LIMIT_DEFAULT = Integer.MAX_VALUE;
|
||||||
/**
|
/**
|
||||||
* Integer value: HTTP socket timeout in milliseconds for MMS
|
* Integer value: HTTP socket timeout in milliseconds for MMS
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
|
String CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
|
||||||
public static final int CONFIG_HTTP_SOCKET_TIMEOUT_DEFAULT = 60 * 1000;
|
int CONFIG_HTTP_SOCKET_TIMEOUT_DEFAULT = 60 * 1000;
|
||||||
/**
|
/**
|
||||||
* Integer value: minimal number of characters of an alias
|
* Integer value: minimal number of characters of an alias
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
|
String CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
|
||||||
public static final int CONFIG_ALIAS_MIN_CHARS_DEFAULT = 2;
|
int CONFIG_ALIAS_MIN_CHARS_DEFAULT = 2;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximal number of characters of an alias
|
* Integer value: maximal number of characters of an alias
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
|
String CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
|
||||||
public static final int CONFIG_ALIAS_MAX_CHARS_DEFAULT = 48;
|
int CONFIG_ALIAS_MAX_CHARS_DEFAULT = 48;
|
||||||
/**
|
/**
|
||||||
* Integer value: the threshold of number of SMS parts when an multipart SMS will be
|
* Integer value: the threshold of number of SMS parts when an multipart SMS will be
|
||||||
* converted into an MMS, e.g. if this is "4", when an multipart SMS message has 5
|
* converted into an MMS, e.g. if this is "4", when an multipart SMS message has 5
|
||||||
* parts, then it will be sent as MMS message instead. "-1" indicates no such conversion
|
* parts, then it will be sent as MMS message instead. "-1" indicates no such conversion
|
||||||
* can happen.
|
* can happen.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
|
String CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
|
||||||
public static final int CONFIG_SMS_TO_MMS_TEXT_THRESHOLD_DEFAULT = -1;
|
int CONFIG_SMS_TO_MMS_TEXT_THRESHOLD_DEFAULT = -1;
|
||||||
/**
|
/**
|
||||||
* Integer value: the threshold of SMS length when it will be converted into an MMS.
|
* Integer value: the threshold of SMS length when it will be converted into an MMS.
|
||||||
* "-1" indicates no such conversion can happen.
|
* "-1" indicates no such conversion can happen.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD =
|
String CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD =
|
||||||
"smsToMmsTextLengthThreshold";
|
"smsToMmsTextLengthThreshold";
|
||||||
public static final int CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_DEFAULT = -1;
|
int CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_DEFAULT = -1;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximal length in bytes of SMS message
|
* Integer value: maximal length in bytes of SMS message
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_MAX_MESSAGE_TEXT_SIZE = "maxMessageTextSize";
|
String CONFIG_MAX_MESSAGE_TEXT_SIZE = "maxMessageTextSize";
|
||||||
public static final int CONFIG_MAX_MESSAGE_TEXT_SIZE_DEFAULT = -1;
|
int CONFIG_MAX_MESSAGE_TEXT_SIZE_DEFAULT = -1;
|
||||||
/**
|
/**
|
||||||
* Integer value: maximum number of characters allowed for mms subject
|
* Integer value: maximum number of characters allowed for mms subject
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_MAX_SUBJECT_LENGTH = "maxSubjectLength";
|
String CONFIG_MAX_SUBJECT_LENGTH = "maxSubjectLength";
|
||||||
public static final int CONFIG_MAX_SUBJECT_LENGTH_DEFAULT = 40;
|
int CONFIG_MAX_SUBJECT_LENGTH_DEFAULT = 40;
|
||||||
/**
|
/**
|
||||||
* String value: name for the user agent profile HTTP header
|
* String value: name for the user agent profile HTTP header
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
|
String CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
|
||||||
public static final String CONFIG_UA_PROF_TAG_NAME_DEFAULT = "x-wap-profile";
|
String CONFIG_UA_PROF_TAG_NAME_DEFAULT = "x-wap-profile";
|
||||||
/**
|
/**
|
||||||
* String value: additional HTTP headers for MMS HTTP requests.
|
* String value: additional HTTP headers for MMS HTTP requests.
|
||||||
* The format is
|
* The format is
|
||||||
* header_1:header_value_1|header_2:header_value_2|...
|
* header_1:header_value_1|header_2:header_value_2|...
|
||||||
* Each value can contain macros.
|
* Each value can contain macros.
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_HTTP_PARAMS = "httpParams";
|
String CONFIG_HTTP_PARAMS = "httpParams";
|
||||||
public static final String CONFIG_HTTP_PARAMS_DEFAULT = null;
|
String CONFIG_HTTP_PARAMS_DEFAULT = null;
|
||||||
/**
|
/**
|
||||||
* String value: number of email gateway
|
* String value: number of email gateway
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
|
String CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
|
||||||
public static final String CONFIG_EMAIL_GATEWAY_NUMBER_DEFAULT = null;
|
String CONFIG_EMAIL_GATEWAY_NUMBER_DEFAULT = null;
|
||||||
/**
|
/**
|
||||||
* String value: suffix for the NAI HTTP header value, e.g. ":pcs"
|
* String value: suffix for the NAI HTTP header value, e.g. ":pcs"
|
||||||
* (NAI is used as authentication in HTTP headers for some carriers)
|
* (NAI is used as authentication in HTTP headers for some carriers)
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_NAI_SUFFIX = "naiSuffix";
|
String CONFIG_NAI_SUFFIX = "naiSuffix";
|
||||||
public static final String CONFIG_NAI_SUFFIX_DEFAULT = null;
|
String CONFIG_NAI_SUFFIX_DEFAULT = null;
|
||||||
/**
|
/**
|
||||||
* String value: Url for user agent profile
|
* String value: Url for user agent profile
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_UA_PROF_URL = "uaProfUrl";
|
String CONFIG_UA_PROF_URL = "uaProfUrl";
|
||||||
public static final String CONFIG_UA_PROF_URL_DEFAULT = null;
|
String CONFIG_UA_PROF_URL_DEFAULT = null;
|
||||||
/**
|
/**
|
||||||
* String value: user agent
|
* String value: user agent
|
||||||
*/
|
*/
|
||||||
public static final String CONFIG_USER_AGENT = "userAgent";
|
String CONFIG_USER_AGENT = "userAgent";
|
||||||
public static final String CONFIG_USER_AGENT_DEFAULT = null;
|
String CONFIG_USER_AGENT_DEFAULT = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class DefaultUserAgentInfoLoader implements UserAgentInfoLoader {
|
|||||||
private static final String DEFAULT_UA_PROF_URL =
|
private static final String DEFAULT_UA_PROF_URL =
|
||||||
"http://www.gstatic.com/android/sms/mms_ua_profile.xml";
|
"http://www.gstatic.com/android/sms/mms_ua_profile.xml";
|
||||||
|
|
||||||
private Context mContext;
|
private final Context mContext;
|
||||||
private boolean mLoaded;
|
private boolean mLoaded;
|
||||||
|
|
||||||
private String mUserAgent;
|
private String mUserAgent;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class MmsManager {
|
|||||||
private static volatile boolean sForceLegacyMms = false;
|
private static volatile boolean sForceLegacyMms = false;
|
||||||
|
|
||||||
// Cached computed overrides for carrier configuration values
|
// Cached computed overrides for carrier configuration values
|
||||||
private static SparseArray<Bundle> sConfigOverridesMap = new SparseArray<>();
|
private static final SparseArray<Bundle> sConfigOverridesMap = new SparseArray<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the flag about whether to force to use legacy system APIs instead of system MMS API
|
* Set the flag about whether to force to use legacy system APIs instead of system MMS API
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ public class MmsService extends Service {
|
|||||||
// Request execution thread pools. One thread pool for sending and one for downloading.
|
// Request execution thread pools. One thread pool for sending and one for downloading.
|
||||||
// The size of the thread pool controls the parallelism of request execution.
|
// The size of the thread pool controls the parallelism of request execution.
|
||||||
// See {@link setThreadPoolSize}
|
// See {@link setThreadPoolSize}
|
||||||
private ExecutorService[] mExecutors = new ExecutorService[2];
|
private final ExecutorService[] mExecutors = new ExecutorService[2];
|
||||||
|
|
||||||
// Active request count
|
// Active request count
|
||||||
private int mActiveRequestCount;
|
private int mActiveRequestCount;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ package android.support.v7.mms;
|
|||||||
*/
|
*/
|
||||||
public interface UserAgentInfoLoader {
|
public interface UserAgentInfoLoader {
|
||||||
// Carrier configuration keys for passing as config overrides into system MMS service
|
// Carrier configuration keys for passing as config overrides into system MMS service
|
||||||
public static final String CONFIG_USER_AGENT = "userAgent";
|
String CONFIG_USER_AGENT = "userAgent";
|
||||||
public static final String CONFIG_UA_PROF_URL = "uaProfUrl";
|
String CONFIG_UA_PROF_URL = "uaProfUrl";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get UserAgent value
|
* Get UserAgent value
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class Base64 {
|
|||||||
static final int BASELENGTH = 255;
|
static final int BASELENGTH = 255;
|
||||||
|
|
||||||
// Create arrays to hold the base64 characters
|
// Create arrays to hold the base64 characters
|
||||||
private static byte[] base64Alphabet = new byte[BASELENGTH];
|
private static final byte[] base64Alphabet = new byte[BASELENGTH];
|
||||||
|
|
||||||
// Populating the character arrays
|
// Populating the character arrays
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ package android.support.v7.mms.pdu;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
|
||||||
public class QuotedPrintable {
|
public class QuotedPrintable {
|
||||||
private static byte ESCAPE_CHAR = '=';
|
private static final byte ESCAPE_CHAR = '=';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes an array quoted-printable characters into an array of original bytes.
|
* Decodes an array quoted-printable characters into an array of original bytes.
|
||||||
@@ -37,7 +37,7 @@ public class QuotedPrintable {
|
|||||||
* @return array of original bytes,
|
* @return array of original bytes,
|
||||||
* null if quoted-printable decoding is unsuccessful.
|
* null if quoted-printable decoding is unsuccessful.
|
||||||
*/
|
*/
|
||||||
public static final byte[] decodeQuotedPrintable(byte[] bytes) {
|
public static byte[] decodeQuotedPrintable(byte[] bytes) {
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 interface PhotoViewQuery {
|
||||||
public final String[] PROJECTION = {
|
String[] PROJECTION = {
|
||||||
PhotoViewColumns.URI,
|
PhotoViewColumns.URI,
|
||||||
PhotoViewColumns.NAME,
|
PhotoViewColumns.NAME,
|
||||||
PhotoViewColumns.CONTENT_URI,
|
PhotoViewColumns.CONTENT_URI,
|
||||||
@@ -99,22 +100,22 @@ public class ConversationImagePartsView {
|
|||||||
Columns.STATUS,
|
Columns.STATUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
public final int INDEX_URI = 0;
|
int INDEX_URI = 0;
|
||||||
public final int INDEX_SENDER_FULL_NAME = 1;
|
int INDEX_SENDER_FULL_NAME = 1;
|
||||||
public final int INDEX_CONTENT_URI = 2;
|
int INDEX_CONTENT_URI = 2;
|
||||||
public final int INDEX_THUMBNAIL_URI = 3;
|
int INDEX_THUMBNAIL_URI = 3;
|
||||||
public final int INDEX_CONTENT_TYPE = 4;
|
int INDEX_CONTENT_TYPE = 4;
|
||||||
// Columns in addition to those specified by PhotoContract
|
// Columns in addition to those specified by PhotoContract
|
||||||
public final int INDEX_DISPLAY_DESTINATION = 5;
|
int INDEX_DISPLAY_DESTINATION = 5;
|
||||||
public final int INDEX_RECEIVED_TIMESTAMP = 6;
|
int INDEX_RECEIVED_TIMESTAMP = 6;
|
||||||
public final int INDEX_STATUS = 7;
|
int INDEX_STATUS = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String getViewName() {
|
static String getViewName() {
|
||||||
return VIEW_NAME;
|
return VIEW_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String getCreateSql() {
|
static String getCreateSql() {
|
||||||
return CREATE_SQL;
|
return CREATE_SQL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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();
|
return Factory.get().getDataModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final void startActionService(final Action action) {
|
public static void startActionService(final Action action) {
|
||||||
get().getActionService().startAction(action);
|
get().getActionService().startAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final void scheduleAction(final Action action,
|
public static void scheduleAction(final Action action, final int code, final long delayMs) {
|
||||||
final int code, final long delayMs) {
|
|
||||||
get().getActionService().scheduleAction(action, code, delayMs);
|
get().getActionService().scheduleAction(action, code, delayMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import com.android.messaging.util.LogUtil;
|
|||||||
public class DatabaseHelper extends SQLiteOpenHelper {
|
public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
public static final String DATABASE_NAME = "bugle_db";
|
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));
|
return Integer.parseInt(context.getResources().getString(R.string.database_version));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
// track transaction on a per thread basis
|
||||||
private static ThreadLocal<Stack<TransactionData>> sTransactionDepth =
|
private static final ThreadLocal<Stack<TransactionData>> sTransactionDepth =
|
||||||
new ThreadLocal<Stack<TransactionData>>() {
|
new ThreadLocal<Stack<TransactionData>>() {
|
||||||
@Override
|
@Override
|
||||||
public Stack<TransactionData> initialValue() {
|
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",
|
" 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) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 {
|
static class MessageLineInfo extends NotificationLineInfo {
|
||||||
final CharSequence mText;
|
final CharSequence mText;
|
||||||
Uri mAttachmentUri;
|
final Uri mAttachmentUri;
|
||||||
String mAttachmentType;
|
final String mAttachmentType;
|
||||||
final String mAuthorFullName;
|
final String mAuthorFullName;
|
||||||
final String mAuthorFirstName;
|
final String mAuthorFirstName;
|
||||||
boolean mIsManualDownloadNeeded;
|
final boolean mIsManualDownloadNeeded;
|
||||||
final String mMessageId;
|
final String mMessageId;
|
||||||
|
|
||||||
MessageLineInfo(final boolean isGroup, final String authorFullName,
|
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.
|
* with notifications for other conversations on a wearable device.
|
||||||
*/
|
*/
|
||||||
public static class BundledMessageNotificationState extends MultiMessageNotificationState {
|
public static class BundledMessageNotificationState extends MultiMessageNotificationState {
|
||||||
public int mGroupOrder;
|
public final int mGroupOrder;
|
||||||
public BundledMessageNotificationState(final ConversationInfoList convList,
|
public BundledMessageNotificationState(final ConversationInfoList convList,
|
||||||
final int groupOrder) {
|
final int groupOrder) {
|
||||||
super(convList);
|
super(convList);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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;
|
private static final int NUM_REQUEST_CODES_NEEDED = 2;
|
||||||
|
|
||||||
public interface FailedMessageQuery {
|
public interface FailedMessageQuery {
|
||||||
static final String FAILED_MESSAGES_WHERE_CLAUSE =
|
String FAILED_MESSAGES_WHERE_CLAUSE =
|
||||||
"((" + MessageColumns.STATUS + " = " +
|
"((" + MessageColumns.STATUS + " = " +
|
||||||
MessageData.BUGLE_STATUS_OUTGOING_FAILED + " OR " +
|
MessageData.BUGLE_STATUS_OUTGOING_FAILED + " OR " +
|
||||||
MessageColumns.STATUS + " = " +
|
MessageColumns.STATUS + " = " +
|
||||||
MessageData.BUGLE_STATUS_INCOMING_DOWNLOAD_FAILED + ") AND " +
|
MessageData.BUGLE_STATUS_INCOMING_DOWNLOAD_FAILED + ") AND " +
|
||||||
DatabaseHelper.MessageColumns.SEEN + " = 0)";
|
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";
|
DatabaseHelper.MessageColumns.SENT_TIMESTAMP + " asc";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
+ ParticipantData.OTHER_THAN_SELF_SUB_ID
|
||||||
+ " )";
|
+ " )";
|
||||||
|
|
||||||
private static final Set<Integer> getExistingSubIds() {
|
private static Set<Integer> getExistingSubIds() {
|
||||||
final DatabaseWrapper db = DataModel.get().getDatabase();
|
final DatabaseWrapper db = DataModel.get().getDatabase();
|
||||||
final HashSet<Integer> existingSubIds = new HashSet<Integer>();
|
final HashSet<Integer> existingSubIds = new HashSet<Integer>();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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;
|
public final String actionKey;
|
||||||
|
|
||||||
// If derived classes keep their data in actionParameters then parcelable is trivial
|
// 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
|
// This does not get written to the parcel
|
||||||
private final List<Action> mBackgroundActions = new LinkedList<Action>();
|
private final List<Action> mBackgroundActions = new LinkedList<Action>();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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}
|
* @param result value returned by {@link Action#executeAction}
|
||||||
*/
|
*/
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onActionExecuted(ActionMonitor monitor, final Action action,
|
void onActionExecuted(ActionMonitor monitor, final Action action,
|
||||||
final Object data, final Object result);
|
final Object data, final Object result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,14 +68,14 @@ public class ActionMonitor {
|
|||||||
* {@link Action#processBackgroundResponse}
|
* {@link Action#processBackgroundResponse}
|
||||||
*/
|
*/
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onActionSucceeded(ActionMonitor monitor,
|
void onActionSucceeded(ActionMonitor monitor,
|
||||||
final Action action, final Object data, final Object result);
|
final Action action, final Object data, final Object result);
|
||||||
/**
|
/**
|
||||||
* @param result value returned by {@link Action#processBackgroundFailure}
|
* @param result value returned by {@link Action#processBackgroundFailure}
|
||||||
*/
|
*/
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onActionFailed(ActionMonitor monitor, final Action action,
|
void onActionFailed(ActionMonitor monitor, final Action action,
|
||||||
final Object data, final Object result);
|
final Object data, final Object result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -291,9 +292,8 @@ public class ActionMonitor {
|
|||||||
* else the value returned by {@link Action#processBackgroundResponse}
|
* else the value returned by {@link Action#processBackgroundResponse}
|
||||||
* or {@link Action#processBackgroundFailure}
|
* or {@link Action#processBackgroundFailure}
|
||||||
*/
|
*/
|
||||||
private final void complete(final Action action,
|
private void complete(final Action action, final int expectedOldState, final Object result,
|
||||||
final int expectedOldState, final Object result,
|
final boolean succeeded) {
|
||||||
final boolean succeeded) {
|
|
||||||
ActionCompletedListener completedListener = null;
|
ActionCompletedListener completedListener = null;
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
setState(action, expectedOldState, STATE_COMPLETE);
|
setState(action, expectedOldState, STATE_COMPLETE);
|
||||||
@@ -419,7 +419,7 @@ public class ActionMonitor {
|
|||||||
* Map of action monitors indexed by actionKey
|
* Map of action monitors indexed by actionKey
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static SimpleArrayMap<String, ActionMonitor> sActionMonitors =
|
static final SimpleArrayMap<String, ActionMonitor> sActionMonitors =
|
||||||
new SimpleArrayMap<String, ActionMonitor>();
|
new SimpleArrayMap<String, ActionMonitor>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 {
|
public interface DownloadMmsActionListener {
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onDownloadMessageStarting(final ActionMonitor monitor,
|
void onDownloadMessageStarting(final ActionMonitor monitor,
|
||||||
final Object data, final MessageData message);
|
final Object data, final MessageData message);
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onDownloadMessageSucceeded(final ActionMonitor monitor,
|
void onDownloadMessageSucceeded(final ActionMonitor monitor,
|
||||||
final Object data, final MessageData message);
|
final Object data, final MessageData message);
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onDownloadMessageFailed(final ActionMonitor monitor,
|
void onDownloadMessageFailed(final ActionMonitor monitor,
|
||||||
final Object data, final MessageData message);
|
final Object data, final MessageData message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 {
|
public interface GetOrCreateConversationActionListener {
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onGetOrCreateConversationSucceeded(final ActionMonitor monitor,
|
void onGetOrCreateConversationSucceeded(final ActionMonitor monitor,
|
||||||
final Object data, final String conversationId);
|
final Object data, final String conversationId);
|
||||||
|
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onGetOrCreateConversationFailed(final ActionMonitor monitor,
|
void onGetOrCreateConversationFailed(final ActionMonitor monitor,
|
||||||
final Object data);
|
final Object data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetOrCreateConversationActionMonitor getOrCreateConversation(
|
public static GetOrCreateConversationActionMonitor getOrCreateConversation(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 {
|
public interface ReadDraftDataActionListener {
|
||||||
@RunsOnMainThread
|
@RunsOnMainThread
|
||||||
abstract void onReadDraftDataSucceeded(final ReadDraftDataAction action,
|
void onReadDraftDataSucceeded(final ReadDraftDataAction action,
|
||||||
final Object data, final MessageData message,
|
final Object data, final MessageData message,
|
||||||
final ConversationListItemData conversation);
|
final ConversationListItemData conversation);
|
||||||
@RunsOnMainThread
|
@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) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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)
|
* @return The next element (which becomes the current)
|
||||||
*/
|
*/
|
||||||
public DatabaseMessage next();
|
DatabaseMessage next();
|
||||||
/**
|
/**
|
||||||
* Close the cursor
|
* Close the cursor
|
||||||
*/
|
*/
|
||||||
public void close();
|
void close();
|
||||||
/**
|
/**
|
||||||
* Get the position
|
* Get the position
|
||||||
*/
|
*/
|
||||||
public int getPosition();
|
int getPosition();
|
||||||
/**
|
/**
|
||||||
* Get the count
|
* Get the count
|
||||||
*/
|
*/
|
||||||
public int getCount();
|
int getCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String ORDER_BY_DATE_DESC = "date DESC";
|
private static final String ORDER_BY_DATE_DESC = "date DESC";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 class UpdateDestinationBlockedAction extends Action {
|
||||||
public interface UpdateDestinationBlockedActionListener {
|
public interface UpdateDestinationBlockedActionListener {
|
||||||
@Assert.RunsOnMainThread
|
@Assert.RunsOnMainThread
|
||||||
abstract void onUpdateDestinationBlockedAction(final UpdateDestinationBlockedAction action,
|
void onUpdateDestinationBlockedAction(final UpdateDestinationBlockedAction action,
|
||||||
final boolean success,
|
final boolean success,
|
||||||
final boolean block,
|
final boolean block,
|
||||||
final String destination);
|
final String destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class UpdateDestinationBlockedActionMonitor extends ActionMonitor
|
public static class UpdateDestinationBlockedActionMonitor extends ActionMonitor
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
public class Binding<T extends BindableData> extends BindingBase<T> {
|
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 String mBindingId;
|
||||||
private T mData;
|
private T mData;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
public class BlockedParticipantsData extends BindableData implements
|
||||||
LoaderManager.LoaderCallbacks<Cursor> {
|
LoaderManager.LoaderCallbacks<Cursor> {
|
||||||
public interface BlockedParticipantsDataListener {
|
public interface BlockedParticipantsDataListener {
|
||||||
public void onBlockedParticipantsCursorUpdated(final Cursor cursor);
|
void onBlockedParticipantsCursorUpdated(final Cursor cursor);
|
||||||
}
|
}
|
||||||
private static final String BINDING_ID = "bindingId";
|
private static final String BINDING_ID = "bindingId";
|
||||||
private static final int BLOCKED_PARTICIPANTS_LOADER = 1;
|
private static final int BLOCKED_PARTICIPANTS_LOADER = 1;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 interface ConversationDataListener {
|
||||||
public void onConversationMessagesCursorUpdated(ConversationData data, Cursor cursor,
|
void onConversationMessagesCursorUpdated(ConversationData data, Cursor cursor,
|
||||||
@Nullable ConversationMessageData newestMessage, boolean isSync);
|
@Nullable ConversationMessageData newestMessage, boolean isSync);
|
||||||
public void onConversationMetadataUpdated(ConversationData data);
|
void onConversationMetadataUpdated(ConversationData data);
|
||||||
public void closeConversation(String conversationId);
|
void closeConversation(String conversationId);
|
||||||
public void onConversationParticipantDataLoaded(ConversationData data);
|
void onConversationParticipantDataLoaded(ConversationData data);
|
||||||
public void onSubscriptionListDataLoaded(ConversationData data);
|
void onSubscriptionListDataLoaded(ConversationData data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ReversedCursor extends CursorWrapper {
|
private static class ReversedCursor extends CursorWrapper {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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)";
|
"(" + ConversationListViewColumns.ARCHIVE_STATUS + " = 0)";
|
||||||
|
|
||||||
public interface ConversationListDataListener {
|
public interface ConversationListDataListener {
|
||||||
public void onConversationListCursorUpdated(ConversationListData data, Cursor cursor);
|
void onConversationListCursorUpdated(ConversationListData data, Cursor cursor);
|
||||||
public void setBlockedParticipantsAvailable(boolean blockedAvailable);
|
void setBlockedParticipantsAvailable(boolean blockedAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConversationListDataListener mListener;
|
private ConversationListDataListener mListener;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
* Get the name of the view for this data item
|
||||||
*/
|
*/
|
||||||
public static final String getConversationListView() {
|
public static String getConversationListView() {
|
||||||
return CONVERSATION_LIST_VIEW;
|
return CONVERSATION_LIST_VIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getConversationListViewSql() {
|
public static String getConversationListViewSql() {
|
||||||
return CONVERSATION_LIST_VIEW_SQL;
|
return CONVERSATION_LIST_VIEW_SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -620,7 +621,7 @@ public class ConversationMessageData {
|
|||||||
|
|
||||||
// Data definitions
|
// Data definitions
|
||||||
|
|
||||||
public static final String getConversationMessagesQuerySql() {
|
public static String getConversationMessagesQuerySql() {
|
||||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||||
+ " AND "
|
+ " AND "
|
||||||
// Inject the conversation id
|
// Inject the conversation id
|
||||||
@@ -628,7 +629,7 @@ public class ConversationMessageData {
|
|||||||
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String getConversationMessageIdsQuerySql() {
|
static String getConversationMessageIdsQuerySql() {
|
||||||
return CONVERSATION_MESSAGES_IDS_QUERY_SQL
|
return CONVERSATION_MESSAGES_IDS_QUERY_SQL
|
||||||
+ " AND "
|
+ " AND "
|
||||||
// Inject the conversation id
|
// Inject the conversation id
|
||||||
@@ -636,7 +637,7 @@ public class ConversationMessageData {
|
|||||||
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
+ CONVERSATION_MESSAGES_QUERY_SQL_GROUP_BY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getNotificationQuerySql() {
|
public static String getNotificationQuerySql() {
|
||||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||||
+ " AND "
|
+ " AND "
|
||||||
+ "(" + DatabaseHelper.MessageColumns.STATUS + " in ("
|
+ "(" + DatabaseHelper.MessageColumns.STATUS + " in ("
|
||||||
@@ -648,7 +649,7 @@ public class ConversationMessageData {
|
|||||||
+ NOTIFICATION_QUERY_SQL_GROUP_BY;
|
+ NOTIFICATION_QUERY_SQL_GROUP_BY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getWearableQuerySql() {
|
public static String getWearableQuerySql() {
|
||||||
return CONVERSATION_MESSAGES_QUERY_SQL
|
return CONVERSATION_MESSAGES_QUERY_SQL
|
||||||
+ " AND "
|
+ " AND "
|
||||||
+ DatabaseHelper.MESSAGES_TABLE + "." + MessageColumns.CONVERSATION_ID + "=?"
|
+ DatabaseHelper.MESSAGES_TABLE + "." + MessageColumns.CONVERSATION_ID + "=?"
|
||||||
@@ -808,37 +809,37 @@ public class ConversationMessageData {
|
|||||||
+ DatabaseHelper.MESSAGES_TABLE + '.' + MessageColumns.RECEIVED_TIMESTAMP + " DESC";
|
+ DatabaseHelper.MESSAGES_TABLE + '.' + MessageColumns.RECEIVED_TIMESTAMP + " DESC";
|
||||||
|
|
||||||
interface ConversationMessageViewColumns extends BaseColumns {
|
interface ConversationMessageViewColumns extends BaseColumns {
|
||||||
static final String _ID = MessageColumns._ID;
|
String _ID = MessageColumns._ID;
|
||||||
static final String CONVERSATION_ID = MessageColumns.CONVERSATION_ID;
|
String CONVERSATION_ID = MessageColumns.CONVERSATION_ID;
|
||||||
static final String PARTICIPANT_ID = MessageColumns.SENDER_PARTICIPANT_ID;
|
String PARTICIPANT_ID = MessageColumns.SENDER_PARTICIPANT_ID;
|
||||||
static final String PARTS_COUNT = "parts_count";
|
String PARTS_COUNT = "parts_count";
|
||||||
static final String SENT_TIMESTAMP = MessageColumns.SENT_TIMESTAMP;
|
String SENT_TIMESTAMP = MessageColumns.SENT_TIMESTAMP;
|
||||||
static final String RECEIVED_TIMESTAMP = MessageColumns.RECEIVED_TIMESTAMP;
|
String RECEIVED_TIMESTAMP = MessageColumns.RECEIVED_TIMESTAMP;
|
||||||
static final String SEEN = MessageColumns.SEEN;
|
String SEEN = MessageColumns.SEEN;
|
||||||
static final String READ = MessageColumns.READ;
|
String READ = MessageColumns.READ;
|
||||||
static final String PROTOCOL = MessageColumns.PROTOCOL;
|
String PROTOCOL = MessageColumns.PROTOCOL;
|
||||||
static final String STATUS = MessageColumns.STATUS;
|
String STATUS = MessageColumns.STATUS;
|
||||||
static final String SMS_MESSAGE_URI = MessageColumns.SMS_MESSAGE_URI;
|
String SMS_MESSAGE_URI = MessageColumns.SMS_MESSAGE_URI;
|
||||||
static final String SMS_PRIORITY = MessageColumns.SMS_PRIORITY;
|
String SMS_PRIORITY = MessageColumns.SMS_PRIORITY;
|
||||||
static final String SMS_MESSAGE_SIZE = MessageColumns.SMS_MESSAGE_SIZE;
|
String SMS_MESSAGE_SIZE = MessageColumns.SMS_MESSAGE_SIZE;
|
||||||
static final String MMS_SUBJECT = MessageColumns.MMS_SUBJECT;
|
String MMS_SUBJECT = MessageColumns.MMS_SUBJECT;
|
||||||
static final String MMS_EXPIRY = MessageColumns.MMS_EXPIRY;
|
String MMS_EXPIRY = MessageColumns.MMS_EXPIRY;
|
||||||
static final String RAW_TELEPHONY_STATUS = MessageColumns.RAW_TELEPHONY_STATUS;
|
String RAW_TELEPHONY_STATUS = MessageColumns.RAW_TELEPHONY_STATUS;
|
||||||
static final String SELF_PARTICIPANT_ID = MessageColumns.SELF_PARTICIPANT_ID;
|
String SELF_PARTICIPANT_ID = MessageColumns.SELF_PARTICIPANT_ID;
|
||||||
static final String SENDER_FULL_NAME = ParticipantColumns.FULL_NAME;
|
String SENDER_FULL_NAME = ParticipantColumns.FULL_NAME;
|
||||||
static final String SENDER_FIRST_NAME = ParticipantColumns.FIRST_NAME;
|
String SENDER_FIRST_NAME = ParticipantColumns.FIRST_NAME;
|
||||||
static final String SENDER_DISPLAY_DESTINATION = ParticipantColumns.DISPLAY_DESTINATION;
|
String SENDER_DISPLAY_DESTINATION = ParticipantColumns.DISPLAY_DESTINATION;
|
||||||
static final String SENDER_NORMALIZED_DESTINATION =
|
String SENDER_NORMALIZED_DESTINATION =
|
||||||
ParticipantColumns.NORMALIZED_DESTINATION;
|
ParticipantColumns.NORMALIZED_DESTINATION;
|
||||||
static final String SENDER_PROFILE_PHOTO_URI = ParticipantColumns.PROFILE_PHOTO_URI;
|
String SENDER_PROFILE_PHOTO_URI = ParticipantColumns.PROFILE_PHOTO_URI;
|
||||||
static final String SENDER_CONTACT_ID = ParticipantColumns.CONTACT_ID;
|
String SENDER_CONTACT_ID = ParticipantColumns.CONTACT_ID;
|
||||||
static final String SENDER_CONTACT_LOOKUP_KEY = ParticipantColumns.LOOKUP_KEY;
|
String SENDER_CONTACT_LOOKUP_KEY = ParticipantColumns.LOOKUP_KEY;
|
||||||
static final String PARTS_IDS = "parts_ids";
|
String PARTS_IDS = "parts_ids";
|
||||||
static final String PARTS_CONTENT_TYPES = "parts_content_types";
|
String PARTS_CONTENT_TYPES = "parts_content_types";
|
||||||
static final String PARTS_CONTENT_URIS = "parts_content_uris";
|
String PARTS_CONTENT_URIS = "parts_content_uris";
|
||||||
static final String PARTS_WIDTHS = "parts_widths";
|
String PARTS_WIDTHS = "parts_widths";
|
||||||
static final String PARTS_HEIGHTS = "parts_heights";
|
String PARTS_HEIGHTS = "parts_heights";
|
||||||
static final String PARTS_TEXTS = "parts_texts";
|
String PARTS_TEXTS = "parts_texts";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int sIndexIncrementer = 0;
|
private static int sIndexIncrementer = 0;
|
||||||
@@ -878,7 +879,7 @@ public class ConversationMessageData {
|
|||||||
private static final int INDEX_SENDER_CONTACT_LOOKUP_KEY = sIndexIncrementer++;
|
private static final int INDEX_SENDER_CONTACT_LOOKUP_KEY = sIndexIncrementer++;
|
||||||
|
|
||||||
|
|
||||||
private static String[] sProjection = {
|
private static final String[] sProjection = {
|
||||||
ConversationMessageViewColumns._ID,
|
ConversationMessageViewColumns._ID,
|
||||||
ConversationMessageViewColumns.CONVERSATION_ID,
|
ConversationMessageViewColumns.CONVERSATION_ID,
|
||||||
ConversationMessageViewColumns.PARTICIPANT_ID,
|
ConversationMessageViewColumns.PARTICIPANT_ID,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
// Flags sent to onDraftChanged to help the receiver limit the amount of work done
|
||||||
public static int ATTACHMENTS_CHANGED = 0x0001;
|
public static final int ATTACHMENTS_CHANGED = 0x0001;
|
||||||
public static int MESSAGE_TEXT_CHANGED = 0x0002;
|
public static final int MESSAGE_TEXT_CHANGED = 0x0002;
|
||||||
public static int MESSAGE_SUBJECT_CHANGED = 0x0004;
|
public static final int MESSAGE_SUBJECT_CHANGED = 0x0004;
|
||||||
// Whether the self participant data has been loaded
|
// Whether the self participant data has been loaded
|
||||||
public static int SELF_CHANGED = 0x0008;
|
public static final int SELF_CHANGED = 0x0008;
|
||||||
public static int ALL_CHANGED = 0x00FF;
|
public static final int ALL_CHANGED = 0x00FF;
|
||||||
// ALL_CHANGED intentionally doesn't include WIDGET_CHANGED. ConversationFragment needs to
|
// 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
|
// be notified if the draft it is looking at is changed externally (by a desktop widget) so it
|
||||||
// can reload the draft.
|
// can reload the draft.
|
||||||
public static int WIDGET_CHANGED = 0x0100;
|
public static final int WIDGET_CHANGED = 0x0100;
|
||||||
|
|
||||||
private final String mConversationId;
|
private final String mConversationId;
|
||||||
private ReadDraftDataActionMonitor mMonitor;
|
private ReadDraftDataActionMonitor mMonitor;
|
||||||
@@ -91,7 +92,7 @@ public class DraftMessageData extends BindableData implements ReadDraftDataActio
|
|||||||
private String mMessageText;
|
private String mMessageText;
|
||||||
private String mMessageSubject;
|
private String mMessageSubject;
|
||||||
private String mSelfId;
|
private String mSelfId;
|
||||||
private MessageTextStats mMessageTextStats;
|
private final MessageTextStats mMessageTextStats;
|
||||||
private boolean mSending;
|
private boolean mSending;
|
||||||
|
|
||||||
/** Keeps track of completed attachments in the message draft. This data is persisted to db */
|
/** 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) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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_DOWNLOAD_FAILED = 106;
|
||||||
public static final int BUGLE_STATUS_INCOMING_EXPIRED_OR_NOT_AVAILABLE = 107;
|
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) {
|
switch (status) {
|
||||||
case BUGLE_STATUS_UNKNOWN:
|
case BUGLE_STATUS_UNKNOWN:
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
@@ -646,7 +647,7 @@ public class MessageData implements Parcelable {
|
|||||||
|| mProtocol == MessageData.PROTOCOL_MMS_PUSH_NOTIFICATION;
|
|| 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);
|
return (protocol == MessageData.PROTOCOL_MMS_PUSH_NOTIFICATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,7 +655,7 @@ public class MessageData implements Parcelable {
|
|||||||
return getIsMmsNotification(mProtocol);
|
return getIsMmsNotification(mProtocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final boolean getIsSms(final int protocol) {
|
public static boolean getIsSms(final int protocol) {
|
||||||
return protocol == (MessageData.PROTOCOL_SMS);
|
return protocol == (MessageData.PROTOCOL_SMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import java.util.List;
|
|||||||
public class AvatarRequest extends UriImageRequest<AvatarRequestDescriptor> {
|
public class AvatarRequest extends UriImageRequest<AvatarRequestDescriptor> {
|
||||||
private static final float SCALING_FACTOR = 1.33f;
|
private static final float SCALING_FACTOR = 1.33f;
|
||||||
|
|
||||||
private TypedArray mColors;
|
private final TypedArray mColors;
|
||||||
|
|
||||||
public AvatarRequest(final Context context,
|
public AvatarRequest(final Context context,
|
||||||
final AvatarRequestDescriptor descriptor) {
|
final AvatarRequestDescriptor descriptor) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.
|
* 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
|
* 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
|
* END:VCARD
|
||||||
* </code>
|
* </code>
|
||||||
*/
|
*/
|
||||||
public void onEntryCreated(final CustomVCardEntry entry);
|
void onEntryCreated(final CustomVCardEntry entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the parsing ended.
|
* Called when the parsing ended.
|
||||||
* Able to be use this method for showing performance log, etc.
|
* 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) {
|
public void onPropertyCreated(VCardProperty property) {
|
||||||
mCurrentEntry.addProperty(property);
|
mCurrentEntry.addProperty(property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -26,9 +27,9 @@ import java.util.List;
|
|||||||
* extensions).
|
* extensions).
|
||||||
*/
|
*/
|
||||||
public interface MediaRequest<T extends RefCountedMediaResource> {
|
public interface MediaRequest<T extends RefCountedMediaResource> {
|
||||||
public static final int REQUEST_ENCODE_MEDIA = 1;
|
int REQUEST_ENCODE_MEDIA = 1;
|
||||||
public static final int REQUEST_DECODE_MEDIA = 2;
|
int REQUEST_DECODE_MEDIA = 2;
|
||||||
public static final int REQUEST_LOAD_MEDIA = 3;
|
int REQUEST_LOAD_MEDIA = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a unique key used for storing and looking up the MediaRequest.
|
* Returns a unique key used for storing and looking up the MediaRequest.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2007 Esmertec AG.
|
* Copyright (C) 2007 Esmertec AG.
|
||||||
* Copyright (C) 2007 The Android Open Source Project
|
* Copyright (C) 2007 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -34,7 +35,7 @@ public class Base64 {
|
|||||||
static final int BASELENGTH = 255;
|
static final int BASELENGTH = 255;
|
||||||
|
|
||||||
// Create arrays to hold the base64 characters
|
// Create arrays to hold the base64 characters
|
||||||
private static byte[] base64Alphabet = new byte[BASELENGTH];
|
private static final byte[] base64Alphabet = new byte[BASELENGTH];
|
||||||
|
|
||||||
// Populating the character arrays
|
// Populating the character arrays
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2007 Esmertec AG.
|
* Copyright (C) 2007 Esmertec AG.
|
||||||
* Copyright (C) 2007 The Android Open Source Project
|
* Copyright (C) 2007 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,7 +21,7 @@ package com.android.messaging.mmslib.pdu;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
|
||||||
public class QuotedPrintable {
|
public class QuotedPrintable {
|
||||||
private static byte ESCAPE_CHAR = '=';
|
private static final byte ESCAPE_CHAR = '=';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes an array quoted-printable characters into an array of original bytes.
|
* Decodes an array quoted-printable characters into an array of original bytes.
|
||||||
@@ -36,7 +37,7 @@ public class QuotedPrintable {
|
|||||||
* @return array of original bytes,
|
* @return array of original bytes,
|
||||||
* null if quoted-printable decoding is unsuccessful.
|
* null if quoted-printable decoding is unsuccessful.
|
||||||
*/
|
*/
|
||||||
public static final byte[] decodeQuotedPrintable(byte[] bytes) {
|
public static byte[] decodeQuotedPrintable(byte[] bytes) {
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -29,8 +30,8 @@ import java.io.RandomAccessFile;
|
|||||||
|
|
||||||
|
|
||||||
public class DrmConvertSession {
|
public class DrmConvertSession {
|
||||||
private DrmManagerClient mDrmClient;
|
private final DrmManagerClient mDrmClient;
|
||||||
private int mConvertSessionId;
|
private final int mConvertSessionId;
|
||||||
private static final String TAG = "DrmConvertSession";
|
private static final String TAG = "DrmConvertSession";
|
||||||
|
|
||||||
private DrmConvertSession(DrmManagerClient drmClient, int convertSessionId) {
|
private DrmConvertSession(DrmManagerClient drmClient, int convertSessionId) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2008 Esmertec AG.
|
* Copyright (C) 2008 Esmertec AG.
|
||||||
* Copyright (C) 2008 The Android Open Source Project
|
* Copyright (C) 2008 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -81,7 +82,7 @@ public final class PduCache extends AbstractCache<Uri, PduCacheEntry> {
|
|||||||
mUpdating = new HashSet<Uri>();
|
mUpdating = new HashSet<Uri>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final synchronized PduCache getInstance() {
|
public static synchronized PduCache getInstance() {
|
||||||
if (sInstance == null) {
|
if (sInstance == null) {
|
||||||
if (LOCAL_LOGV) {
|
if (LOCAL_LOGV) {
|
||||||
Log.v(TAG, "Constructing new PduCache instance.");
|
Log.v(TAG, "Constructing new PduCache instance.");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -37,11 +38,11 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
class ApnsXmlProcessor {
|
class ApnsXmlProcessor {
|
||||||
public interface ApnHandler {
|
public interface ApnHandler {
|
||||||
public void process(ContentValues apnValues);
|
void process(ContentValues apnValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface MmsConfigHandler {
|
public interface MmsConfigHandler {
|
||||||
public void process(String mccMnc, String key, String value, String type);
|
void process(String mccMnc, String key, String value, String type);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String TAG = LogUtil.BUGLE_TAG;
|
private static final String TAG = LogUtil.BUGLE_TAG;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import com.android.messaging.util.VersionUtil;
|
|||||||
public class BugleUserAgentInfoLoader implements UserAgentInfoLoader {
|
public class BugleUserAgentInfoLoader implements UserAgentInfoLoader {
|
||||||
private static final String DEFAULT_USER_AGENT_PREFIX = "Bugle/";
|
private static final String DEFAULT_USER_AGENT_PREFIX = "Bugle/";
|
||||||
|
|
||||||
private Context mContext;
|
private final Context mContext;
|
||||||
private boolean mLoaded;
|
private boolean mLoaded;
|
||||||
|
|
||||||
private String mUserAgent;
|
private String mUserAgent;
|
||||||
|
|||||||
@@ -1779,8 +1779,8 @@ public class MmsUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class SendReqResp {
|
public static class SendReqResp {
|
||||||
public SendReq mSendReq;
|
public final SendReq mSendReq;
|
||||||
public SendConf mSendConf;
|
public final SendConf mSendConf;
|
||||||
|
|
||||||
public SendReqResp(final SendReq sendReq, final SendConf sendConf) {
|
public SendReqResp(final SendReq sendReq, final SendConf sendConf) {
|
||||||
mSendReq = sendReq;
|
mSendReq = sendReq;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class SmsSender {
|
|||||||
/*
|
/*
|
||||||
* A map for pending sms messages. The key is the random request UUID.
|
* A map for pending sms messages. The key is the random request UUID.
|
||||||
*/
|
*/
|
||||||
private static ConcurrentHashMap<Uri, SendResult> sPendingMessageMap =
|
private static final ConcurrentHashMap<Uri, SendResult> sPendingMessageMap =
|
||||||
new ConcurrentHashMap<Uri, SendResult>();
|
new ConcurrentHashMap<Uri, SendResult>();
|
||||||
|
|
||||||
private static final Random RANDOM = new Random();
|
private static final Random RANDOM = new Random();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -67,7 +68,7 @@ public class AsyncImageView extends ImageView implements MediaResourceLoadListen
|
|||||||
public final Binding<BindableMediaRequest<ImageResource>> mImageRequestBinding;
|
public final Binding<BindableMediaRequest<ImageResource>> mImageRequestBinding;
|
||||||
|
|
||||||
/** True if we want the image to fade in when it loads */
|
/** True if we want the image to fade in when it loads */
|
||||||
private boolean mFadeIn;
|
private final boolean mFadeIn;
|
||||||
|
|
||||||
/** True if we want the image to reveal (scale) when it loads. When set to true, this
|
/** True if we want the image to reveal (scale) when it loads. When set to true, this
|
||||||
* will take precedence over {@link #mFadeIn} */
|
* will take precedence over {@link #mFadeIn} */
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -53,7 +54,7 @@ public class AttachmentPreview extends ScrollView implements OnAttachmentClickLi
|
|||||||
private int mAnimatedHeight = -1;
|
private int mAnimatedHeight = -1;
|
||||||
private Animator mCloseGapAnimator;
|
private Animator mCloseGapAnimator;
|
||||||
private boolean mPendingFirstUpdate;
|
private boolean mPendingFirstUpdate;
|
||||||
private Handler mHandler;
|
private final Handler mHandler;
|
||||||
private Runnable mHideRunnable;
|
private Runnable mHideRunnable;
|
||||||
private boolean mPendingHideCanceled;
|
private boolean mPendingHideCanceled;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -30,9 +31,9 @@ public class CompositeAdapter extends BaseAdapter {
|
|||||||
private static final int INITIAL_CAPACITY = 2;
|
private static final int INITIAL_CAPACITY = 2;
|
||||||
|
|
||||||
public static class Partition {
|
public static class Partition {
|
||||||
boolean mShowIfEmpty;
|
final boolean mShowIfEmpty;
|
||||||
boolean mHasHeader;
|
final boolean mHasHeader;
|
||||||
BaseAdapter mAdapter;
|
final BaseAdapter mAdapter;
|
||||||
|
|
||||||
public Partition(final boolean showIfEmpty, final boolean hasHeader,
|
public Partition(final boolean showIfEmpty, final boolean hasHeader,
|
||||||
final BaseAdapter adapter) {
|
final BaseAdapter adapter) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -33,8 +34,8 @@ import com.android.messaging.util.Assert;
|
|||||||
public class CustomHeaderViewPager extends LinearLayout {
|
public class CustomHeaderViewPager extends LinearLayout {
|
||||||
public final static int DEFAULT_TAB_STRIP_SIZE = -1;
|
public final static int DEFAULT_TAB_STRIP_SIZE = -1;
|
||||||
private final int mDefaultTabStripSize;
|
private final int mDefaultTabStripSize;
|
||||||
private ViewPager mViewPager;
|
private final ViewPager mViewPager;
|
||||||
private ViewPagerTabs mTabstrip;
|
private final ViewPagerTabs mTabstrip;
|
||||||
|
|
||||||
public CustomHeaderViewPager(final Context context, final AttributeSet attrs) {
|
public CustomHeaderViewPager(final Context context, final AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -130,7 +131,7 @@ public class SnackBar {
|
|||||||
private Action mAction;
|
private Action mAction;
|
||||||
private Placement mPlacement;
|
private Placement mPlacement;
|
||||||
// The parent view is only used to get a window token and doesn't affect the layout
|
// The parent view is only used to get a window token and doesn't affect the layout
|
||||||
private View mParentView;
|
private final View mParentView;
|
||||||
|
|
||||||
public Builder(final SnackBarManager snackBarManager, final View parentView) {
|
public Builder(final SnackBarManager snackBarManager, final View parentView) {
|
||||||
Assert.notNull(snackBarManager);
|
Assert.notNull(snackBarManager);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -46,7 +47,7 @@ public interface SnackBarInteraction {
|
|||||||
* {@link SnackBar} is always shown with {@link Gravity#BOTTOM} and that the provided View will
|
* {@link SnackBar} is always shown with {@link Gravity#BOTTOM} and that the provided View will
|
||||||
* always need to be translated up to make room for the SnackBar.
|
* always need to be translated up to make room for the SnackBar.
|
||||||
*/
|
*/
|
||||||
public static class BasicSnackBarInteraction implements SnackBarInteraction {
|
class BasicSnackBarInteraction implements SnackBarInteraction {
|
||||||
private final View mView;
|
private final View mView;
|
||||||
|
|
||||||
public BasicSnackBarInteraction(final View view) {
|
public BasicSnackBarInteraction(final View view) {
|
||||||
@@ -64,4 +65,4 @@ public interface SnackBarInteraction {
|
|||||||
return mView.animate().translationY(0);
|
return mView.animate().translationY(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -27,7 +28,7 @@ import android.widget.LinearLayout;
|
|||||||
import com.android.messaging.R;
|
import com.android.messaging.R;
|
||||||
|
|
||||||
public class ViewPagerTabStrip extends LinearLayout {
|
public class ViewPagerTabStrip extends LinearLayout {
|
||||||
private int mSelectedUnderlineThickness;
|
private final int mSelectedUnderlineThickness;
|
||||||
private final Paint mSelectedUnderlinePaint;
|
private final Paint mSelectedUnderlinePaint;
|
||||||
|
|
||||||
private int mIndexForSelection;
|
private int mIndexForSelection;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -49,7 +50,7 @@ import com.android.messaging.R;
|
|||||||
public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnPageChangeListener {
|
public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnPageChangeListener {
|
||||||
|
|
||||||
ViewPager mPager;
|
ViewPager mPager;
|
||||||
private ViewPagerTabStrip mTabStrip;
|
private final ViewPagerTabStrip mTabStrip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Linearlayout that will contain the TextViews serving as tabs. This is the only child
|
* Linearlayout that will contain the TextViews serving as tabs. This is the only child
|
||||||
@@ -60,7 +61,7 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP
|
|||||||
final int mTextSize;
|
final int mTextSize;
|
||||||
final boolean mTextAllCaps;
|
final boolean mTextAllCaps;
|
||||||
int mPrevSelected = -1;
|
int mPrevSelected = -1;
|
||||||
int mSidePadding;
|
final int mSidePadding;
|
||||||
|
|
||||||
private static final int TAB_SIDE_PADDING_IN_DPS = 10;
|
private static final int TAB_SIDE_PADDING_IN_DPS = 10;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -376,8 +377,8 @@ public class ApnSettingsActivity extends BugleActionBarActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RestoreApnProcessHandler extends Handler {
|
private static class RestoreApnProcessHandler extends Handler {
|
||||||
private Handler mCachedRestoreApnUiHandler;
|
private final Handler mCachedRestoreApnUiHandler;
|
||||||
|
|
||||||
public RestoreApnProcessHandler(Looper looper, Handler restoreApnUiHandler) {
|
public RestoreApnProcessHandler(Looper looper, Handler restoreApnUiHandler) {
|
||||||
super(looper);
|
super(looper);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -56,7 +57,7 @@ public class AttachmentChooserFragment extends Fragment implements DraftMessageD
|
|||||||
private AttachmentChooserFragmentHost mHost;
|
private AttachmentChooserFragmentHost mHost;
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
Binding<DraftMessageData> mBinding = BindingBase.createBinding(this);
|
final Binding<DraftMessageData> mBinding = BindingBase.createBinding(this);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
|
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -36,7 +37,7 @@ public abstract class ConversationInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean mShowing;
|
protected boolean mShowing;
|
||||||
protected ConversationInputBase mConversationInputBase;
|
protected final ConversationInputBase mConversationInputBase;
|
||||||
|
|
||||||
public abstract boolean show(boolean animate);
|
public abstract boolean show(boolean animate);
|
||||||
public abstract boolean hide(boolean animate);
|
public abstract boolean hide(boolean animate);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -77,15 +78,15 @@ public class ConversationListFragment extends Fragment implements ConversationLi
|
|||||||
private boolean mForwardMessageMode;
|
private boolean mForwardMessageMode;
|
||||||
|
|
||||||
public interface ConversationListFragmentHost {
|
public interface ConversationListFragmentHost {
|
||||||
public void onConversationClick(final ConversationListData listData,
|
void onConversationClick(final ConversationListData listData,
|
||||||
final ConversationListItemData conversationListItemData,
|
final ConversationListItemData conversationListItemData,
|
||||||
final boolean isLongClick,
|
final boolean isLongClick,
|
||||||
final ConversationListItemView conversationView);
|
final ConversationListItemView conversationView);
|
||||||
public void onCreateConversationClick();
|
void onCreateConversationClick();
|
||||||
public boolean isConversationSelected(final String conversationId);
|
boolean isConversationSelected(final String conversationId);
|
||||||
public boolean isSwipeAnimatable();
|
boolean isSwipeAnimatable();
|
||||||
public boolean isSelectionMode();
|
boolean isSelectionMode();
|
||||||
public boolean hasWindowFocus();
|
boolean hasWindowFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConversationListFragmentHost mHost;
|
private ConversationListFragmentHost mHost;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -47,8 +48,8 @@ public class ShareIntentFragment extends DialogFragment implements ConversationL
|
|||||||
public static final String HIDE_NEW_CONVERSATION_BUTTON_KEY = "hide_conv_button_key";
|
public static final String HIDE_NEW_CONVERSATION_BUTTON_KEY = "hide_conv_button_key";
|
||||||
|
|
||||||
public interface HostInterface {
|
public interface HostInterface {
|
||||||
public void onConversationClick(final ConversationListItemData conversationListItemData);
|
void onConversationClick(final ConversationListItemData conversationListItemData);
|
||||||
public void onCreateConversationClick();
|
void onCreateConversationClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Binding<ConversationListData> mListBinding = BindingBase.createBinding(this);
|
private final Binding<ConversationListData> mListBinding = BindingBase.createBinding(this);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -99,8 +100,8 @@ class CameraManager implements FocusOverlayManager.Listener {
|
|||||||
* Callback when taking image or video
|
* Callback when taking image or video
|
||||||
*/
|
*/
|
||||||
interface MediaCallback {
|
interface MediaCallback {
|
||||||
static final int MEDIA_CAMERA_CHANGED = 1;
|
int MEDIA_CAMERA_CHANGED = 1;
|
||||||
static final int MEDIA_NO_DATA = 2;
|
int MEDIA_NO_DATA = 2;
|
||||||
|
|
||||||
void onMediaReady(Uri uriToMedia, String contentType, int width, int height);
|
void onMediaReady(Uri uriToMedia, String contentType, int width, int height);
|
||||||
void onMediaFailed(Exception exception);
|
void onMediaFailed(Exception exception);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -55,6 +56,7 @@ public class GalleryGridItemView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
final
|
||||||
GalleryGridItemData mData;
|
GalleryGridItemData mData;
|
||||||
private AsyncImageView mImageView;
|
private AsyncImageView mImageView;
|
||||||
private CheckBox mCheckBox;
|
private CheckBox mCheckBox;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -53,7 +54,7 @@ class GalleryMediaChooser extends MediaChooser implements
|
|||||||
private View mMissingPermissionView;
|
private View mMissingPermissionView;
|
||||||
|
|
||||||
/** Handles picking a media from the document picker. */
|
/** Handles picking a media from the document picker. */
|
||||||
private DocumentImagePicker mDocumentImagePicker;
|
private final DocumentImagePicker mDocumentImagePicker;
|
||||||
|
|
||||||
GalleryMediaChooser(final MediaPicker mediaPicker) {
|
GalleryMediaChooser(final MediaPicker mediaPicker) {
|
||||||
super(mediaPicker);
|
super(mediaPicker);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -36,7 +37,7 @@ import java.io.IOException;
|
|||||||
* implementations of the shared methods are delegated to CameraPreview
|
* implementations of the shared methods are delegated to CameraPreview
|
||||||
*/
|
*/
|
||||||
public class HardwareCameraPreview extends TextureView implements CameraPreview.CameraPreviewHost {
|
public class HardwareCameraPreview extends TextureView implements CameraPreview.CameraPreviewHost {
|
||||||
private CameraPreview mPreview;
|
private final CameraPreview mPreview;
|
||||||
|
|
||||||
public HardwareCameraPreview(final Context context, final AttributeSet attrs) {
|
public HardwareCameraPreview(final Context context, final AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -17,8 +18,8 @@
|
|||||||
package com.android.messaging.ui.mediapicker.camerafocus;
|
package com.android.messaging.ui.mediapicker.camerafocus;
|
||||||
|
|
||||||
public interface FocusIndicator {
|
public interface FocusIndicator {
|
||||||
public void showStart();
|
void showStart();
|
||||||
public void showSuccess(boolean timeout);
|
void showSuccess(boolean timeout);
|
||||||
public void showFail(boolean timeout);
|
void showFail(boolean timeout);
|
||||||
public void clear();
|
void clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -76,7 +77,7 @@ public class FocusOverlayManager {
|
|||||||
private boolean mMeteringAreaSupported;
|
private boolean mMeteringAreaSupported;
|
||||||
private boolean mLockAeAwbNeeded;
|
private boolean mLockAeAwbNeeded;
|
||||||
private boolean mAeAwbLock;
|
private boolean mAeAwbLock;
|
||||||
private Matrix mMatrix;
|
private final Matrix mMatrix;
|
||||||
|
|
||||||
private PieRenderer mPieRenderer;
|
private PieRenderer mPieRenderer;
|
||||||
|
|
||||||
@@ -89,14 +90,14 @@ public class FocusOverlayManager {
|
|||||||
private String mFocusMode;
|
private String mFocusMode;
|
||||||
private String mOverrideFocusMode;
|
private String mOverrideFocusMode;
|
||||||
private Parameters mParameters;
|
private Parameters mParameters;
|
||||||
private Handler mHandler;
|
private final Handler mHandler;
|
||||||
Listener mListener;
|
private final Listener mListener;
|
||||||
|
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
public void autoFocus();
|
void autoFocus();
|
||||||
public void cancelAutoFocus();
|
void cancelAutoFocus();
|
||||||
public boolean capture();
|
boolean capture();
|
||||||
public void setFocusParameters();
|
void setFocusParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MainHandler extends Handler {
|
private class MainHandler extends Handler {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -29,12 +30,12 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class PieItem {
|
public class PieItem {
|
||||||
|
|
||||||
public static interface OnClickListener {
|
public interface OnClickListener {
|
||||||
void onClick(PieItem item);
|
void onClick(PieItem item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable mDrawable;
|
private Drawable mDrawable;
|
||||||
private int level;
|
private final int level;
|
||||||
private float mCenter;
|
private float mCenter;
|
||||||
private float start;
|
private float start;
|
||||||
private float sweep;
|
private float sweep;
|
||||||
@@ -199,4 +200,4 @@ public class PieItem {
|
|||||||
setAlpha(mAlpha);
|
setAlpha(mAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -46,14 +47,14 @@ public class PieRenderer extends OverlayRenderer
|
|||||||
// These states are used to make sure the animation is run for at least some
|
// These states are used to make sure the animation is run for at least some
|
||||||
// time.
|
// time.
|
||||||
private volatile int mState;
|
private volatile int mState;
|
||||||
private ScaleAnimation mAnimation = new ScaleAnimation();
|
private final ScaleAnimation mAnimation = new ScaleAnimation();
|
||||||
private static final int STATE_IDLE = 0;
|
private static final int STATE_IDLE = 0;
|
||||||
private static final int STATE_FOCUSING = 1;
|
private static final int STATE_FOCUSING = 1;
|
||||||
private static final int STATE_FINISHING = 2;
|
private static final int STATE_FINISHING = 2;
|
||||||
private static final int STATE_PIE = 8;
|
private static final int STATE_PIE = 8;
|
||||||
|
|
||||||
private Runnable mDisappear = new Disappear();
|
private final Runnable mDisappear = new Disappear();
|
||||||
private Animation.AnimationListener mEndAction = new EndAction();
|
private final Animation.AnimationListener mEndAction = new EndAction();
|
||||||
private static final int SCALING_UP_TIME = 600;
|
private static final int SCALING_UP_TIME = 600;
|
||||||
private static final int SCALING_DOWN_TIME = 100;
|
private static final int SCALING_DOWN_TIME = 100;
|
||||||
private static final int DISAPPEAR_TIMEOUT = 200;
|
private static final int DISAPPEAR_TIMEOUT = 200;
|
||||||
@@ -114,7 +115,7 @@ public class PieRenderer extends OverlayRenderer
|
|||||||
private LinearAnimation mFadeIn;
|
private LinearAnimation mFadeIn;
|
||||||
private volatile boolean mFocusCancelled;
|
private volatile boolean mFocusCancelled;
|
||||||
|
|
||||||
private Handler mHandler = new Handler() {
|
private final Handler mHandler = new Handler() {
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
switch(msg.what) {
|
switch(msg.what) {
|
||||||
case MSG_OPEN:
|
case MSG_OPEN:
|
||||||
@@ -133,9 +134,9 @@ public class PieRenderer extends OverlayRenderer
|
|||||||
|
|
||||||
private PieListener mListener;
|
private PieListener mListener;
|
||||||
|
|
||||||
public static interface PieListener {
|
public interface PieListener {
|
||||||
public void onPieOpened(int centerX, int centerY);
|
void onPieOpened(int centerX, int centerY);
|
||||||
public void onPieClosed();
|
void onPieClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPieListener(PieListener pl) {
|
public void setPieListener(PieListener pl) {
|
||||||
@@ -801,8 +802,8 @@ public class PieRenderer extends OverlayRenderer
|
|||||||
|
|
||||||
|
|
||||||
private class LinearAnimation extends Animation {
|
private class LinearAnimation extends Animation {
|
||||||
private float mFrom;
|
private final float mFrom;
|
||||||
private float mTo;
|
private final float mTo;
|
||||||
private float mValue;
|
private float mValue;
|
||||||
|
|
||||||
public LinearAnimation(float from, float to) {
|
public LinearAnimation(float from, float to) {
|
||||||
@@ -822,4 +823,4 @@ public class PieRenderer extends OverlayRenderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -30,20 +31,20 @@ public class RenderOverlay extends FrameLayout {
|
|||||||
|
|
||||||
interface Renderer {
|
interface Renderer {
|
||||||
|
|
||||||
public boolean handlesTouch();
|
boolean handlesTouch();
|
||||||
public boolean onTouchEvent(MotionEvent evt);
|
boolean onTouchEvent(MotionEvent evt);
|
||||||
public void setOverlay(RenderOverlay overlay);
|
void setOverlay(RenderOverlay overlay);
|
||||||
public void layout(int left, int top, int right, int bottom);
|
void layout(int left, int top, int right, int bottom);
|
||||||
public void draw(Canvas canvas);
|
void draw(Canvas canvas);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private RenderView mRenderView;
|
private final RenderView mRenderView;
|
||||||
private List<Renderer> mClients;
|
private final List<Renderer> mClients;
|
||||||
|
|
||||||
// reverse list of touch clients
|
// reverse list of touch clients
|
||||||
private List<Renderer> mTouchClients;
|
private final List<Renderer> mTouchClients;
|
||||||
private int[] mPosition = new int[2];
|
private final int[] mPosition = new int[2];
|
||||||
|
|
||||||
public RenderOverlay(Context context, AttributeSet attrs) {
|
public RenderOverlay(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
@@ -175,4 +176,4 @@ public class RenderOverlay extends FrameLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,9 +21,9 @@ import android.os.Looper;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public final class Assert {
|
public final class Assert {
|
||||||
public static @interface RunsOnMainThread {}
|
public @interface RunsOnMainThread {}
|
||||||
public static @interface DoesNotRunOnMainThread {}
|
public @interface DoesNotRunOnMainThread {}
|
||||||
public static @interface RunsOnAnyThread {}
|
public @interface RunsOnAnyThread {}
|
||||||
|
|
||||||
private static final String TEST_THREAD_SUBSTRING = "test";
|
private static final String TEST_THREAD_SUBSTRING = "test";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -25,7 +26,7 @@ package com.android.messaging.util;
|
|||||||
public class CircularArray<E> {
|
public class CircularArray<E> {
|
||||||
private int mNextWriter;
|
private int mNextWriter;
|
||||||
private boolean mHasWrapped;
|
private boolean mHasWrapped;
|
||||||
private int mMaxCount;
|
private final int mMaxCount;
|
||||||
Object mList[];
|
Object mList[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class ConnectivityUtil {
|
|||||||
private ConnectivityListener mListener;
|
private ConnectivityListener mListener;
|
||||||
|
|
||||||
public interface ConnectivityListener {
|
public interface ConnectivityListener {
|
||||||
public void onPhoneStateChanged(int serviceState);
|
void onPhoneStateChanged(int serviceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConnectivityUtil(final Context context, final int subId) {
|
public ConnectivityUtil(final Context context, final int subId) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2008 Esmertec AG.
|
* Copyright (C) 2007-2008 Esmertec AG.
|
||||||
* Copyright (C) 2007-2008 The Android Open Source Project
|
* Copyright (C) 2007-2008 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,10 +21,10 @@ package com.android.messaging.util;
|
|||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
|
|
||||||
public final class ContentType {
|
public final class ContentType {
|
||||||
public static String THREE_GPP_EXTENSION = "3gp";
|
public static final String THREE_GPP_EXTENSION = "3gp";
|
||||||
public static String VIDEO_MP4_EXTENSION = "mp4";
|
public static final String VIDEO_MP4_EXTENSION = "mp4";
|
||||||
// Default extension used when we don't know one.
|
// Default extension used when we don't know one.
|
||||||
public static String DEFAULT_EXTENSION = "dat";
|
public static final String DEFAULT_EXTENSION = "dat";
|
||||||
|
|
||||||
public static final int TYPE_IMAGE = 0;
|
public static final int TYPE_IMAGE = 0;
|
||||||
public static final int TYPE_VIDEO = 1;
|
public static final int TYPE_VIDEO = 1;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -95,7 +96,7 @@ public class DebugUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class DebugAction {
|
public abstract static class DebugAction {
|
||||||
String mTitle;
|
final String mTitle;
|
||||||
public DebugAction(final String title) {
|
public DebugAction(final String title) {
|
||||||
mTitle = title;
|
mTitle = title;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -33,8 +34,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public class GifTranscoder {
|
public class GifTranscoder {
|
||||||
private static final String TAG = LogUtil.BUGLE_TAG;
|
private static final String TAG = LogUtil.BUGLE_TAG;
|
||||||
|
|
||||||
private static int MIN_HEIGHT = 100;
|
private static final int MIN_HEIGHT = 100;
|
||||||
private static int MIN_WIDTH = 100;
|
private static final int MIN_WIDTH = 100;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
System.loadLibrary("giftranscode");
|
System.loadLibrary("giftranscode");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,8 +21,8 @@ import android.content.Context;
|
|||||||
import com.android.messaging.Factory;
|
import com.android.messaging.Factory;
|
||||||
|
|
||||||
public abstract class MediaUtil {
|
public abstract class MediaUtil {
|
||||||
public static interface OnCompletionListener {
|
public interface OnCompletionListener {
|
||||||
public void onCompletion();
|
void onCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MediaUtil get() {
|
public static MediaUtil get() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -71,7 +72,7 @@ public class NotificationPlayer implements OnCompletionListener {
|
|||||||
* be created with a looper running so its event handler is not null.
|
* be created with a looper running so its event handler is not null.
|
||||||
*/
|
*/
|
||||||
private final class CreationAndCompletionThread extends Thread {
|
private final class CreationAndCompletionThread extends Thread {
|
||||||
public Command mCmd;
|
public final Command mCmd;
|
||||||
public CreationAndCompletionThread(final Command cmd) {
|
public CreationAndCompletionThread(final Command cmd) {
|
||||||
super();
|
super();
|
||||||
mCmd = cmd;
|
mCmd = cmd;
|
||||||
@@ -235,7 +236,7 @@ public class NotificationPlayer implements OnCompletionListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String mTag;
|
private final String mTag;
|
||||||
private CmdThread mThread;
|
private CmdThread mThread;
|
||||||
private CreationAndCompletionThread mCompletionThread;
|
private CreationAndCompletionThread mCompletionThread;
|
||||||
private final Object mCompletionHandlingLock = new Object();
|
private final Object mCompletionHandlingLock = new Object();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -76,7 +77,7 @@ public class OsUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Hashtable<String, Integer> sPermissions = new Hashtable<String, Integer>();
|
private static final Hashtable<String, Integer> sPermissions = new Hashtable<String, Integer>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the app has the specified permission. If it does not, the app needs to use
|
* Check if the app has the specified permission. If it does not, the app needs to use
|
||||||
@@ -150,7 +151,7 @@ public class OsUtil {
|
|||||||
return missingArray;
|
return missingArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] sRequiredPermissions = new String[] {
|
private static final String[] sRequiredPermissions = new String[] {
|
||||||
// Required to read existing SMS threads
|
// Required to read existing SMS threads
|
||||||
Manifest.permission.READ_SMS,
|
Manifest.permission.READ_SMS,
|
||||||
// Required for knowing the phone number, number of SIMs, etc.
|
// Required for knowing the phone number, number of SIMs, etc.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -42,7 +43,7 @@ public abstract class SafeAsyncTask<Params, Progress, Result>
|
|||||||
|
|
||||||
private static final String WAKELOCK_ID = "bugle_safe_async_task_wakelock";
|
private static final String WAKELOCK_ID = "bugle_safe_async_task_wakelock";
|
||||||
protected static final int WAKELOCK_OP = 1000;
|
protected static final int WAKELOCK_OP = 1000;
|
||||||
private static WakeLockHelper sWakeLock = new WakeLockHelper(WAKELOCK_ID);
|
private static final WakeLockHelper sWakeLock = new WakeLockHelper(WAKELOCK_ID);
|
||||||
|
|
||||||
private final long mMaxExecutionTimeMillis;
|
private final long mMaxExecutionTimeMillis;
|
||||||
private final boolean mCancelExecutionOnTimeout;
|
private final boolean mCancelExecutionOnTimeout;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2013 The Android Open Source Project
|
* Copyright (C) 2013 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -322,7 +323,7 @@ public class ExifInterface {
|
|||||||
* Tags that contain offset markers. These are included in the banned
|
* Tags that contain offset markers. These are included in the banned
|
||||||
* defines.
|
* defines.
|
||||||
*/
|
*/
|
||||||
private static HashSet<Short> sOffsetTags = new HashSet<Short>();
|
private static final HashSet<Short> sOffsetTags = new HashSet<Short>();
|
||||||
static {
|
static {
|
||||||
sOffsetTags.add(getTrueTagKey(TAG_GPS_IFD));
|
sOffsetTags.add(getTrueTagKey(TAG_GPS_IFD));
|
||||||
sOffsetTags.add(getTrueTagKey(TAG_EXIF_IFD));
|
sOffsetTags.add(getTrueTagKey(TAG_EXIF_IFD));
|
||||||
@@ -334,7 +335,7 @@ public class ExifInterface {
|
|||||||
/**
|
/**
|
||||||
* Tags with definitions that cannot be overridden (banned defines).
|
* Tags with definitions that cannot be overridden (banned defines).
|
||||||
*/
|
*/
|
||||||
protected static HashSet<Short> sBannedDefines = new HashSet<Short>(sOffsetTags);
|
protected static final HashSet<Short> sBannedDefines = new HashSet<Short>(sOffsetTags);
|
||||||
static {
|
static {
|
||||||
sBannedDefines.add(getTrueTagKey(TAG_NULL));
|
sBannedDefines.add(getTrueTagKey(TAG_NULL));
|
||||||
sBannedDefines.add(getTrueTagKey(TAG_JPEG_INTERCHANGE_FORMAT_LENGTH));
|
sBannedDefines.add(getTrueTagKey(TAG_JPEG_INTERCHANGE_FORMAT_LENGTH));
|
||||||
@@ -377,84 +378,84 @@ public class ExifInterface {
|
|||||||
* <li>RIGHT_BOTTOM is a 270 degree clockwise rotation.</li>
|
* <li>RIGHT_BOTTOM is a 270 degree clockwise rotation.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public static interface Orientation {
|
public interface Orientation {
|
||||||
public static final short TOP_LEFT = 1;
|
short TOP_LEFT = 1;
|
||||||
public static final short TOP_RIGHT = 2;
|
short TOP_RIGHT = 2;
|
||||||
public static final short BOTTOM_LEFT = 3;
|
short BOTTOM_LEFT = 3;
|
||||||
public static final short BOTTOM_RIGHT = 4;
|
short BOTTOM_RIGHT = 4;
|
||||||
public static final short LEFT_TOP = 5;
|
short LEFT_TOP = 5;
|
||||||
public static final short RIGHT_TOP = 6;
|
short RIGHT_TOP = 6;
|
||||||
public static final short LEFT_BOTTOM = 7;
|
short LEFT_BOTTOM = 7;
|
||||||
public static final short RIGHT_BOTTOM = 8;
|
short RIGHT_BOTTOM = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_Y_CB_CR_POSITIONING}
|
* Constants for {@link TAG_Y_CB_CR_POSITIONING}
|
||||||
*/
|
*/
|
||||||
public static interface YCbCrPositioning {
|
public interface YCbCrPositioning {
|
||||||
public static final short CENTERED = 1;
|
short CENTERED = 1;
|
||||||
public static final short CO_SITED = 2;
|
short CO_SITED = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_COMPRESSION}
|
* Constants for {@link TAG_COMPRESSION}
|
||||||
*/
|
*/
|
||||||
public static interface Compression {
|
public interface Compression {
|
||||||
public static final short UNCOMPRESSION = 1;
|
short UNCOMPRESSION = 1;
|
||||||
public static final short JPEG = 6;
|
short JPEG = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_RESOLUTION_UNIT}
|
* Constants for {@link TAG_RESOLUTION_UNIT}
|
||||||
*/
|
*/
|
||||||
public static interface ResolutionUnit {
|
public interface ResolutionUnit {
|
||||||
public static final short INCHES = 2;
|
short INCHES = 2;
|
||||||
public static final short CENTIMETERS = 3;
|
short CENTIMETERS = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_PHOTOMETRIC_INTERPRETATION}
|
* Constants for {@link TAG_PHOTOMETRIC_INTERPRETATION}
|
||||||
*/
|
*/
|
||||||
public static interface PhotometricInterpretation {
|
public interface PhotometricInterpretation {
|
||||||
public static final short RGB = 2;
|
short RGB = 2;
|
||||||
public static final short YCBCR = 6;
|
short YCBCR = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_PLANAR_CONFIGURATION}
|
* Constants for {@link TAG_PLANAR_CONFIGURATION}
|
||||||
*/
|
*/
|
||||||
public static interface PlanarConfiguration {
|
public interface PlanarConfiguration {
|
||||||
public static final short CHUNKY = 1;
|
short CHUNKY = 1;
|
||||||
public static final short PLANAR = 2;
|
short PLANAR = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_EXPOSURE_PROGRAM}
|
* Constants for {@link TAG_EXPOSURE_PROGRAM}
|
||||||
*/
|
*/
|
||||||
public static interface ExposureProgram {
|
public interface ExposureProgram {
|
||||||
public static final short NOT_DEFINED = 0;
|
short NOT_DEFINED = 0;
|
||||||
public static final short MANUAL = 1;
|
short MANUAL = 1;
|
||||||
public static final short NORMAL_PROGRAM = 2;
|
short NORMAL_PROGRAM = 2;
|
||||||
public static final short APERTURE_PRIORITY = 3;
|
short APERTURE_PRIORITY = 3;
|
||||||
public static final short SHUTTER_PRIORITY = 4;
|
short SHUTTER_PRIORITY = 4;
|
||||||
public static final short CREATIVE_PROGRAM = 5;
|
short CREATIVE_PROGRAM = 5;
|
||||||
public static final short ACTION_PROGRAM = 6;
|
short ACTION_PROGRAM = 6;
|
||||||
public static final short PROTRAIT_MODE = 7;
|
short PROTRAIT_MODE = 7;
|
||||||
public static final short LANDSCAPE_MODE = 8;
|
short LANDSCAPE_MODE = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_METERING_MODE}
|
* Constants for {@link TAG_METERING_MODE}
|
||||||
*/
|
*/
|
||||||
public static interface MeteringMode {
|
public interface MeteringMode {
|
||||||
public static final short UNKNOWN = 0;
|
short UNKNOWN = 0;
|
||||||
public static final short AVERAGE = 1;
|
short AVERAGE = 1;
|
||||||
public static final short CENTER_WEIGHTED_AVERAGE = 2;
|
short CENTER_WEIGHTED_AVERAGE = 2;
|
||||||
public static final short SPOT = 3;
|
short SPOT = 3;
|
||||||
public static final short MULTISPOT = 4;
|
short MULTISPOT = 4;
|
||||||
public static final short PATTERN = 5;
|
short PATTERN = 5;
|
||||||
public static final short PARTAIL = 6;
|
short PARTAIL = 6;
|
||||||
public static final short OTHER = 255;
|
short OTHER = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -466,244 +467,244 @@ public class ExifInterface {
|
|||||||
* short flash = FIRED | RETURN_STROBE_RETURN_LIGHT_DETECTED |
|
* short flash = FIRED | RETURN_STROBE_RETURN_LIGHT_DETECTED |
|
||||||
* MODE_AUTO_MODE
|
* MODE_AUTO_MODE
|
||||||
*/
|
*/
|
||||||
public static interface Flash {
|
public interface Flash {
|
||||||
// LSB
|
// LSB
|
||||||
public static final short DID_NOT_FIRED = 0;
|
short DID_NOT_FIRED = 0;
|
||||||
public static final short FIRED = 1;
|
short FIRED = 1;
|
||||||
// 1st~2nd bits
|
// 1st~2nd bits
|
||||||
public static final short RETURN_NO_STROBE_RETURN_DETECTION_FUNCTION = 0 << 1;
|
short RETURN_NO_STROBE_RETURN_DETECTION_FUNCTION = 0 << 1;
|
||||||
public static final short RETURN_STROBE_RETURN_LIGHT_NOT_DETECTED = 2 << 1;
|
short RETURN_STROBE_RETURN_LIGHT_NOT_DETECTED = 2 << 1;
|
||||||
public static final short RETURN_STROBE_RETURN_LIGHT_DETECTED = 3 << 1;
|
short RETURN_STROBE_RETURN_LIGHT_DETECTED = 3 << 1;
|
||||||
// 3rd~4th bits
|
// 3rd~4th bits
|
||||||
public static final short MODE_UNKNOWN = 0 << 3;
|
short MODE_UNKNOWN = 0 << 3;
|
||||||
public static final short MODE_COMPULSORY_FLASH_FIRING = 1 << 3;
|
short MODE_COMPULSORY_FLASH_FIRING = 1 << 3;
|
||||||
public static final short MODE_COMPULSORY_FLASH_SUPPRESSION = 2 << 3;
|
short MODE_COMPULSORY_FLASH_SUPPRESSION = 2 << 3;
|
||||||
public static final short MODE_AUTO_MODE = 3 << 3;
|
short MODE_AUTO_MODE = 3 << 3;
|
||||||
// 5th bit
|
// 5th bit
|
||||||
public static final short FUNCTION_PRESENT = 0 << 5;
|
short FUNCTION_PRESENT = 0 << 5;
|
||||||
public static final short FUNCTION_NO_FUNCTION = 1 << 5;
|
short FUNCTION_NO_FUNCTION = 1 << 5;
|
||||||
// 6th bit
|
// 6th bit
|
||||||
public static final short RED_EYE_REDUCTION_NO_OR_UNKNOWN = 0 << 6;
|
short RED_EYE_REDUCTION_NO_OR_UNKNOWN = 0 << 6;
|
||||||
public static final short RED_EYE_REDUCTION_SUPPORT = 1 << 6;
|
short RED_EYE_REDUCTION_SUPPORT = 1 << 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_COLOR_SPACE}
|
* Constants for {@link TAG_COLOR_SPACE}
|
||||||
*/
|
*/
|
||||||
public static interface ColorSpace {
|
public interface ColorSpace {
|
||||||
public static final short SRGB = 1;
|
short SRGB = 1;
|
||||||
public static final short UNCALIBRATED = (short) 0xFFFF;
|
short UNCALIBRATED = (short) 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_EXPOSURE_MODE}
|
* Constants for {@link TAG_EXPOSURE_MODE}
|
||||||
*/
|
*/
|
||||||
public static interface ExposureMode {
|
public interface ExposureMode {
|
||||||
public static final short AUTO_EXPOSURE = 0;
|
short AUTO_EXPOSURE = 0;
|
||||||
public static final short MANUAL_EXPOSURE = 1;
|
short MANUAL_EXPOSURE = 1;
|
||||||
public static final short AUTO_BRACKET = 2;
|
short AUTO_BRACKET = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_WHITE_BALANCE}
|
* Constants for {@link TAG_WHITE_BALANCE}
|
||||||
*/
|
*/
|
||||||
public static interface WhiteBalance {
|
public interface WhiteBalance {
|
||||||
public static final short AUTO = 0;
|
short AUTO = 0;
|
||||||
public static final short MANUAL = 1;
|
short MANUAL = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SCENE_CAPTURE_TYPE}
|
* Constants for {@link TAG_SCENE_CAPTURE_TYPE}
|
||||||
*/
|
*/
|
||||||
public static interface SceneCapture {
|
public interface SceneCapture {
|
||||||
public static final short STANDARD = 0;
|
short STANDARD = 0;
|
||||||
public static final short LANDSCAPE = 1;
|
short LANDSCAPE = 1;
|
||||||
public static final short PROTRAIT = 2;
|
short PROTRAIT = 2;
|
||||||
public static final short NIGHT_SCENE = 3;
|
short NIGHT_SCENE = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_COMPONENTS_CONFIGURATION}
|
* Constants for {@link TAG_COMPONENTS_CONFIGURATION}
|
||||||
*/
|
*/
|
||||||
public static interface ComponentsConfiguration {
|
public interface ComponentsConfiguration {
|
||||||
public static final short NOT_EXIST = 0;
|
short NOT_EXIST = 0;
|
||||||
public static final short Y = 1;
|
short Y = 1;
|
||||||
public static final short CB = 2;
|
short CB = 2;
|
||||||
public static final short CR = 3;
|
short CR = 3;
|
||||||
public static final short R = 4;
|
short R = 4;
|
||||||
public static final short G = 5;
|
short G = 5;
|
||||||
public static final short B = 6;
|
short B = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_LIGHT_SOURCE}
|
* Constants for {@link TAG_LIGHT_SOURCE}
|
||||||
*/
|
*/
|
||||||
public static interface LightSource {
|
public interface LightSource {
|
||||||
public static final short UNKNOWN = 0;
|
short UNKNOWN = 0;
|
||||||
public static final short DAYLIGHT = 1;
|
short DAYLIGHT = 1;
|
||||||
public static final short FLUORESCENT = 2;
|
short FLUORESCENT = 2;
|
||||||
public static final short TUNGSTEN = 3;
|
short TUNGSTEN = 3;
|
||||||
public static final short FLASH = 4;
|
short FLASH = 4;
|
||||||
public static final short FINE_WEATHER = 9;
|
short FINE_WEATHER = 9;
|
||||||
public static final short CLOUDY_WEATHER = 10;
|
short CLOUDY_WEATHER = 10;
|
||||||
public static final short SHADE = 11;
|
short SHADE = 11;
|
||||||
public static final short DAYLIGHT_FLUORESCENT = 12;
|
short DAYLIGHT_FLUORESCENT = 12;
|
||||||
public static final short DAY_WHITE_FLUORESCENT = 13;
|
short DAY_WHITE_FLUORESCENT = 13;
|
||||||
public static final short COOL_WHITE_FLUORESCENT = 14;
|
short COOL_WHITE_FLUORESCENT = 14;
|
||||||
public static final short WHITE_FLUORESCENT = 15;
|
short WHITE_FLUORESCENT = 15;
|
||||||
public static final short STANDARD_LIGHT_A = 17;
|
short STANDARD_LIGHT_A = 17;
|
||||||
public static final short STANDARD_LIGHT_B = 18;
|
short STANDARD_LIGHT_B = 18;
|
||||||
public static final short STANDARD_LIGHT_C = 19;
|
short STANDARD_LIGHT_C = 19;
|
||||||
public static final short D55 = 20;
|
short D55 = 20;
|
||||||
public static final short D65 = 21;
|
short D65 = 21;
|
||||||
public static final short D75 = 22;
|
short D75 = 22;
|
||||||
public static final short D50 = 23;
|
short D50 = 23;
|
||||||
public static final short ISO_STUDIO_TUNGSTEN = 24;
|
short ISO_STUDIO_TUNGSTEN = 24;
|
||||||
public static final short OTHER = 255;
|
short OTHER = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SENSING_METHOD}
|
* Constants for {@link TAG_SENSING_METHOD}
|
||||||
*/
|
*/
|
||||||
public static interface SensingMethod {
|
public interface SensingMethod {
|
||||||
public static final short NOT_DEFINED = 1;
|
short NOT_DEFINED = 1;
|
||||||
public static final short ONE_CHIP_COLOR = 2;
|
short ONE_CHIP_COLOR = 2;
|
||||||
public static final short TWO_CHIP_COLOR = 3;
|
short TWO_CHIP_COLOR = 3;
|
||||||
public static final short THREE_CHIP_COLOR = 4;
|
short THREE_CHIP_COLOR = 4;
|
||||||
public static final short COLOR_SEQUENTIAL_AREA = 5;
|
short COLOR_SEQUENTIAL_AREA = 5;
|
||||||
public static final short TRILINEAR = 7;
|
short TRILINEAR = 7;
|
||||||
public static final short COLOR_SEQUENTIAL_LINEAR = 8;
|
short COLOR_SEQUENTIAL_LINEAR = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_FILE_SOURCE}
|
* Constants for {@link TAG_FILE_SOURCE}
|
||||||
*/
|
*/
|
||||||
public static interface FileSource {
|
public interface FileSource {
|
||||||
public static final short DSC = 3;
|
short DSC = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SCENE_TYPE}
|
* Constants for {@link TAG_SCENE_TYPE}
|
||||||
*/
|
*/
|
||||||
public static interface SceneType {
|
public interface SceneType {
|
||||||
public static final short DIRECT_PHOTOGRAPHED = 1;
|
short DIRECT_PHOTOGRAPHED = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GAIN_CONTROL}
|
* Constants for {@link TAG_GAIN_CONTROL}
|
||||||
*/
|
*/
|
||||||
public static interface GainControl {
|
public interface GainControl {
|
||||||
public static final short NONE = 0;
|
short NONE = 0;
|
||||||
public static final short LOW_UP = 1;
|
short LOW_UP = 1;
|
||||||
public static final short HIGH_UP = 2;
|
short HIGH_UP = 2;
|
||||||
public static final short LOW_DOWN = 3;
|
short LOW_DOWN = 3;
|
||||||
public static final short HIGH_DOWN = 4;
|
short HIGH_DOWN = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_CONTRAST}
|
* Constants for {@link TAG_CONTRAST}
|
||||||
*/
|
*/
|
||||||
public static interface Contrast {
|
public interface Contrast {
|
||||||
public static final short NORMAL = 0;
|
short NORMAL = 0;
|
||||||
public static final short SOFT = 1;
|
short SOFT = 1;
|
||||||
public static final short HARD = 2;
|
short HARD = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SATURATION}
|
* Constants for {@link TAG_SATURATION}
|
||||||
*/
|
*/
|
||||||
public static interface Saturation {
|
public interface Saturation {
|
||||||
public static final short NORMAL = 0;
|
short NORMAL = 0;
|
||||||
public static final short LOW = 1;
|
short LOW = 1;
|
||||||
public static final short HIGH = 2;
|
short HIGH = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SHARPNESS}
|
* Constants for {@link TAG_SHARPNESS}
|
||||||
*/
|
*/
|
||||||
public static interface Sharpness {
|
public interface Sharpness {
|
||||||
public static final short NORMAL = 0;
|
short NORMAL = 0;
|
||||||
public static final short SOFT = 1;
|
short SOFT = 1;
|
||||||
public static final short HARD = 2;
|
short HARD = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_SUBJECT_DISTANCE}
|
* Constants for {@link TAG_SUBJECT_DISTANCE}
|
||||||
*/
|
*/
|
||||||
public static interface SubjectDistance {
|
public interface SubjectDistance {
|
||||||
public static final short UNKNOWN = 0;
|
short UNKNOWN = 0;
|
||||||
public static final short MACRO = 1;
|
short MACRO = 1;
|
||||||
public static final short CLOSE_VIEW = 2;
|
short CLOSE_VIEW = 2;
|
||||||
public static final short DISTANT_VIEW = 3;
|
short DISTANT_VIEW = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_LATITUDE_REF},
|
* Constants for {@link TAG_GPS_LATITUDE_REF},
|
||||||
* {@link TAG_GPS_DEST_LATITUDE_REF}
|
* {@link TAG_GPS_DEST_LATITUDE_REF}
|
||||||
*/
|
*/
|
||||||
public static interface GpsLatitudeRef {
|
public interface GpsLatitudeRef {
|
||||||
public static final String NORTH = "N";
|
String NORTH = "N";
|
||||||
public static final String SOUTH = "S";
|
String SOUTH = "S";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_LONGITUDE_REF},
|
* Constants for {@link TAG_GPS_LONGITUDE_REF},
|
||||||
* {@link TAG_GPS_DEST_LONGITUDE_REF}
|
* {@link TAG_GPS_DEST_LONGITUDE_REF}
|
||||||
*/
|
*/
|
||||||
public static interface GpsLongitudeRef {
|
public interface GpsLongitudeRef {
|
||||||
public static final String EAST = "E";
|
String EAST = "E";
|
||||||
public static final String WEST = "W";
|
String WEST = "W";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_ALTITUDE_REF}
|
* Constants for {@link TAG_GPS_ALTITUDE_REF}
|
||||||
*/
|
*/
|
||||||
public static interface GpsAltitudeRef {
|
public interface GpsAltitudeRef {
|
||||||
public static final short SEA_LEVEL = 0;
|
short SEA_LEVEL = 0;
|
||||||
public static final short SEA_LEVEL_NEGATIVE = 1;
|
short SEA_LEVEL_NEGATIVE = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_STATUS}
|
* Constants for {@link TAG_GPS_STATUS}
|
||||||
*/
|
*/
|
||||||
public static interface GpsStatus {
|
public interface GpsStatus {
|
||||||
public static final String IN_PROGRESS = "A";
|
String IN_PROGRESS = "A";
|
||||||
public static final String INTEROPERABILITY = "V";
|
String INTEROPERABILITY = "V";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_MEASURE_MODE}
|
* Constants for {@link TAG_GPS_MEASURE_MODE}
|
||||||
*/
|
*/
|
||||||
public static interface GpsMeasureMode {
|
public interface GpsMeasureMode {
|
||||||
public static final String MODE_2_DIMENSIONAL = "2";
|
String MODE_2_DIMENSIONAL = "2";
|
||||||
public static final String MODE_3_DIMENSIONAL = "3";
|
String MODE_3_DIMENSIONAL = "3";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_SPEED_REF},
|
* Constants for {@link TAG_GPS_SPEED_REF},
|
||||||
* {@link TAG_GPS_DEST_DISTANCE_REF}
|
* {@link TAG_GPS_DEST_DISTANCE_REF}
|
||||||
*/
|
*/
|
||||||
public static interface GpsSpeedRef {
|
public interface GpsSpeedRef {
|
||||||
public static final String KILOMETERS = "K";
|
String KILOMETERS = "K";
|
||||||
public static final String MILES = "M";
|
String MILES = "M";
|
||||||
public static final String KNOTS = "N";
|
String KNOTS = "N";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_TRACK_REF},
|
* Constants for {@link TAG_GPS_TRACK_REF},
|
||||||
* {@link TAG_GPS_IMG_DIRECTION_REF}, {@link TAG_GPS_DEST_BEARING_REF}
|
* {@link TAG_GPS_IMG_DIRECTION_REF}, {@link TAG_GPS_DEST_BEARING_REF}
|
||||||
*/
|
*/
|
||||||
public static interface GpsTrackRef {
|
public interface GpsTrackRef {
|
||||||
public static final String TRUE_DIRECTION = "T";
|
String TRUE_DIRECTION = "T";
|
||||||
public static final String MAGNETIC_DIRECTION = "M";
|
String MAGNETIC_DIRECTION = "M";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants for {@link TAG_GPS_DIFFERENTIAL}
|
* Constants for {@link TAG_GPS_DIFFERENTIAL}
|
||||||
*/
|
*/
|
||||||
public static interface GpsDifferential {
|
public interface GpsDifferential {
|
||||||
public static final short WITHOUT_DIFFERENTIAL_CORRECTION = 0;
|
short WITHOUT_DIFFERENTIAL_CORRECTION = 0;
|
||||||
public static final short DIFFERENTIAL_CORRECTION_APPLIED = 1;
|
short DIFFERENTIAL_CORRECTION_APPLIED = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String NULL_ARGUMENT_STRING = "Argument is null";
|
private static final String NULL_ARGUMENT_STRING = "Argument is null";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -877,8 +878,8 @@ public class ExifParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class ImageEvent {
|
private static class ImageEvent {
|
||||||
int stripIndex;
|
final int stripIndex;
|
||||||
int type;
|
final int type;
|
||||||
|
|
||||||
ImageEvent(int type) {
|
ImageEvent(int type) {
|
||||||
this.stripIndex = 0;
|
this.stripIndex = 0;
|
||||||
@@ -892,8 +893,8 @@ public class ExifParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class IfdEvent {
|
private static class IfdEvent {
|
||||||
int ifd;
|
final int ifd;
|
||||||
boolean isRequested;
|
final boolean isRequested;
|
||||||
|
|
||||||
IfdEvent(int ifd, boolean isInterestedIfd) {
|
IfdEvent(int ifd, boolean isInterestedIfd) {
|
||||||
this.ifd = ifd;
|
this.ifd = ifd;
|
||||||
@@ -902,8 +903,8 @@ public class ExifParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class ExifTagEvent {
|
private static class ExifTagEvent {
|
||||||
ExifTag tag;
|
final ExifTag tag;
|
||||||
boolean isRequested;
|
final boolean isRequested;
|
||||||
|
|
||||||
ExifTagEvent(ExifTag tag, boolean isRequireByUser) {
|
ExifTagEvent(ExifTag tag, boolean isRequireByUser) {
|
||||||
this.tag = tag;
|
this.tag = tag;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -67,7 +68,7 @@ public class ExifTag {
|
|||||||
*/
|
*/
|
||||||
public static final short TYPE_RATIONAL = 10;
|
public static final short TYPE_RATIONAL = 10;
|
||||||
|
|
||||||
private static Charset US_ASCII = Charset.forName("US-ASCII");
|
private static final Charset US_ASCII = Charset.forName("US-ASCII");
|
||||||
private static final int TYPE_TO_SIZE_MAP[] = new int[11];
|
private static final int TYPE_TO_SIZE_MAP[] = new int[11];
|
||||||
private static final int UNSIGNED_SHORT_MAX = 65535;
|
private static final int UNSIGNED_SHORT_MAX = 65535;
|
||||||
private static final long UNSIGNED_LONG_MAX = 4294967295L;
|
private static final long UNSIGNED_LONG_MAX = 4294967295L;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,12 +21,12 @@ package com.android.messaging.util.exif;
|
|||||||
* The constants of the IFD ID defined in EXIF spec.
|
* The constants of the IFD ID defined in EXIF spec.
|
||||||
*/
|
*/
|
||||||
public interface IfdId {
|
public interface IfdId {
|
||||||
public static final int TYPE_IFD_0 = 0;
|
int TYPE_IFD_0 = 0;
|
||||||
public static final int TYPE_IFD_1 = 1;
|
int TYPE_IFD_1 = 1;
|
||||||
public static final int TYPE_IFD_EXIF = 2;
|
int TYPE_IFD_EXIF = 2;
|
||||||
public static final int TYPE_IFD_INTEROPERABILITY = 3;
|
int TYPE_IFD_INTEROPERABILITY = 3;
|
||||||
public static final int TYPE_IFD_GPS = 4;
|
int TYPE_IFD_GPS = 4;
|
||||||
/* This is used in ExifData to allocate enough IfdData */
|
/* This is used in ExifData to allocate enough IfdData */
|
||||||
static final int TYPE_IFD_COUNT = 5;
|
int TYPE_IFD_COUNT = 5;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -32,7 +33,7 @@ class JpegHeader {
|
|||||||
public static final short JPG = (short) 0xFFC8;
|
public static final short JPG = (short) 0xFFC8;
|
||||||
public static final short DAC = (short) 0xFFCC;
|
public static final short DAC = (short) 0xFFCC;
|
||||||
|
|
||||||
public static final boolean isSofMarker(short marker) {
|
public static boolean isSofMarker(short marker) {
|
||||||
return marker >= SOF0 && marker <= SOF15 && marker != DHT && marker != JPG
|
return marker >= SOF0 && marker <= SOF15 && marker != DHT && marker != JPG
|
||||||
&& marker != DAC;
|
&& marker != DAC;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -72,7 +73,7 @@ public class WidgetConversationService extends RemoteViewsService {
|
|||||||
*/
|
*/
|
||||||
private static class WidgetConversationFactory extends BaseWidgetFactory {
|
private static class WidgetConversationFactory extends BaseWidgetFactory {
|
||||||
private ImageResource mImageResource;
|
private ImageResource mImageResource;
|
||||||
private String mConversationId;
|
private final String mConversationId;
|
||||||
|
|
||||||
public WidgetConversationFactory(Context context, Intent intent) {
|
public WidgetConversationFactory(Context context, Intent intent) {
|
||||||
super(context, intent);
|
super(context, intent);
|
||||||
|
|||||||
Reference in New Issue
Block a user