no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / mobile / android / app / geckoview-prefs.js
blobd71f7f49e85a9345676bb80131c1031a9f8a4042
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 GeckoView belong in this file.
8 //
9 // Please indent all prefs defined within #ifdef/#ifndef conditions. This
10 // improves readability, particular for conditional blocks that exceed a single
11 // screen.
13 // Caret browsing is disabled on mobile (bug 476009)
14 pref("accessibility.browsewithcaret_shortcut.enabled", false);
16 pref("accessibility.typeaheadfind", false);
17 pref("accessibility.typeaheadfind.flashBar", 1);
18 pref("accessibility.typeaheadfind.linksonly", false);
19 pref("accessibility.typeaheadfind.timeout", 5000);
21 pref("app.support.baseURL", "https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/");
23 #ifdef MOZ_UPDATER
24   pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
25 #endif
27 // Prefs used by UpdateTimerManager (including blocklist pings) (bug 783909)
28 pref("app.update.timerFirstInterval", 30000); // milliseconds
29 pref("app.update.timerMinimumDelay", 30); // seconds
31 // Use a breakout angle of 45° (bug 1226655)
32 pref("apz.axis_lock.breakout_angle", "0.7853982");
34 // APZ content response timeout (bug 1247280)
35 pref("apz.content_response_timeout", 600);
37 // Disable scrollbar dragging on Android (bug 1339831)
38 pref("apz.drag.enabled", false);
40 // Tweak fling curving to make medium-length flings go a bit faster (bug 1243854)
41 pref("apz.fling_curve_function_x1", "0.59");
42 pref("apz.fling_curve_function_x2", "0.05");
43 pref("apz.fling_curve_function_y1", "0.46");
44 pref("apz.fling_curve_function_y2", "1.00");
46 // :gordonb from UX said this value makes fling curving
47 // feel a lot better (bug 1095727)
48 pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
50 // Adjust fling physics based on UX feedback (bug 1229839)
51 pref("apz.fling_friction", "0.004");
53 // Use Android OverScroller class for fling animation (bug 1229462)
54 pref("apz.fling_stopped_threshold", "0.0");
56 // :gordonb from UX said this value makes fling curving
57 // feel a lot better (bug 1095727)
58 pref("apz.max_velocity_inches_per_ms", "0.07");
60 // Enable overscroll on Android (bug 1230674)
61 pref("apz.overscroll.enabled", true);
63 // Don't allow a faraway second tap to start a one-touch pinch gesture (bug 1391770)
64 pref("apz.second_tap_tolerance", "0.3");
66 // This value originates from bug 1174532
67 pref("apz.touch_move_tolerance", "0.03");
69 // Lower the touch-start tolerance threshold to reduce scroll lag with APZ (bug 1230077)
70 pref("apz.touch_start_tolerance", "0.06");
72 // The breakpad report server to link to in about:crashes
73 pref("breakpad.reportURL", "https://crash-stats.mozilla.org/report/index/");
75 // Prevent tooltips from showing up (bug 623063)
76 pref("browser.chrome.toolbar_tips", false);
78 // True if you always want dump() to work
80 // On Android, you also need to do the following for the output
81 // to show up in logcat:
83 // $ adb shell stop
84 // $ adb shell setprop log.redirect-stdio true
85 // $ adb shell start
86 pref("browser.dom.window.dump.enabled", true);
88 // Default to ~/Downloads (bug 437954)
89 pref("browser.download.folderList", 1);
91 // Use Android DownloadManager for scanning downloads (bug 816318)
92 pref("browser.download.manager.addToRecentDocs", true);
94 // Load PDF files inline with PDF.js (bug 1754499)
95 pref("browser.download.open_pdf_attachments_inline", true);
97 pref("browser.download.useDownloadDir", true);
99 // When enabled, Services.uriFixup.isDomainKnown('localhost') will return true
100 pref("browser.fixup.domainwhitelist.localhost", true);
102 // Open in tab preferences
103 pref("browser.link.open_newwindow", 3);
105 // Supported values:
106 //  - 0: Force all new windows to tabs
107 //  - 1: Don't force
108 //  - 2: Only force those with no features set
109 pref("browser.link.open_newwindow.restriction", 0);
111 // Don't allow meta-refresh when backgrounded (bug 518805)
112 pref("browser.meta_refresh_when_inactive.disabled", true);
114 // The download protection UI is not implemented yet (bug 1239094).
115 pref("browser.safebrowsing.downloads.enabled", false);
117 pref("browser.safebrowsing.features.cryptomining.update", true);
118 pref("browser.safebrowsing.features.fingerprinting.update", true);
119 pref("browser.safebrowsing.features.malware.update", true);
120 pref("browser.safebrowsing.features.phishing.update", true);
121 pref("browser.safebrowsing.features.trackingAnnotation.update", true);
122 pref("browser.safebrowsing.features.trackingProtection.update", true);
124 // Disable search suggestions by default (bug 784104)
125 pref("browser.search.suggest.enabled", false);
127 // Disable search engine updating (bug 431842)
128 pref("browser.search.update", false);
130 // Session history
131 pref("browser.sessionhistory.contentViewerTimeout", 360);
132 pref("browser.sessionhistory.max_entries", 50);
134 // Session store
135 pref("browser.sessionstore.interval", 10000); // milliseconds
136 pref("browser.sessionstore.max_resumed_crashes", 2);
137 pref("browser.sessionstore.max_tabs_undo", 10);
138 // Supported values:
139 //  - 0: all
140 //  - 1: unencrypted sites
141 //  - 2: never
142 pref("browser.sessionstore.privacy_level", 0);
143 pref("browser.sessionstore.resume_from_crash", true);
145 // Bug 1809922 to enable translations
146 #ifdef NIGHTLY_BUILD
147   pref("browser.translations.enable", true);
148   // Used for mocking data for GeckoView Translations tests, should use in addition with an automation check.
149   pref("browser.translations.geckoview.enableAllTestMocks", false);
150 #endif
152 // SSL error page behaviour (bug 437372)
153 pref("browser.xul.error_pages.expert_bad_cert", false);
155 // Enable sparse localization by setting a few package locale overrides (bug 792077)
156 pref("chrome.override_package.global", "browser");
157 pref("chrome.override_package.mozapps", "browser");
158 pref("chrome.override_package.passwordmgr", "browser");
160 // Allow Console API to log messages on stdout (bug 1480544)
161 pref("devtools.console.stdout.chrome", true);
163 // Absolute path to the devtools unix domain socket file used
164 // to communicate with a usb cable via adb forward.
165 pref("devtools.debugger.unix-domain-socket", "@ANDROID_PACKAGE_NAME@/firefox-debugger-socket");
167 // Enable capture attribute for file input (bug 1553603)
168 pref("dom.capture.enabled", true);
170 // Block popups by default (bug 436057)
171 pref("dom.disable_open_during_load", true);
173 // Don't allow JS to move and resize existing windows (bug 456081)
174 pref("dom.disable_window_move_resize", true);
176 // "graceful" process termination is misinterpreted as a process crash.
177 // To avoid this issue, we set dom.ipc.keepProcessesAlive.extension to 1.
178 // This stops Gecko from terminating the extension process. This also reduces
179 // the overhead of resuming a suspended (background) extension page.
180 // Note that this only covers "graceful" termination by Gecko.
181 // Android-triggered force-kills and OOM are not prevented and should still
182 // be accounted for. See bug 1847608 for more info
183 pref("dom.ipc.keepProcessesAlive.extension", 1);
185 // Keep empty content process alive on Android (bug 1447393)
186 pref("dom.ipc.keepProcessesAlive.web", 1);
188 // This value is derived from the calculation:
189 // MOZ_ANDROID_CONTENT_SERVICE_COUNT - dom.ipc.processCount
190 // (dom.ipc.processCount is set in GeckoRuntimeSettings.java) (bug 1619655)
191 pref("dom.ipc.processCount.webCOOP+COEP", 38);
193 // Disable the preallocated process on Android
194 pref("dom.ipc.processPrelaunch.enabled", false);
196 // Increase script timeouts (bug 485610)
197 pref("dom.max_script_run_time", 20);
199 // Enable meta-viewport support for font inflation code (bug 1106255)
200 pref("dom.meta-viewport.enabled", true);
202 // The maximum number of recent message IDs to store for each push
203 // subscription, to avoid duplicates for unacknowledged messages (bug 1207743)
204 pref("dom.push.maxRecentMessageIDsPerSubscription", 0);
206 // Allow service workers to open windows for a longer period after a notification
207 // click on mobile. This is to account for some devices being quite slow (bug 1409761)
208 pref("dom.serviceWorkers.disable_open_click_delay", 5000);
210 // Enable WebShare support (bug 1402369)
211 pref("dom.webshare.enabled", true);
213 // The abuse report feature needs some UI that we do not have on mobile
214 pref("extensions.abuseReport.amWebAPI.enabled", false);
216 // Disable add-ons that are not installed by the user in all scopes by default (See the SCOPE
217 // constants in AddonManager.jsm for values to use here, and Bug 1405528 for a rationale)
218 pref("extensions.autoDisableScopes", 15);
220 pref("extensions.enabledScopes", 5);
222 // If true, unprivileged extensions may use experimental APIs
223 pref("extensions.experiments.enabled", false);
225 // Support credit cards in GV autocomplete API (bug 1691819)
226 pref("extensions.formautofill.addresses.capture.enabled", true);
228 pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/android/collections/4757633/mob/?page=1&collection_sort=-popularity");
229 pref("extensions.getAddons.cache.enabled", true);
230 pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
231 pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=android&type=language&appversion=%VERSION%");
232 pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/android/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
234 // Don't let XPIProvider install distribution add-ons; we do our own thing on mobile
235 pref("extensions.installDistroAddons", false);
237 // Require language packs to be signed (bug 1454141)
238 pref("extensions.langpacks.signatures.required", true);
240 // Enables some extra Extension System Logging (can reduce performance)
241 pref("extensions.logging.enabled", false);
243 // Whether MV3 restrictions for actions popup urls should be extended to MV2 extensions
244 // (only allowing same extension urls to be used as action popup urls)
245 pref("extensions.manifestV2.actionsPopupURLRestricted", true);
247 // Disables strict compatibility, making addons compatible-by-default
248 pref("extensions.strictCompatibility", false);
250 // Allow system add-on updates (bug 1260213)
251 pref("extensions.systemAddon.update.enabled", true);
252 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");
254 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%");
255 pref("extensions.update.enabled", true);
256 pref("extensions.update.interval", 86400);
257 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%");
259 // Enable prompts for browser.permissions.request() (bug 1392176)
260 pref("extensions.webextOptionalPermissionPrompts", true);
262 // Start (proxy) extensions as soon as a network request is observed, instead
263 // of waiting until the first browser window has opened. This is needed because
264 // GeckoView can trigger requests without opening geckoview.xhtml.
265 pref("extensions.webextensions.early_background_wakeup_on_request", true);
267 // Scroll and zoom into editable form fields (bug 834613)
268 pref("formhelper.autozoom", true);
270 // Optionally send web console output to logcat (bug 1415318)
271 pref("geckoview.console.enabled", false);
273 #ifdef NIGHTLY_BUILD
274   // Used for mocking data for GeckoView shopping tests, should use in addition with an automation check.
275   pref("geckoview.shopping.mock_test_response", false);
276 #endif
278 pref("image.cache.size", 1048576); // bytes
280 // Inherit locale from the OS, used for multi-locale builds
281 pref("intl.locale.requested", "");
283 pref("keyword.enabled", true);
285 // Always tilt the caret to match the text selection guideline (bug 1097398)
286 pref("layout.accessiblecaret.always_tilt", true);
288 // Show the caret when long tapping on empty content (bug 1246064)
289 pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", true);
291 // Initial text selection on long-press is enhanced to provide
292 // a smarter phone-number selection for direct-dial ActionBar action (bug 1235508)
293 pref("layout.accessiblecaret.extend_selection_for_phone_number", true);
295 // Provide haptic feedback on longPress selection events (bug 1230613)
296 pref("layout.accessiblecaret.hapticfeedback", true);
298 // AccessibleCaret css for Android L style assets (bug 1097398)
299 pref("layout.accessiblecaret.height", "22.0");
300 pref("layout.accessiblecaret.margin-left", "-11.5");
301 pref("layout.accessiblecaret.width", "22.0");
303 // Update any visible carets for selection changes due to JS calls,
304 // but don't show carets if carets are hidden (bug 1463576)
305 pref("layout.accessiblecaret.script_change_update_mode", 1);
307 // Disable CSS error reporting by default to improve performance (bug 831123)
308 pref("layout.css.report_errors", false);
310 pref("layout.spellcheckDefault", 0);
312 // Enable EME permission prompts (bug 1620102)
313 pref("media.eme.require-app-approval", true);
315 // Enable autoplay permission prompts (bug 1577596)
316 pref("media.geckoview.autoplay.request", true);
318 // Disable future downloads of OpenH264 on Android (bug 1548679)
319 pref("media.gmp-gmpopenh264.autoupdate", false);
321 // Keep OpenH264 if already installed before. (bug 1532578)
322 pref("media.gmp-gmpopenh264.enabled", true);
323 pref("media.gmp-gmpopenh264.visible", true);
325 // Enable GMP support in the addon manager (bug 1089867)
326 pref("media.gmp-provider.enabled", true);
328 // Enable Widevine MediaKeySystem (bug 1306219)
329 pref("media.mediadrm-widevinecdm.visible", true);
331 // Ask for permission when enumerating WebRTC devices (bug 1369108)
332 pref("media.navigator.permission.device", true);
334 // On mobile we throttle the download once the readahead_limit is hit
335 // if we're using a cellular connection, even if the download is slow,
336 // this is to preserve battery and data (bug 1540573)
337 pref("media.throttle-cellular-regardless-of-download-rate", true);
339 // Number of video frames we buffer while decoding video.
340 // On Android this is decided by a similar value which varies for
341 // each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
342 // number must be less than the OMX equivalent or gecko will think it is
343 // chronically starved of video frames. All decoders seen so far have a value
344 // of at least 4. (bug 973408)
345 pref("media.video-queue.default-size", 3);
347 // The maximum number of queued frames to send to the compositor.
348 // On Android, it needs to be throttled because SurfaceTexture contains only one
349 // (the most recent) image data. (bug 1299068)
350 pref("media.video-queue.send-to-compositor-size", 1);
352 // Increase necko buffer sizes for Android (bug 560591)
353 pref("network.buffer.cache.size",  16384);
355 // CookieBehavior setting for private browsing (bug 1695050)
356 pref("network.cookie.cookieBehavior.pbmode", 4);
358 // Set HPACK receive buffer size appropriately for Android (bug 1296280)
359 pref("network.http.http2.default-hpack-buffer", 4096);
361 // HTTP/2 Server Push (bug 790388)
362 pref("network.http.http2.push-allowance", 32768);
364 // Reduce HTTP Idle connection timeout on Android to improve battery life (bug 1007959)
365 pref("network.http.keep-alive.timeout", 109);
367 // Update connection limits; especially for proxies (bug 648603)
368 pref("network.http.max-persistent-connections-per-proxy", 20);
370 // Disable warning for mailto and tel protocols (bug 589403)
371 pref("network.protocol-handler.warn-external.mailto", false);
372 pref("network.protocol-handler.warn-external.tel", false);
374 // Disable warning for sms protocol (bug 819554)
375 pref("network.protocol-handler.warn-external.sms", false);
377 // Do not warn when opening YouTube (bug 630364)
378 pref("network.protocol-handler.warn-external.vnd.youtube", false);
380 // Transmit UDP busy-work to the LAN when anticipating low latency
381 // network reads and on wifi to mitigate 802.11 Power Save Polling delays
382 // (bug 888268)
383 pref("network.tickle-wifi.enabled", true);
385 // Editing PDFs is not supported on mobile
386 pref("pdfjs.annotationEditorMode", -1);
388 // Enable the floating PDF.js toolbar on GeckoView (bug 1829366)
389 pref("pdfjs.enableFloatingToolbar", true);
391 // Try to convert PDFs sent as octet-stream (bug 1754499)
392 pref("pdfjs.handleOctetStream", true);
394 // Disable tracking protection in PBM for GeckoView (bug 1436887)
395 pref("privacy.trackingprotection.pbmode.enabled", false);
397 pref("privacy.fingerprintingProtection.pbmode", true);
399 // Relay integration is not supported on mobile
400 pref("signon.firefoxRelay.feature", "not available");
402 pref("signon.showAutoCompleteFooter", true);
404 // Delegate autocomplete to GeckoView (bug 1618058)
405 pref("toolkit.autocomplete.delegate", true);
407 // Locked because any other value would break GeckoView
408 pref("toolkit.defaultChromeURI", "chrome://geckoview/content/geckoview.xhtml", locked);
410 // Whether to use unified telemetry behavior; requires a restart to take effect
411 pref("toolkit.telemetry.unified", false);
413 // Download protection lists are not available on Android (bug 1397938, bug 1394017)
414 pref("urlclassifier.downloadAllowTable", "");
415 pref("urlclassifier.downloadBlockTable", "");
417 // The Potentially Harmful Apps list replaces the malware one on Android (bug 1394017)
418 pref("urlclassifier.malwareTable", "goog-harmful-proto,goog-unwanted-proto,moztest-harmful-simple,moztest-malware-simple,moztest-unwanted-simple");
420 // Android doesn't support the new sync storage yet (bug 1625257)
421 pref("webextensions.storage.sync.kinto", true);
423 // Require extensions to be signed (bug 1244329)
424 pref("xpinstall.signatures.required", true);
426 pref("xpinstall.whitelist.add", "https://addons.mozilla.org");
427 pref("xpinstall.whitelist.fileRequest", false);