Bug 1849470 - Update in-tree zlib to version 1.3. r=aosmond
[gecko.git] / mobile / android / app / mobile.js
blobac511acf6a2091242f76b32ff73d10537b082d4c
1 #filter dumbComments emptyLines substitution
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 // Non-static prefs that are specific to Firefox on Android belong in this file
8 // (unless there is a compelling and documented reason for them to belong in
9 // another file).
11 // Please indent all prefs defined within #ifdef/#ifndef conditions. This
12 // improves readability, particular for conditional blocks that exceed a single
13 // screen.
15 pref("toolkit.defaultChromeURI", "chrome://geckoview/content/geckoview.xhtml");
17 pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
19 // Show/Hide scrollbars when active/inactive
20 pref("ui.useOverlayScrollbars", 1);
21 pref("ui.scrollbarFadeBeginDelay", 450);
22 pref("ui.scrollbarFadeDuration", 0);
24 /* image cache prefs */
25 pref("image.cache.size", 1048576); // bytes
27 /* disable some protocol warnings */
28 pref("network.protocol-handler.warn-external.tel", false);
29 pref("network.protocol-handler.warn-external.sms", false);
30 pref("network.protocol-handler.warn-external.mailto", false);
31 pref("network.protocol-handler.warn-external.vnd.youtube", false);
33 /* http prefs */
34 pref("network.http.keep-alive.timeout", 109);
35 pref("network.http.max-persistent-connections-per-proxy", 20);
37 // spdy
38 pref("network.http.http2.push-allowance", 32768);
39 pref("network.http.http2.default-hpack-buffer", 4096); // 4k
41 // See bug 545869 for details on why these are set the way they are
42 pref("network.buffer.cache.size",  16384);
44 // CookieBehavior setting for the private browsing.
45 pref("network.cookie.cookieBehavior.pbmode", 4);
47 /* session history */
48 pref("browser.sessionhistory.max_entries", 50);
49 pref("browser.sessionhistory.contentViewerTimeout", 360);
51 /* session store */
52 pref("browser.sessionstore.resume_from_crash", true);
53 pref("browser.sessionstore.interval", 10000); // milliseconds
54 pref("browser.sessionstore.max_tabs_undo", 10);
55 pref("browser.sessionstore.max_resumed_crashes", 2);
56 pref("browser.sessionstore.privacy_level", 0); // saving data: 0 = all, 1 = unencrypted sites, 2 = never
58 // Download protection lists are not available on Fennec.
59 pref("urlclassifier.downloadAllowTable", "");
60 pref("urlclassifier.downloadBlockTable", "");
62 /* these should help performance */
63 pref("layout.css.report_errors", false);
65 /* download manager (don't show the window or alert) */
66 pref("browser.download.useDownloadDir", true);
67 pref("browser.download.folderList", 1); // Default to ~/Downloads
68 pref("browser.download.manager.addToRecentDocs", true);
70 /* password manager */
71 pref("signon.firefoxRelay.feature", "not available");
73 /* form helper (scroll to and optionally zoom into editable fields)  */
74 pref("formhelper.autozoom", true);
76 /* spellcheck */
77 pref("layout.spellcheckDefault", 0);
79 /* extension manager and xpinstall */
80 pref("xpinstall.whitelist.fileRequest", false);
81 pref("xpinstall.whitelist.add", "https://addons.mozilla.org");
83 pref("extensions.langpacks.signatures.required", true);
84 pref("xpinstall.signatures.required", true);
86 // Whether MV3 restrictions for actions popup urls should be extended to MV2 extensions
87 // (only allowing same extension urls to be used as action popup urls).
88 pref("extensions.manifestV2.actionsPopupURLRestricted", true);
90 // Disable add-ons that are not installed by the user in all scopes by default (See the SCOPE
91 // constants in AddonManager.jsm for values to use here, and Bug 1405528 for a rationale).
92 pref("extensions.autoDisableScopes", 15);
94 pref("extensions.enabledScopes", 5);
95 pref("extensions.update.enabled", true);
96 pref("extensions.update.interval", 86400);
97 pref("extensions.logging.enabled", false);
98 pref("extensions.strictCompatibility", false);
99 pref("extensions.minCompatibleAppVersion", "11.0");
101 pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
102 pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
104 /* preferences for the Get Add-ons pane */
105 pref("extensions.getAddons.cache.enabled", true);
106 pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/android/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
107 pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/android/collections/4757633/mob/?page=1&collection_sort=-popularity");
108 pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
109 pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=android&type=language&appversion=%VERSION%");
111 /* Don't let XPIProvider install distribution add-ons; we do our own thing on mobile. */
112 pref("extensions.installDistroAddons", false);
114 pref("extensions.webextOptionalPermissionPrompts", true);
116 pref("extensions.experiments.enabled", false);
118 /* The abuse report feature needs some UI that we do not have on mobile. */
119 pref("extensions.abuseReport.amWebAPI.enabled", false);
121 /* block popups by default, and notify the user about blocked popups */
122 pref("dom.disable_open_during_load", true);
123 pref("privacy.popups.showBrowserMessage", true);
125 /* disable opening windows with the dialog feature */
126 pref("dom.disable_window_open_dialog_feature", true);
128 pref("keyword.enabled", true);
129 pref("browser.fixup.domainwhitelist.localhost", true);
131 pref("accessibility.typeaheadfind", false);
132 pref("accessibility.typeaheadfind.timeout", 5000);
133 pref("accessibility.typeaheadfind.flashBar", 1);
134 pref("accessibility.typeaheadfind.linksonly", false);
135 pref("accessibility.browsewithcaret_shortcut.enabled", false);
137 // SSL error page behaviour
138 pref("browser.xul.error_pages.expert_bad_cert", false);
140 // disable updating
141 pref("browser.search.update", false);
143 // disable search suggestions by default
144 pref("browser.search.suggest.enabled", false);
146 // Enable sparse localization by setting a few package locale overrides
147 pref("chrome.override_package.global", "browser");
148 pref("chrome.override_package.mozapps", "browser");
149 pref("chrome.override_package.passwordmgr", "browser");
151 // don't allow JS to move and resize existing windows
152 pref("dom.disable_window_move_resize", true);
154 // open in tab preferences
155 pref("browser.link.open_newwindow", 3);
156 // 0=force all new windows to tabs, 1=don't force, 2=only force those with no features set
157 pref("browser.link.open_newwindow.restriction", 0);
159 // content sink control -- controls responsiveness during page load
160 // see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
161 //pref("content.sink.enable_perf_mode",  2); // 0 - switch, 1 - interactive, 2 - perf
162 //pref("content.sink.pending_event_mode", 0);
163 //pref("content.sink.perf_deflect_count", 1000000);
164 //pref("content.sink.perf_parse_time", 50000000);
166 pref("dom.max_script_run_time", 20);
168 // Absolute path to the devtools unix domain socket file used
169 // to communicate with a usb cable via adb forward.
170 pref("devtools.debugger.unix-domain-socket", "@ANDROID_PACKAGE_NAME@/firefox-debugger-socket");
172 // product URLs
173 // The breakpad report server to link to in about:crashes
174 pref("breakpad.reportURL", "https://crash-stats.mozilla.org/report/index/");
176 pref("app.support.baseURL", "https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/");
177 #if MOZ_UPDATE_CHANNEL == beta
178   pref("app.releaseNotesURL", "https://www.mozilla.com/%LOCALE%/mobile/%VERSION%beta/releasenotes/");
179 #else
180   pref("app.releaseNotesURL", "https://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
181 #endif
183 // Enable pinning
184 pref("security.cert_pinning.enforcement_level", 1);
186 /* prefs used by the update timer system (including blocklist pings) */
187 pref("app.update.timerFirstInterval", 30000); // milliseconds
188 pref("app.update.timerMinimumDelay", 30); // seconds
190 #ifdef MOZ_UPDATER
191   /* prefs used specifically for updating the app */
192   pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
193 #endif
195 // APZ physics settings (fling acceleration, fling curving and axis lock) have
196 // been reviewed by UX
197 pref("apz.axis_lock.breakout_angle", "0.7853982");    // PI / 4 (45 degrees)
198 pref("apz.axis_lock.mode", 1); // Use "strict" axis locking
199 pref("apz.content_response_timeout", 600);
200 pref("apz.drag.enabled", false);
201 pref("apz.fling_curve_function_x1", "0.59");
202 pref("apz.fling_curve_function_y1", "0.46");
203 pref("apz.fling_curve_function_x2", "0.05");
204 pref("apz.fling_curve_function_y2", "1.00");
205 pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
206 // apz.fling_friction and apz.fling_stopped_threshold are currently ignored by Fennec.
207 pref("apz.fling_friction", "0.004");
208 pref("apz.fling_stopped_threshold", "0.0");
209 pref("apz.max_velocity_inches_per_ms", "0.07");
210 pref("apz.overscroll.enabled", true);
211 pref("apz.second_tap_tolerance", "0.3");
212 pref("apz.touch_move_tolerance", "0.03");
213 pref("apz.touch_start_tolerance", "0.06");
215 // prevent tooltips from showing up
216 pref("browser.chrome.toolbar_tips", false);
218 // don't allow meta-refresh when backgrounded
219 pref("browser.meta_refresh_when_inactive.disabled", true);
221 // On mobile we throttle the download once the readahead_limit is hit
222 // if we're using a cellular connection, even if the download is slow.
223 // This is to preserve battery and data.
224 pref("media.throttle-cellular-regardless-of-download-rate", true);
226 // Number of video frames we buffer while decoding video.
227 // On Android this is decided by a similar value which varies for
228 // each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
229 // number must be less than the OMX equivalent or gecko will think it is
230 // chronically starved of video frames. All decoders seen so far have a value
231 // of at least 4.
232 pref("media.video-queue.default-size", 3);
233 // The maximum number of queued frames to send to the compositor.
234 // On Android, it needs to be throttled because SurfaceTexture contains only one
235 // (the most recent) image data.
236 pref("media.video-queue.send-to-compositor-size", 1);
238 pref("media.mediadrm-widevinecdm.visible", true);
240 // Enable WebSpeech speech synthesis
241 pref("media.webspeech.synth.enabled", true);
243 // OpenH264 is visible in about:plugins, and enabled, by default.
244 pref("media.gmp-gmpopenh264.visible", true);
245 pref("media.gmp-gmpopenh264.enabled", true);
247 // Disable future downloads of OpenH264 on Android
248 pref("media.gmp-gmpopenh264.autoupdate", false);
250 // The download protection UI is not implemented yet (bug 1239094).
251 pref("browser.safebrowsing.downloads.enabled", false);
253 // The application reputation lists are not available on Android.
254 pref("urlclassifier.downloadAllowTable", "");
255 pref("urlclassifier.downloadBlockTable", "");
257 // The Potentially Harmful Apps list replaces the malware one on Android.
258 pref("urlclassifier.malwareTable", "goog-harmful-proto,goog-unwanted-proto,moztest-harmful-simple,moztest-malware-simple,moztest-unwanted-simple");
260 // True if you always want dump() to work
262 // On Android, you also need to do the following for the output
263 // to show up in logcat:
265 // $ adb shell stop
266 // $ adb shell setprop log.redirect-stdio true
267 // $ adb shell start
268 pref("browser.dom.window.dump.enabled", true);
269 pref("devtools.console.stdout.chrome", true);
271 // Transmit UDP busy-work to the LAN when anticipating low latency
272 // network reads and on wifi to mitigate 802.11 Power Save Polling delays
273 pref("network.tickle-wifi.enabled", true);
275 // The mode of home provider syncing.
276 // 0: Sync always
277 // 1: Sync only when on wifi
278 pref("home.sync.updateMode", 0);
280 // How frequently to check if we should sync home provider data.
281 pref("home.sync.checkIntervalSecs", 3600);
283 // Enable meta-viewport support for font inflation code
284 pref("dom.meta-viewport.enabled", true);
286 // Enable GMP support in the addon manager.
287 pref("media.gmp-provider.enabled", true);
289 // The default color scheme in reader mode (light, dark, auto)
290 // auto = color automatically adjusts according to ambient light level
291 // (auto only works on platforms where the 'devicelight' event is enabled)
292 // auto doesn't work: https://bugzilla.mozilla.org/show_bug.cgi?id=1472957
293 // pref("reader.color_scheme", "auto");
294 pref("reader.color_scheme", "light");
296 // Color scheme values available in reader mode UI.
297 // pref("reader.color_scheme.values", "[\"dark\",\"auto\",\"light\"]");
298 pref("reader.color_scheme.values", "[\"dark\",\"sepia\",\"light\"]");
300 // Whether to use a vertical or horizontal toolbar.
301 pref("reader.toolbar.vertical", false);
303 // Telemetry settings.
304 // Whether to use the unified telemetry behavior, requires a restart.
305 pref("toolkit.telemetry.unified", false);
307 // AccessibleCaret CSS for the Android L style assets.
308 pref("layout.accessiblecaret.width", "22.0");
309 pref("layout.accessiblecaret.height", "22.0");
310 pref("layout.accessiblecaret.margin-left", "-11.5");
312 // Android needs to show the caret when long tapping on an empty content.
313 pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", true);
315 // Androids carets are always tilt to match the text selection guideline.
316 pref("layout.accessiblecaret.always_tilt", true);
318 // Update any visible carets for selection changes due to JS calls,
319 // but don't show carets if carets are hidden.
320 pref("layout.accessiblecaret.script_change_update_mode", 1);
322 // Optionally provide haptic feedback on longPress selection events.
323 pref("layout.accessiblecaret.hapticfeedback", true);
325 // Initial text selection on long-press is enhanced to provide
326 // a smarter phone-number selection for direct-dial ActionBar action.
327 pref("layout.accessiblecaret.extend_selection_for_phone_number", true);
329 // Allow service workers to open windows for a longer period after a notification
330 // click on mobile.  This is to account for some devices being quite slow.
331 pref("dom.serviceWorkers.disable_open_click_delay", 5000);
333 pref("dom.push.maxRecentMessageIDsPerSubscription", 0);
335 // Ask for permission when enumerating WebRTC devices.
336 pref("media.navigator.permission.device", true);
338 // Allow system add-on updates
339 pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
340 pref("extensions.systemAddon.update.enabled", true);