1d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd/*
2d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Copyright (C) 2015 The Android Open Source Project
3d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd *
4d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Licensed under the Apache License, Version 2.0 (the "License");
5d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * you may not use this file except in compliance with the License.
6d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * You may obtain a copy of the License at
7d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd *
8d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd *      http://www.apache.org/licenses/LICENSE-2.0
9d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd *
10d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Unless required by applicable law or agreed to in writing, software
11d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * distributed under the License is distributed on an "AS IS" BASIS,
12d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * See the License for the specific language governing permissions and
14d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * limitations under the License.
15d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */
16d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
17d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddpackage com.android.messaging.util;
18d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
19d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
20d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd/**
21d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * List of gservices keys and default values which are in use.
22d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */
23d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddpublic final class BugleGservicesKeys {
24d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    private BugleGservicesKeys() {}   // do not instantiate
25d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
26d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
27d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to enable extra debugging features on the client. Default is
28d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * {@value #ENABLE_DEBUGGING_FEATURES_DEFAULT}.
29d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
30d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String ENABLE_DEBUGGING_FEATURES
31d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            = "bugle_debugging";
32d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean ENABLE_DEBUGGING_FEATURES_DEFAULT
33d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            = false;
34d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
35d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
36d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to enable saving extra logs. Default is {@value #ENABLE_LOG_SAVER_DEFAULT}.
37d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
38d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String ENABLE_LOG_SAVER = "bugle_logsaver";
39d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean ENABLE_LOG_SAVER_DEFAULT = false;
40d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
41d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
42d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in milliseconds of initial (attempt 1) resend backoff for failing messages
43d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
44d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String INITIAL_MESSAGE_RESEND_DELAY_MS = "bugle_resend_delay_in_millis";
45d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long INITIAL_MESSAGE_RESEND_DELAY_MS_DEFAULT = 5 * 1000L;
46d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
47d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
48d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in milliseconds of max resend backoff for failing messages
49d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
50d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MAX_MESSAGE_RESEND_DELAY_MS = "bugle_max_resend_delay_in_millis";
51d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long MAX_MESSAGE_RESEND_DELAY_MS_DEFAULT = 2 * 60 * 60 * 1000L;
52d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
53d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
54d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in milliseconds of resend window for unsent messages
55d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
56d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MESSAGE_RESEND_TIMEOUT_MS = "bugle_resend_timeout_in_millis";
57d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long MESSAGE_RESEND_TIMEOUT_MS_DEFAULT = 20 * 60 * 1000L;
58d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
59d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
60d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in milliseconds of download window for new mms notifications
61d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
62d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MESSAGE_DOWNLOAD_TIMEOUT_MS = "bugle_download_timeout_in_millis";
63d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long MESSAGE_DOWNLOAD_TIMEOUT_MS_DEFAULT = 20 * 60 * 1000L;
64d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
65d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
66d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in milliseconds for SMS send timeout
67d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
68d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SEND_TIMEOUT_IN_MILLIS = "bugle_sms_send_timeout";
69d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long SMS_SEND_TIMEOUT_IN_MILLIS_DEFAULT = 5 * 60 * 1000L;
70d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
71d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
72d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Keys to control the SMS sync batch size. The batch size is defined by the number
73d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * of messages that incur local database change, e.g. importing messages and
74d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * deleting messages.
75d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *
76d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * 1. The minimum size for a batch and
77d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * 2. The maximum size for a batch.
78d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * The first batch uses the minimum size for probing. Set this to a small number for the
79d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * first sync batch to make sure the user sees SMS showing up in conversations quickly
80d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Use these two settings to limit the number of messages to sync in each batch.
81d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * The minimum is to make sure we always make progress during sync. The maximum is
82d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * to limit the sync batch size within a reasonable range (needs to fit in an intent).
83d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * 3. The time limit controls the limit of time duration of a sync batch. We can
84d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * not control this directly due to the batching nature of sync. So this provides
85d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * heuristics. We may sometime exceeds the limit if our calculation is off due to
86d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * whatever reasons. Keeping this low ensures responsiveness of the application.
87d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * 4. The limit on number of total messages to scan in one batch.
88d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
89d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SYNC_BATCH_SIZE_MIN =
90d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_sync_batch_size_min";
91d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int SMS_SYNC_BATCH_SIZE_MIN_DEFAULT = 80;
92d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SYNC_BATCH_SIZE_MAX =
93d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_sync_batch_size_max";
94d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int SMS_SYNC_BATCH_SIZE_MAX_DEFAULT = 1000;
95d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SYNC_BATCH_TIME_LIMIT_MILLIS =
96d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_sync_batch_time_limit";
97d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long SMS_SYNC_BATCH_TIME_LIMIT_MILLIS_DEFAULT = 400;
98d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SYNC_BATCH_MAX_MESSAGES_TO_SCAN =
99d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_sync_batch_max_messages_to_scan";
100d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int SMS_SYNC_BATCH_MAX_MESSAGES_TO_SCAN_DEFAULT =
101d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            SMS_SYNC_BATCH_SIZE_MAX_DEFAULT * 4;
102d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
103d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
104d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time in ms for sync to backoff from "now" to the latest message that will be sync'd.
105d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *
106d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * This controls the best case for how out of date the application will appear to be
107d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * when bringing in changes made outside the application. It also represents a buffer
108d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * to ensure that sync doesn't trigger based on changes made within the application.
109d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
110d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_SYNC_BACKOFF_TIME_MILLIS =
111d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_sync_backoff_time";
112d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long SMS_SYNC_BACKOFF_TIME_MILLIS_DEFAULT = 5000L;
113d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
114d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
115d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Just in case if we fall into a loop of full sync -> still not synchronized -> full sync ...
116d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * This forces a backoff time so that we at most do full sync once a while (an hour by default)
117d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
118d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_FULL_SYNC_BACKOFF_TIME_MILLIS =
119d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_full_sync_backoff_time";
120d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long SMS_FULL_SYNC_BACKOFF_TIME_MILLIS_DEFAULT = 60 * 60 * 1000;
121d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
122d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
123d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time duration to retain the most recent SMS messages for SMS storage purging
124d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *
125d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Format:
126d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *   <number>(w|m|y)
127d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Examples:
128d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *   "1y" -- a year
129d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *   "2w" -- two weeks
130d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *   "6m" -- six months
131d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
132d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_STORAGE_PURGING_MESSAGE_RETAINING_DURATION =
133d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_storage_purging_message_retaining_duration";
134d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_STORAGE_PURGING_MESSAGE_RETAINING_DURATION_DEFAULT = "1m";
135d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
136d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
137d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * MMS UA profile url.
138d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     *
139d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * This is used on all Android devices running Hangout, so cannot just host the profile of the
140d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * latest and greatest phones. However, if we're on KitKat or below we can't get the phone's
141d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * UA profile and thus we need to send them the default url.
142d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
143d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_UA_PROFILE_URL =
144d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_mms_uaprofurl";
145d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_UA_PROFILE_URL_DEFAULT =
146d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "http://www.gstatic.com/android/sms/mms_ua_profile.xml";
147d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
148d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
149d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * MMS apn mmsc
150d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
151d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_MMSC =
152d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_mms_mmsc";
153d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
154d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
155d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * MMS apn proxy ip address
156d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
157d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_PROXY_ADDRESS =
158d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_mms_proxy_address";
159d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
160d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
161d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * MMS apn proxy port
162d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
163d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_PROXY_PORT =
164d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_mms_proxy_port";
165d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
166d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
167d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * List of known SMS system messages that we will ignore (no deliver, no abort) so that the
168d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * user doesn't see them and the appropriate app is able to handle them. We are delivering
169d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * these as a \n delimited list of patterns, however we should eventually move to storing
170d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * them with the per-carrier mms config xml file.
171d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
172d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_IGNORE_MESSAGE_REGEX =
173d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_sms_ignore_message_regex";
174d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String SMS_IGNORE_MESSAGE_REGEX_DEFAULT = "";
175d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
176d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
177d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * When receiving or importing an mms, limit the length of text to this limit. Huge blocks
178d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * of text can cause the app to hang/ANR/or crash in native text code..
179d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
180d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_TEXT_LIMIT = "bugle_mms_text_limit";
181d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int MMS_TEXT_LIMIT_DEFAULT = 2000;
182d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
183d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
184d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Max number of attachments the user may add to a single message.
185d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
186d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_ATTACHMENT_LIMIT = "bugle_mms_attachment_limit";
187d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int MMS_ATTACHMENT_LIMIT_DEFAULT = 10;
188d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
189d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
190d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * The max number of messages to show in a single conversation notification. We always show
191d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * the most recent message. If this value is >1, we may also include prior messages as well.
192d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
193d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION =
194d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_max_messages_in_conversation_notification";
195d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_DEFAULT = 7;
196d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
197d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
198d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Time (in seconds) between notification ringing for incoming messages of the same
199d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * conversation. We won't ding more often than this value for messages coming in at a high rate.
200d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
201d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String NOTIFICATION_TIME_BETWEEN_RINGS_SECONDS
202d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            = "bugle_notification_time_between_rings_seconds";
203d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int NOTIFICATION_TIME_BETWEEN_RINGS_SECONDS_DEFAULT = 10;
204d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
205d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
206d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * The max number of messages to show in a single conversation notification, when a wearable
207d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * device (i.e. smartwatch) is paired with the phone. Watches have a different UX model and
208d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * less screen real estate, so we may want to optimize for that case. Note that if a wearable
209d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * is paired, this value will apply to notifications as shown both on the watch and the phone.
210d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
211d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_WITH_WEARABLE =
212d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_max_messages_in_conversation_notification_with_wearable";
213d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int MAX_MESSAGES_IN_CONVERSATION_NOTIFICATION_WITH_WEARABLE_DEFAULT = 1;
214d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
215d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
216d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Regular expression to match against query.  If it matches then display
217d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * the query plan for this query.
218d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
219d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String EXPLAIN_QUERY_PLAN_REGEXP = "bugle_query_plan_regexp";
220d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
221d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
222d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether asserts are fatal on user/userdebug builds.
223d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Default is {@value #ASSERTS_FATAL_DEFAULT}.
224d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
225d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String ASSERTS_FATAL = "bugle_asserts_fatal";
226d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean ASSERTS_FATAL_DEFAULT = false;
227d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
228d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
229d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to use API for sending/downloading MMS (if present, true for L).
230d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Default is {@value #USE_MMS_API_IF_PRESENT_DEFAULT}.
231d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
232d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String USE_MMS_API_IF_PRESENT = "bugle_use_mms_api";
233d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean USE_MMS_API_IF_PRESENT_DEFAULT = true;
234d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
235d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
236d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to always auto-complete email addresses for sending MMS. By default, Bugle starts
237d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * to auto-complete after the user has typed the "@" character.
238d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Default is (@value ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS_DEFAULT}.
239d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
240d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS =
241d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_always_autocomplete_email_address";
242d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean ALWAYS_AUTOCOMPLETE_EMAIL_ADDRESS_DEFAULT = false;
243d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
244d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    // We typically request an aspect ratio close the the screen size, but some cameras can be
245d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    // flaky and not work well in certain aspect ratios.  This allows us to guide the CameraManager
246d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    // to pick a more reliable aspect ratio.  The value is a float like 1.333f or 1.777f.  There is
247d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    // no hard coded default because the default is the screen aspect ratio.
248d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String CAMERA_ASPECT_RATIO = "bugle_camera_aspect_ratio";
249d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
250d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
251d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * The recent time range within which we should check MMS WAP Push duplication
252d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * If the value is 0, it signals that we should use old dedup algorithm for wap push
253d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
254d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_WAP_PUSH_DEDUP_TIME_LIMIT_SECS =
255d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_mms_wap_push_dedup_time_limit_secs";
256d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final long MMS_WAP_PUSH_DEDUP_TIME_LIMIT_SECS_DEFAULT = 7 * 24 * 3600; // 7 days
257d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
258d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
259d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to use persistent, on-disk LogSaver
260d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
261d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String PERSISTENT_LOGSAVER = "bugle_persistent_logsaver";
262d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean PERSISTENT_LOGSAVER_DEFAULT = false;
263d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
264d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
265d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * For in-memory LogSaver, what's the size of memory buffer in number of records
266d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
267d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String IN_MEMORY_LOGSAVER_RECORD_COUNT =
268d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_in_memory_logsaver_record_count";
269d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int IN_MEMORY_LOGSAVER_RECORD_COUNT_DEFAULT = 500;
270d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
271d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
272d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * For on-disk LogSaver, what's the size of file rotation set
273d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
274d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String PERSISTENT_LOGSAVER_ROTATION_SET_SIZE =
275d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_persistent_logsaver_rotation_set_size";
276d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int PERSISTENT_LOGSAVER_ROTATION_SET_SIZE_DEFAULT = 8;
277d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
278d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
279d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * For on-disk LogSaver, what's the byte limit of a single log file
280d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
281d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String PERSISTENT_LOGSAVER_FILE_LIMIT_BYTES =
282d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd            "bugle_persistent_logsaver_file_limit";
283d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final int PERSISTENT_LOGSAVER_FILE_LIMIT_BYTES_DEFAULT = 256 * 1024; // 256KB
284d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
285d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
286d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * We concatenate all text parts in an MMS to form the message text. This specifies
287d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * the separator between the combinated text parts. Default is ' ' (space).
288d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
289d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_TEXT_CONCAT_SEPARATOR = "bugle_mms_text_concat_separator";
290d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String MMS_TEXT_CONCAT_SEPARATOR_DEFAULT = " ";
291d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd
292d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    /**
293d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * Whether to enable transcoding GIFs. We sometimes need to compress GIFs to make them small
294d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     * enough to send via MMS (which often limits messages to 1 MB in size).
295d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd     */
296d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final String ENABLE_GIF_TRANSCODING = "bugle_gif_transcoding";
297d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd    public static final boolean ENABLE_GIF_TRANSCODING_DEFAULT = true;
298d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd}
299