summaryrefslogtreecommitdiff
path: root/src/com/android/browser/BrowserSettings.java
Commit message (Collapse)AuthorAgeFilesLines
* reduce cookie tracking (4/4): onResume deletion of cookiesHEADkitkatRobin Humble2014-06-081-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optionally delete unwanted cookies (and localstorage) at every Browser resume. The default for this feature is off - ie. maintain the current Browser "keep every cookie" behaviour. Optionally localstorage files (site databases) are also removed whenever cookies have been deleted. This helps to reduce evercookie/supercookie persistence. A whitelist of sites that are permitted to keep cookies is stored in the standard Browser shared_prefs. The site's cookie preference is set via a menu checkbox when viewing the page. This allows opt-in whitelisting behaviour on a per-site basis, suitable for saving eg. login cookies. The cookie deletion itself is done by using existing API's to delete all cookies and then selectively restore just those from the whitelisted sites. Cookie counting is the only new API needed by this patch, and is used to eliminate unnecessary cookie and localstorage deletes. Although simplistic, onResume cookie filtering seems to work well and in testing hasn't broken any web browsing. The underlying CookieMonster functions operate on cached copies in ram and are asynchronous to disk so there should be little or no measurable performance impact on browsing from cookies. localstorage deletion is not cached by any layer so, if enabled, might have some minor performance impact. Change-Id: I55c69292a5ddc460e0e50b340dc4330c28becc5e
* BrowserSettings: update desktop UA string to match Chrome 33Steven Luo2014-06-081-1/+1
| | | | | | This matches the corresponding update to Chromium 33 for Android WebView. Change-Id: Id2a8a832c2a637f7c5284d5006b6f3475bfba560
* Replace removed NARROW_COLUMNS layout mode with TEXT_AUTOSIZINGSteven Luo2014-03-081-2/+2
| | | | | | | | | | | | For reasons which I completely fail to understand, Google elected not to implement the very useful NARROW_COLUMNS layout mode (double-tap to reflow text) in Chromium WebView, and instead chose to implement TEXT_AUTOSIZING (buggy heuristic-based font inflation). But complaining isn't going to get it back, and font inflation is better than nothing on small screens, so replace NARROW_COLUMNS with TEXT_AUTOSIZING to restore some support for resizing text to be legible on screen. Change-Id: Ieeb03d38e8a7386e8e8f811c570aa17bfabf4337
* BrowserSettings: update desktop UA string to match Chrome 30Steven Luo2014-03-081-2/+2
| | | | | | | | Now that we're using a Chromium-based WebView which closely matches Chrome 30, we should report as a newer Chrome version when masquerading as a desktop browser. Change-Id: I301a8cfac9a83e66a6749872943e80ff5c4740a1
* De-classicify Android Browser part 2Jonathan Dixon2013-08-251-56/+0
| | | | | | | | | | Bug: 10427705 Allows Browser to compile even when WebViewClassic is no longer in frameworks/base. The deleted functionality was already disabled at runtime when using non-classic webview. Change-Id: I21b58ec52ac059c699b49a2dd80008d9a9e6791a
* De-classicify BrowserJonathan Dixon2012-12-171-25/+34
| | | | | | | | Removes the hard run-time dependency on WebViewClassic. (Still needs visisbility of it to build though) This is needed to enable chromium webview testing. Change-Id: I290b6b23b2eac525537ebc3ef8007d681a67a169
* BrowserSettings required a Controller sometimesMagnus Hallqvist2012-09-131-2/+2
| | | | | | | | BrowserSettings can be used without a browser Controller, e.g. when accessed from system settings. But some null checks for this case were missing, these have now been added. Change-Id: I57762898d34ef3018569e0de1499be2922dabded
* Reset to default did not reset cached settingsBjörn Isaksson2012-09-051-0/+5
| | | | | | | | | | Some settings such as the current search engine to use was cached in the BrowserSetting object and not always read from shared preferences. When settings were reset to default these cached values were not reset causing the old (possibly non-default) value to still be used. Change-Id: I805a339a6238c96dc73cbda47981053bd4f6eace
* Add setting to control tabs per app behaviorMichael Kolb2012-05-161-0/+4
| | | | | | Bug: 5890701 Change-Id: I6a47c7bff260dd8ded3a4c360f186ce8f670c67e
* Don't wait on ContactsProviderBen Murdoch2012-05-161-2/+0
| | | | | | | | | | | | | | | | | | | | | Right now during the initial WebSettings sync to native we wait for the autofill profile to be loaded from disk so that it can be synced. If there's no profile set, then we try to infer a profile from the user's Me contact profile. Querying the Me contact can be slow and in some extreme cases can cause the settings sync on the UI thread to block long enough to show an ANR. Instead signal the threads (via the CountdownLatch) waiting on the initial import before we do the Me profile lookup. Note that we still may block the UI thread if the lookup of an already saved profile takes an exceptionally long time. This is so that when a user has saved a profile, we'll never resort to showing them the "setup autofill" message. (But all ANR reports to date have shown that we were querying the Me contact at the time of ANR). Bug: 6371781 Change-Id: Ibb0d5e285ec3587d9f9bad3e69b79890850c2f6d
* Remove voice search handlingMichael Kolb2012-05-031-11/+0
| | | | | | Bug: 6439925 Change-Id: I1b7161a67fa0c20d87f147d6ed19c02e53093054
* Merge "Modify browser file origin policy."Selim Gurun2012-04-191-0/+3
|\
| * Modify browser file origin policy.Selim Gurun2012-03-291-0/+3
| | | | | | | | | | | | | | | | Bug: 6212665 Modify browser's file origin policy to match Chrome's. Change-Id: Iff47b9d4ee1a04c1fedd1f6c6396a46afe2ff9b1
* | pref for html5 prefetch bandwidth managementVictoria Lease2012-03-301-2/+65
|/ | | | | Bug: 5218987 Change-Id: Ifeb9a1b3d71ac83b8ad94a8f31ed324ebd5d0fe7
* Remove WebSettings from BrowserSettings in destroyJohn Reck2012-03-081-0/+11
| | | | | | Bug: 5776363 Change-Id: Id142c7096601c2316d71bd9443930080ce92c19c
* Fixup browser to use WebView proxyJonathan Dixon2012-03-021-6/+8
| | | | | | | | Has to escape out to WebViewClassic whenever it needs a hidden API. Interdepends on https://android-git.corp.google.com/g/165608 Change-Id: Ic61dd7f57f75381864075605d5901f2688648cbd
* Merge "Remove an init. workaround for Cookiemanager."Selim Gurun2011-11-231-2/+0
|\
| * Remove an init. workaround for Cookiemanager.Selim Gurun2011-11-211-2/+0
| | | | | | | | | | | | | | | | Bug:5253777 This workaround is now not necessary as we not do not block while accessing cookie manager settings. Change-Id: I7b1df4b60124123b6493a0320d2d96dfdd8d2c29
* | Crash recover no longer uses icicle.George Mount2011-11-231-0/+43
|/ | | | | | | | | | Bug 5508252 Changed load state to use the crash recovery state every time instead of using icicle. When the state is saved, the value is written synchronously. Moved settings from CrashRecoveryHandler to BrowserSettings Change-Id: I1a241d4c488fe3246c7d7f1ee0ce26c42ba29429
* Remove the psychic labs feature.Narayan Kamath2011-11-181-15/+0
| | | | | | | | Reverts the UrlInputView to a standard autocomplete that causes less trouble for IMEs. bug:5598837 Change-Id: If469d76f4feda88e4a122264a39d317737404578
* Add support to minimize the WebView's memory consumption by defaultTeng-Hui Zhu2011-11-071-0/+7
| | | | | | | | webkit change is c/148241 bug:5522175 Change-Id: I8562c39c55913ab89848afe8a36e8a2784c12727
* Don't set the upload type unless in debugJohn Reck2011-10-271-6/+10
| | | | | | | Bug: 5529012 Reduce unnecessary JNI Change-Id: Ie1fc504bf8a159bf0ee5b26e89cb29b445ad7723
* Add setting for configuring zoom level on double-tap.Mangesh Ghiware2011-10-121-0/+25
| | | | | | | | | Added a seek bar in Accessibility settings to configure the zoom level on double-tap. The range is 75-125% with the default of 100% equal to the display density. Bug: 5312461 Change-Id: Iaf1b9f6f6659146db4031c5f819ef9cb55695b5c
* Merge "Allow default preload setting to be configured via Gservices."Mathew Inwood2011-10-061-2/+11
|\
| * Allow default preload setting to be configured via Gservices.Mathew Inwood2011-10-051-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now load the default value from a secure setting. To over-ride it, set Gservices key secure:browser_default_preload_setting to the appropriate value. The Gservices default value will only be used if the user has never opened the 'Bandwidth management' tab in the browswer settings. Once that tab has been opened, even if the user did not change the setting, the value will be persisted in the browser and the default will be ignored. Bug: 5346028 Change-Id: If3b14485dc8bc46e7ed72c49eb5cf3c474893fe3
* | Disable hardware skia when debug is disabledJohn Reck2011-10-041-1/+8
|/ | | | | | Bug: 5413097 Change-Id: I7870e91fb981496fcc608a3473b4534cdcf0c345
* Switch browser back to use Gpu upload pathTeng-Hui Zhu2011-09-301-2/+2
| | | | | | Change-Id: I8dbc25b6c5bdf6b8edf4ba2273b886cc000bfaff bug:5395019
* UI for switching texture upload modeTeng-Hui Zhu2011-09-231-0/+10
| | | | | | | | | | | For browser, default will be CPU upload until bug 5334978 fix. bug:5347539 The webkit part is in https://android-git.corp.google.com/g/#/c/137610/ Change-Id: Iec3a100dc142b28e54145f08a5c76210f8634cba
* Adjust text zoom by system preferenceJohn Reck2011-09-141-2/+6
| | | | | | | Bug: 5287968 System setting is a multiplier on top of browser's text zoom preference Change-Id: I88ea1340827492412c51efaf28ca789767ba8c56
* Change default preload setting to 'Always'.Mathew Inwood2011-09-071-1/+1
| | | | | | | Also some tidying up to that the default is only specified in a single place. Change-Id: I6d66739a8b0d307f8af3c29c62d122a3044c4943
* More fine-grained config for 'Search result preloading' setting.Mathew Inwood2011-09-051-2/+15
| | | | | | | Instead of a checkbox, it's now a setting always/wifi only/never. Bug: 5086576 Change-Id: I265a22968eafee547571dc86c10c5d5421a305e8
* Small startup perf improvementJohn Reck2011-09-021-1/+4
| | | | | | Bug: 5019676 Change-Id: Ib5f6f5ee8116b53936c927884a32dd4a4765364d
* More BrowserSettings initialization shufflingJohn Reck2011-08-171-1/+9
| | | | | | | | Bug: 5019676 BrowserSettings.setController required early initialization. Tweak it so that syncSharedSettings is called as late as possible Change-Id: I16ab56d9f2e31faf1a108808069c29c76a2627c2
* Faster all the things!John Reck2011-08-171-1/+0
| | | | | | | | | | Bug: 5177959 Improve browser startup. Elinate IO access on UI thread during startup by removing the super legacy ClearThumbnails task. Also rework how the hardware acceleration debug setting works to remove the requirement for initialized BrowserSettings in onCreate Change-Id: I4c1014d380827af4833586e6a3ae842fd59aa48b
* Add preview for contrastJohn Reck2011-08-081-6/+2
| | | | | | | | | | Bug: 5135321 Bug: 5118011 Add a preview for the contrast accisibility settings. Rename FontSizePreference to the more generic SeekBarSummaryPreference as it has nothing to do with font size specifically. Change-Id: Id516d63d62822cf026af3ce531ec33eb48ae667a
* Merge "Fix BrowserSettings to apply blockPopupWindows() correctly"Steve Block2011-08-041-1/+1
|\
| * Fix BrowserSettings to apply blockPopupWindows() correctlySteve Block2011-08-031-1/+1
| | | | | | | | | | | | | | | | This setting got inverted in https://android-git.corp.google.com/g/#change,107420 Bug: 5114572 Change-Id: Iaba01a668ca7e48b1629483c447d62e2b71f1bcb
* | Move inverted mode to Accessibility settingsNicolas Roard2011-08-031-1/+12
|/ | | | | | | | Add contrast settings bug:5111259 Change-Id: Ic95e1fbae94c01fc8560cbd326503244b9ab4988
* Cache the application context instead of Activity.Ben Murdoch2011-08-011-1/+1
| | | | | | | | | When storing a reference to a Context, ensure that it's the Application context rather than Activity Context. Bug: 5084293 Change-Id: Ib0be5f8ceb91846bb985d0813a8f22cabd44eaf8
* Merge "Add a runtime switch between Raster and Ganesh rendering modes."Derek Sollenberger2011-07-291-0/+8
|\
| * Add a runtime switch between Raster and Ganesh rendering modes.Derek Sollenberger2011-07-281-0/+8
| | | | | | | | | | | | | | | | | | | | There are corresponding changes in: frameworks/base -- change ID: 120662 external/webkit -- change ID: 120660 bug: 5013645 Change-Id: Ic8dfd24786c2ecc14df840204c7a01cb0defa5e3
* | Fix resetting defaults triggering preloginJohn Reck2011-07-291-1/+6
|/ | | | | | Bug: 4163516 Change-Id: I0a64ab19469c25f8c267699fd6bce4fb599f78f9
* Switch to a background thread poolJohn Reck2011-07-251-15/+6
| | | | | | | | | Bug: 5019676 Use a shared thread pool Eliminate some unnecessary use of AsyncTask (which has extra overhead compared to using a thread pool) Change-Id: I01d6c84816a9c9705216c8fdb8ed8c990265626a
* Cache the factory reset URL.Ben Murdoch2011-07-251-14/+19
| | | | | | | | | | | | | | Hitting the browser provider for the factory reset url is one of our most common strict mode violations, and triggers sqlite disk io. So now read it once in a background thread and cache it for future accesses. Needed to make the requireInitialization() function static, so we now wait/notify on BrowserSettings.class rather than the instance. Bug:5072979 Change-Id: I78550965887e32b4f8ad0eaf0013753e63d6f602
* Startup optimizationJohn Reck2011-07-211-2/+15
| | | | | | | | | | | | | Bug: 5019676 Save one thread by letting CrashRecoveryHandler re-use the BrowserSettings startup thread Lazy initialize the wake lock only if we need it (avoids IPC overhead at startup) Slight ordering shuffle in BrowserActivity to maximize the usefulness of the BrowserSettings startup thread Change-Id: I1fc7412d492f93e0630008fa6030da9e0d726ebb
* Initialize settings in a threadJohn Reck2011-07-211-44/+76
| | | | | | Bug: 5062581 Change-Id: I6f10b829918cec1d57eeda3958ef9f76216fcd3a
* Inverted lab preferenceJohn Reck2011-07-151-0/+7
| | | | Change-Id: I28636302e00a23ee65e2c63e5ebe4bebdc4576c4
* make QC work on phoneMichael Kolb2011-07-111-0/+4
| | | | | | | | Reduce options in QC menu on phone Avoid restart when enabling/disabling QC Bug: 3326929 Change-Id: I5119c4df99226dcb28f47a95471872fbf51be48e
* Force a settings sync when updating the auto-fill profile.Ben Murdoch2011-07-081-0/+5
| | | | | | | | As auto-fill reuses the same profile ID when the user makes edits, the shared preferences manager thinks nothing has changed. So force a settings sync in this case. Change-Id: I524c98958bc4d26f95f95ca35665c1009b197b74
* Preloading support in browserMichael Kolb2011-06-301-0/+7
| | | | | | | | | | | | | | | | | Apps like the QSB can request the browser to preload a web page. - preloaded pages are not added to the browser history if they'r not seen by the user - when a request is received, a new tab is created for the preloaded page, but not added to the tab list - upon receiving the view intent for the preloaded page the tab is added to the tab list, and shown - if several pages are preloaded consecutively in the same tab, the back stack is cleared before it is displayed - preloaded pages use the main browser cookie jar, so pages that have never been viewed by the user can drop cookies Change-Id: I9ed21f2c9560fda0ed042b460b73bb33988a2e8a