Messaging: Remove GServices

We don't have an actual implementation returning anything but the
defaults, so apply the defaults directly anywhere we need them

Change-Id: Ic651b4b13977799f2f4d2c702c430798fbff77f8
This commit is contained in:
Michael W
2024-12-26 14:55:12 +01:00
parent 7f22a3eea7
commit a2f67b4f7b
64 changed files with 91 additions and 3763 deletions
@@ -24,49 +24,29 @@ package com.android.messaging.util;
public final class BugleGservicesKeys {
private BugleGservicesKeys() {} // do not instantiate
/**
* Whether to enable extra debugging features on the client. Default is
* {@value #ENABLE_DEBUGGING_FEATURES_DEFAULT}.
*/
public static final String ENABLE_DEBUGGING_FEATURES
= "bugle_debugging";
public static final boolean ENABLE_DEBUGGING_FEATURES_DEFAULT
= false;
/**
* Whether to enable saving extra logs. Default is {@value #ENABLE_LOG_SAVER_DEFAULT}.
*/
public static final String ENABLE_LOG_SAVER = "bugle_logsaver";
public static final boolean ENABLE_LOG_SAVER_DEFAULT = false;
/**
* Time in milliseconds of initial (attempt 1) resend backoff for failing messages
*/
public static final String INITIAL_MESSAGE_RESEND_DELAY_MS = "bugle_resend_delay_in_millis";
public static final long INITIAL_MESSAGE_RESEND_DELAY_MS_DEFAULT = 5 * 1000L;
/**
* Time in milliseconds of max resend backoff for failing messages
*/
public static final String MAX_MESSAGE_RESEND_DELAY_MS = "bugle_max_resend_delay_in_millis";
public static final long MAX_MESSAGE_RESEND_DELAY_MS_DEFAULT = 2 * 60 * 60 * 1000L;
/**
* Time in milliseconds of resend window for unsent messages
*/
public static final String MESSAGE_RESEND_TIMEOUT_MS = "bugle_resend_timeout_in_millis";
public static final long MESSAGE_RESEND_TIMEOUT_MS_DEFAULT = 20 * 60 * 1000L;
/**
* Time in milliseconds of download window for new mms notifications
*/
public static final String MESSAGE_DOWNLOAD_TIMEOUT_MS = "bugle_download_timeout_in_millis";
public static final long MESSAGE_DOWNLOAD_TIMEOUT_MS_DEFAULT = 20 * 60 * 1000L;
/**
* Time in milliseconds for SMS send timeout
*/
public static final String SMS_SEND_TIMEOUT_IN_MILLIS = "bugle_sms_send_timeout";
public static final long SMS_SEND_TIMEOUT_IN_MILLIS_DEFAULT = 5 * 60 * 1000L;
/**
@@ -87,17 +67,9 @@ public final class BugleGservicesKeys {
* whatever reasons. Keeping this low ensures responsiveness of the application.
* 4. The limit on number of total messages to scan in one batch.
*/
public static final String SMS_SYNC_BATCH_SIZE_MIN =
"bugle_sms_sync_batch_size_min";
public static final int SMS_SYNC_BATCH_SIZE_MIN_DEFAULT = 80;
public static final String SMS_SYNC_BATCH_SIZE_MAX =
"bugle_sms_sync_batch_size_max";
public static final int SMS_SYNC_BATCH_SIZE_MAX_DEFAULT = 1000;
public static final String SMS_SYNC_BATCH_TIME_LIMIT_MILLIS =
"bugle_sms_sync_batch_time_limit";
public static final long SMS_SYNC_BATCH_TIME_LIMIT_MILLIS_DEFAULT = 400;
public static final String SMS_SYNC_BATCH_MAX_MESSAGES_TO_SCAN =
"bugle_sms_sync_batch_max_messages_to_scan";
public static final int SMS_SYNC_BATCH_MAX_MESSAGES_TO_SCAN_DEFAULT =
SMS_SYNC_BATCH_SIZE_MAX_DEFAULT * 4;
@@ -108,18 +80,13 @@ public final class BugleGservicesKeys {
* when bringing in changes made outside the application. It also represents a buffer
* to ensure that sync doesn't trigger based on changes made within the application.
*/
public static final String SMS_SYNC_BACKOFF_TIME_MILLIS =
"bugle_sms_sync_backoff_time";
public static final long SMS_SYNC_BACKOFF_TIME_MILLIS_DEFAULT = 5000L;
/**
* Just in case if we fall into a loop of full sync -> still not synchronized -> full sync ...
* This forces a backoff time so that we at most do full sync once a while (an hour by default)
*/
public static final String SMS_FULL_SYNC_BACKOFF_TIME_MILLIS =
"bugle_sms_full_sync_backoff_time";
public static final long SMS_FULL_SYNC_BACKOFF_TIME_MILLIS_DEFAULT = 60 * 60 * 1000;
/**
* MMS UA profile url.
*
@@ -127,66 +94,30 @@ public final class BugleGservicesKeys {
* latest and greatest phones. However, if we're on KitKat or below we can't get the phone's
* UA profile and thus we need to send them the default url.
*/
public static final String MMS_UA_PROFILE_URL =
"bugle_mms_uaprofurl";
public static final String MMS_UA_PROFILE_URL_DEFAULT =
"http://www.gstatic.com/android/sms/mms_ua_profile.xml";
/**
* MMS apn mmsc
*/
public static final String MMS_MMSC =
"bugle_mms_mmsc";
/**
* MMS apn proxy ip address
*/
public static final String MMS_PROXY_ADDRESS =
"bugle_mms_proxy_address";
/**
* MMS apn proxy port
*/
public static final String MMS_PROXY_PORT =
"bugle_mms_proxy_port";
/**
* List of known SMS system messages that we will ignore (no deliver, no abort) so that the
* user doesn't see them and the appropriate app is able to handle them. We are delivering
* these as a \n delimited list of patterns, however we should eventually move to storing
* them with the per-carrier mms config xml file.
*/
public static final String SMS_IGNORE_MESSAGE_REGEX =
"bugle_sms_ignore_message_regex";
public static final String SMS_IGNORE_MESSAGE_REGEX_DEFAULT = "";
/**
* When receiving or importing an mms, limit the length of text to this limit. Huge blocks
* of text can cause the app to hang/ANR/or crash in native text code..
*/
public static final String MMS_TEXT_LIMIT = "bugle_mms_text_limit";
public static final int MMS_TEXT_LIMIT_DEFAULT = 2000;
/**
* Max number of attachments the user may add to a single message.
*/
public static final String MMS_ATTACHMENT_LIMIT = "bugle_mms_attachment_limit";
public static final int MMS_ATTACHMENT_LIMIT_DEFAULT = 10;
/**
* The max number of messages to show in a single conversation notification. We always show
* the most recent message. If this value is >1, we may also include prior messages as well.
*/
public static final String MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION =
"bugle_max_messages_in_conversation_notification";
public static final int MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_DEFAULT = 7;
/**
* Time (in seconds) between notification ringing for incoming messages of the same
* conversation. We won't ding more often than this value for messages coming in at a high rate.
*/
public static final String NOTIFICATION_TIME_BETWEEN_RINGS_SECONDS
= "bugle_notification_time_between_rings_seconds";
public static final int NOTIFICATION_TIME_BETWEEN_RINGS_SECONDS_DEFAULT = 10;
/**
@@ -195,91 +126,11 @@ public final class BugleGservicesKeys {
* less screen real estate, so we may want to optimize for that case. Note that if a wearable
* is paired, this value will apply to notifications as shown both on the watch and the phone.
*/
public static final String MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_WITH_WEARABLE =
"bugle_max_messages_in_conversation_notification_with_wearable";
public static final int MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_WITH_WEARABLE_DEFAULT = 1;
/**
* Regular expression to match against query. If it matches then display
* the query plan for this query.
*/
public static final String EXPLAIN_QUERY_PLAN_REGEXP = "bugle_query_plan_regexp";
/**
* Whether asserts are fatal on user/userdebug builds.
* Default is {@value #ASSERTS_FATAL_DEFAULT}.
*/
public static final String ASSERTS_FATAL = "bugle_asserts_fatal";
public static final boolean ASSERTS_FATAL_DEFAULT = false;
/**
* Whether to use API for sending/downloading MMS (if present, true for L).
* Default is {@value #USE_MMS_API_IF_PRESENT_DEFAULT}.
*/
public static final String USE_MMS_API_IF_PRESENT = "bugle_use_mms_api";
public static final boolean USE_MMS_API_IF_PRESENT_DEFAULT = true;
/**
* Whether to always auto-complete email addresses for sending MMS. By default, Bugle starts
* to auto-complete after the user has typed the "@" character.
* Default is (@value ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS_DEFAULT}.
*/
public static final String ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS =
"bugle_always_autocomplete_email_address";
public static final boolean ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS_DEFAULT = false;
// We typically request an aspect ratio close the the screen size, but some cameras can be
// flaky and not work well in certain aspect ratios. This allows us to guide the CameraManager
// to pick a more reliable aspect ratio. The value is a float like 1.333f or 1.777f. There is
// no hard coded default because the default is the screen aspect ratio.
public static final String CAMERA_ASPECT_RATIO = "bugle_camera_aspect_ratio";
/**
* The recent time range within which we should check MMS WAP Push duplication
* If the value is 0, it signals that we should use old dedup algorithm for wap push
*/
public static final String MMS_WAP_PUSH_DEDUP_TIME_LIMIT_SECS =
"bugle_mms_wap_push_dedup_time_limit_secs";
public static final long MMS_WAP_PUSH_DEDUP_TIME_LIMIT_SECS_DEFAULT = 7 * 24 * 3600; // 7 days
/**
* Whether to use persistent, on-disk LogSaver
*/
public static final String PERSISTENT_LOGSAVER = "bugle_persistent_logsaver";
public static final boolean PERSISTENT_LOGSAVER_DEFAULT = false;
/**
* For in-memory LogSaver, what's the size of memory buffer in number of records
*/
public static final String IN_MEMORY_LOGSAVER_RECORD_COUNT =
"bugle_in_memory_logsaver_record_count";
public static final int IN_MEMORY_LOGSAVER_RECORD_COUNT_DEFAULT = 500;
/**
* For on-disk LogSaver, what's the size of file rotation set
*/
public static final String PERSISTENT_LOGSAVER_ROTATION_SET_SIZE =
"bugle_persistent_logsaver_rotation_set_size";
public static final int PERSISTENT_LOGSAVER_ROTATION_SET_SIZE_DEFAULT = 8;
/**
* For on-disk LogSaver, what's the byte limit of a single log file
*/
public static final String PERSISTENT_LOGSAVER_FILE_LIMIT_BYTES =
"bugle_persistent_logsaver_file_limit";
public static final int PERSISTENT_LOGSAVER_FILE_LIMIT_BYTES_DEFAULT = 256 * 1024; // 256KB
/**
* We concatenate all text parts in an MMS to form the message text. This specifies
* the separator between the combinated text parts. Default is ' ' (space).
*/
public static final String MMS_TEXT_CONCAT_SEPARATOR = "bugle_mms_text_concat_separator";
public static final String MMS_TEXT_CONCAT_SEPARATOR_DEFAULT = " ";
/**
* Whether to enable transcoding GIFs. We sometimes need to compress GIFs to make them small
* enough to send via MMS (which often limits messages to 1 MB in size).
*/
public static final String ENABLE_GIF_TRANSCODING = "bugle_gif_transcoding";
public static final boolean ENABLE_GIF_TRANSCODING_DEFAULT = true;
}