Commit Graph

3198 Commits

Author SHA1 Message Date
Marcin Kosiba
fd1ac83f63 Remove the default WebView text encoding resource entirely.
Having the default text encoding in config.xml makes it seem like
it's something that could be changed, but upon further inspection
we can't see any good reason for anyone to ever want to change it
from UTF-8.

BUG: 17634120
Change-Id: I10a09ab1d65590c29efb10222abfa08ca52b5c84
2014-10-10 17:20:58 +01:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Hui Shu
2267177279 Revert "Remove WebView DRP Setting from Developer Settings"
This reverts commit eb487c6301.

Change-Id: Ie38a24efe2ea015b971cb0a05eca321299898538
2014-10-01 21:41:07 +00:00
Hui Shu
eb487c6301 Remove WebView DRP Setting from Developer Settings
BUG: 17730990
Change-Id: Ic4fde9affb2f887329d6b3d2dbe8945959c016d8
2014-09-30 16:52:41 -07:00
Marcin Kosiba
288e7de22e Remove an @removed member of andorid.webkit.WebResourceResponse.
BUG: 17253647
Change-Id: I02f4f0600a09ceb3b68ba2698b80e413e7511663
2014-09-12 18:24:49 +01:00
Tao Bai
e8df27aec8 Revise createIntent and parseResult API.
- Both are move to FileChooserParams, remove UploadHelper class.
- createIntent only handls non-capture intents
- parseResult is the static member of FileChooseParams and should
  be used with createIntent.

BUG:17253647,16624450

Change-Id: I81cac7c1b739880db4e4c1f2b4612ed2ee87cb1b
2014-09-09 11:21:22 -07:00
Marcin Kosiba
8d4e83aca0 Merge "Rename WebResourceRequest.hasUserGestureInsecure to hasGesture." into lmp-dev 2014-09-05 15:13:40 +00:00
Marcin Kosiba
100c20c900 Rename WebResourceRequest.hasUserGestureInsecure to hasGesture.
This is in response to API council feedback.

BUG: 17253647
Change-Id: I6da2aa2510a73276fcdbad9219adfeaaed41d3ba
2014-09-05 14:22:32 +00:00
Martin Kosiba
3a82acdbf6 Change WebView.zoomBy return type to void.
It turns out that the semantics of the return value are confusing
and so we decided to not return a result from this method at all.
The developer can call canZoomIn/canZoomOut to determine whether
the WebView is at the zoom limit, so there is no loss of
functionality.

BUG: 17374808
Change-Id: I4dfde71d5ac4a3f91c8755b257411aad06a1b1f6
2014-09-05 13:41:48 +00:00
Selim Gurun
c7a8d06731 Remove unpublished optOutDataReductionProxyApi
Bug: 17253647

Per Api council's request, remove this API.

Change-Id: I8e706cc7173b88f3f13b2ac0697f54b25f163798
2014-09-03 14:34:24 -07:00
Selim Gurun
d576bf310b Merge "Address API Feedback" into lmp-dev 2014-08-28 01:47:31 +00:00
Selim Gurun
17d1adb183 Address API Feedback
Bug: 17253647

This is Part I of API feedback. It does not address portions
of the feedback that is still pending a response from API council.

Change-Id: I6ae250c6455a5545912623aeb34332d564fffde7
2014-08-27 17:56:08 -07:00
Hector Dearman
42a9ee5036 Remove synchronized from acceptThirdPartyCookies()
As per API council feedback.

Bug: 17253647
Change-Id: Ide3d4b216f01a96e54111f885813ca8a7c3865ba
2014-08-26 10:56:09 +01:00
Torne (Richard Coles)
84392d74fe Store the WebView's package info.
When loading the WebView, save the PackageInfo for the package so that
it can be retrieved later to access the package name, version data, etc.
This will be used to detect WebView downgrades that may affect an app's
saved WebView-related data.

Bug: 16724751
Change-Id: I05ce469308cc87f79c73206327f43b76b1bab222
2014-08-14 16:43:18 +01:00
Torne (Richard Coles)
4f82d40e9f Merge "Add trace events to WebView startup." into lmp-dev 2014-08-12 23:14:49 +00:00
Robert Ly
b369ff7b38 am 84f00277: am 9ada140f: am efbbb182: Merge "cherrypick from klp-docs docs: security consideration for Android <4.2 Change-Id: I5fe51641539f7ffe7abcdb0618371dd3f4b62ab5" into klp-modular-docs
* commit '84f00277b11a0324f0dd08054b119f2a61f1e646':
  cherrypick from klp-docs docs: security consideration for Android <4.2 Change-Id: I5fe51641539f7ffe7abcdb0618371dd3f4b62ab5
2014-08-13 16:17:49 +00:00
Robert Ly
84f00277b1 am 9ada140f: am efbbb182: Merge "cherrypick from klp-docs docs: security consideration for Android <4.2 Change-Id: I5fe51641539f7ffe7abcdb0618371dd3f4b62ab5" into klp-modular-docs
* commit '9ada140fc1a8cb6dabc0b0951249cb7a46578c37':
  cherrypick from klp-docs docs: security consideration for Android <4.2 Change-Id: I5fe51641539f7ffe7abcdb0618371dd3f4b62ab5
2014-08-13 16:12:37 +00:00
Torne (Richard Coles)
3822882b32 Add trace events to WebView startup.
Add system trace events for several interesting points during the
loading of the WebView APK so we can measure how much each part
contributes to startup time.

Bug: 16870075
Change-Id: Iadfd1881faea0377fa01313dddabb1d030962c5f
2014-08-13 17:11:45 +01:00
Scott Rowe
607c17f99c cherrypick from klp-docs docs: security consideration for Android <4.2 Change-Id: I5fe51641539f7ffe7abcdb0618371dd3f4b62ab5
Change-Id: I9838519ad3e0c2fb3957829fc448b1ae6bd1d62b
2014-08-07 15:54:42 -07:00
Torne (Richard Coles)
27cb0d22a8 Make WebViewFactory more robust.
Catch and discard any exception thrown in getWebViewNativeLibraryPaths
to avoid the system server crashing if there is something wrong with the
update APK. prepareWebViewInSystemServer(nativePaths) is safe to call
even if nativePaths is null or invalid, and must be called to ensure
that any process waiting for relro processing is unblocked.

Bug: 16894062
Change-Id: I76c759bebcb7c4643fb50979376afea764c859c4
2014-08-08 18:40:51 +01:00
Torne (Richard Coles)
c19f854965 Merge "Log the version of the WebView package used." into lmp-dev 2014-08-05 00:15:52 +00:00
Torne (Richard Coles)
0606cd572a Log the version of the WebView package used.
To aid in debugging app behaviour when WebView updates may be present,
log the package name, version name, and version code of the WebView
package when we are about to load it into an application. Do this before
we actually load any part of the package in case of an issue loading it
in the first place.

Change-Id: Id653bad431760b7ead8e3f8eb29f9d6a8bb68d07
2014-08-05 16:12:09 +01:00
Hector Dearman
ae9251262a Merge "Fix CookieSyncManager package summary" into lmp-dev 2014-08-05 00:35:13 +00:00
Hector Dearman
24f7e61a38 Fix CookieSyncManager package summary
Putting the deprecated at the beginning of a class comment seems
to cause problems with JavaDoc so I've moved it to the end.

Bug: 16799480
Change-Id: Ia23dab2ad8ceb8e107e047480b5cb324d11a1457
2014-08-05 10:55:30 +01:00
Torne (Richard Coles)
5f3278ba1e Don't let failures to load the null WebView propagate.
We load the null WebView if the real WebView package is not available to
support devices that aren't intended to have a WebView, but this results
in confusing log messages if the real WebView is supposed to be present
but is broken/unloadable for some reason. Since the null WebView is in
the system classpath on devices that should use it, swallow any failures
to load it on the assumption that this is actually just a failure of the
real WebView to be loaded.

Change-Id: I15820da3517daffde6169343c648a4486c0309d7
2014-08-04 14:26:16 +01:00
Primiano Tucci
e76e81a227 Cherry pick Cleanup debug messages in WebViewFactory and WebViewUpdateService DO NOT MERGE
This is just a cleanup CL which fixes:
- Some erroneous debug messages about the relro creator process.
- The condition checked in WebViewUpdateService, to prevent the
  WebView to be used from the SystemServer (it now looks at the
  process id, previously it was erroneously looking at the uid).
- Adds a 5s. timeout to the waitForRelroCreationCompleted.

Original BUG:16403706

Original Change-Id: I43a953949050d7df5fe334cfa7257315ee6db071

Bug: 16723226
Change-Id: I2f40be3622b8e6c68b2b52cae7f4d3a95e148cbf
2014-08-01 14:25:26 +01:00
Torne (Richard Coles)
5651fc2fee CHerry pick Find WebView package name from a config resource. DO NOT MERGE
Use a config resource to determine the package name for the WebView
implementation to allow it to be changed by a resource overlay.

Original Bug: 16329371
Original Change-Id: I5977691c0223347e0382d584c3d3ee4428660180

Bug: 16723226
Change-Id: Ib0b4245f26cbf93f364aa0f30b231786931f9f16
2014-08-01 14:25:08 +01:00
Ben Murdoch
5ced502fba Cherry pick Remove dependency on WebView native library path. DO NOT MERGE
This CL removes the final use of the hardcoded WebView
library path from WebViewFactory. We now use a system
property to set the amount of address space to reserve
in the zygote rather than stat'ing the file.

See also I07ad5a774623c1899eb50474d999a2b1447783f0

Original Change-Id: Id3c1e3cc2e2a06c1021ad0260a37abcd07d78fd6

Bug: 16723226
Change-Id: I55acad96b6d9ee69f14b84d772abf7740ea96b94
2014-08-01 14:24:58 +01:00
Primiano Tucci
161536b597 Cherry pick Refactor ActivityManagerService and make WebViewFactory more pedantic. DO NOT MERGE
This CL adds more robustness to the logic in WebViewFactory, checking
whether the isolated process did start at all and catching exceptions
in its java side.
Also, this addresses the refactor comments received in CL 509840.

Original BUG:16403706
Original Change-Id: Iaaea6d36142ece6d974c2438259edf421fce9f2e

Bug: 16723226
Change-Id: Id308f2ffde9b67a3eb4719c7b81b4f46421f0c2e
2014-08-01 14:24:38 +01:00
Primiano Tucci
1b7977b608 Cherry pick Refactor native library path logic in WebViewFactory DO NOT MERGE
This CL changes the relro creation and loading logic.
Instead of using a hardcoded path, now WebViewFactory queries the
package manager to get the lib path, which will be either
/system/priv-app/webview/lib/ or /data/app/... depending on the
presence of an update apk.

Original BUG:16403706
Original Change-Id: Icceb95da98e69032a19ac2ae8fe72ba1439e50ad

Bug: 16723226
Change-Id: Ia3155f72a735d75a566a8cc4c8c892d43b6cd371
2014-08-01 14:24:28 +01:00
Marcin Kosiba
63d3d8a458 Cherry pick Append WebView assets to AssetManager when loading the WebView. DO NOT MERGE
This makes the code loading the WebView Java code from the .apk
also load the WebView assets into the current AssetManager.

Original BUG: 11505352
Original Change-Id: Ib6203f79b98805012ffa20b233037b7da221624c

Bug: 16723226
Change-Id: Ie7b0b22df9727c72debfb9ccfcd84c95bf41e039
2014-08-01 14:24:18 +01:00
Primiano Tucci
810c052d9b Cherry pick Introduce startIsolatedProcess private API in ActivityManager DO NOT MERGE
The new API spawns a isolated process, using a custom uid, entrypoint and
abi. Such API is used by the WebViewFactory to spawn its unpriviledged
but trusted process (hence the fixed uid) which rewrites the rerlo file
on boot / when an update occurs.
Since both the ActivityManager service and the WebViewUpdate service
live in the SystemServer their calls be dispatched locally and no
binder interface needs to be exposed for the new startIsolatedProcess API.

Original BUG:16403706
Original Change-Id: I327b59735c12698595e0dbcc4da5d759c9103b0a

Bug: 16723226
Change-Id: Iecb49888e11eec9d302d9712953fd498db5821af
2014-08-01 14:24:09 +01:00
Torne (Richard Coles)
6c778cebc7 Cherry pick Load the WebView Java code from an APK. DO NOT MERGE
Use the WebView APK to load the Java code via createPackageContext.

Original Bug: 16329371
Original Change-Id: I1292edab639d85c2027dc8ebb52def8c36d41cde

Bug: 16723226
Change-Id: I8e692a5e12706f91a8af0a8b385bac336ce60913
2014-08-01 14:23:55 +01:00
Selim Gurun
d92e726cbe Merge "Revert "Load the WebView Java code from an APK." DO NOT MERGE" into lmp-dev 2014-07-28 18:28:56 +00:00
Ben Murdoch
64fb02956b Revert "Load the WebView Java code from an APK." DO NOT MERGE
This reverts commit 72618c3363c83f2668dab4495b100a61d6d8700a.

Bug: 16448724
2014-07-28 21:07:24 +01:00
Bo Liu
c15fbba494 Merge "Add WebView.enableSlowWholeDocumentDraw" into lmp-dev 2014-07-28 18:28:56 +00:00
Hector Dearman
cf6a926ce9 am a7a75633: am 31b9e23a: am 21b90a9d: Merge "Add documentation for CookieManager defualts" into lmp-dev
* commit 'a7a756333d346890eae72a4f596fcedfe69308b5':
  Add documentation for CookieManager defualts
2014-07-25 12:38:27 +00:00
Selim Gurun
d4ed875df7 am 2bb2cf49: am bc19d47a: am 773433af: Merge "Address API review" into lmp-dev
* commit '2bb2cf49ea199816a51bbfb92880b8d16d01ff19':
  Address API review
2014-07-24 23:51:17 +00:00
Hector Dearman
28f4c20363 am 017d651c: am fb8f0643: am aa2a5911: Merge "Update CookieManager API for Council review." into lmp-dev
* commit '017d651cdd6509676ee88d960adc3415d69bba3c':
  Update CookieManager API for Council review.
2014-07-24 23:49:21 +00:00
Robert Ly
f5aba5ca1a am ae40df3e: am c955cdb3: am 1be71de6: am 39572996: am 1903bbb8: am 22bdcd2f: Merge "cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1" into klp-modular-docs
* commit 'ae40df3eff3037a9b9e4e88899a6c7a713121a23':
  cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1
2014-07-24 23:48:37 +00:00
Selim Gurun
c5a1e2c872 Merge "Address API review" into lmp-dev 2014-07-24 22:06:48 +00:00
Selim Gurun
48f6c45069 Address API review
Bug: 16403458

Address API review. This change updates the FileChooser api. The
largest change is, as requested by API council, providing a helper
to reduce the code app developers need to implement. This
change does not include the CookieManager changes that was requested.

Change-Id: I30d75f36df6bc96d9842b63fdd25c4ff62aee5bb
2014-07-24 15:18:57 -07:00
Robert Ly
eb355efc1b am 39572996: am 1903bbb8: am 22bdcd2f: Merge "cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1" into klp-modular-docs
* commit '39572996f25d4b4ce744d9d04080e33b687ab03b':
  cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1
2014-07-24 16:22:29 +00:00
Hector Dearman
9f59526f03 Add documentation for CookieManager defualts
Documents the defualt settings of acceptCookies and acceptFileSchemeCookies.

The current defaults:
                            <L       >=L
acceptCookies           |    y   |    y   |
acceptThirdPartyCookies |    y   |    n   |
acceptFileCookies       |    n   |    n   |

Bug: 11575158
Change-Id: Ia6cb71bf80608cb2ea8049192f33616e57c15801
2014-07-25 09:37:58 +00:00
Hector Dearman
ffae672881 Update CookieManager API for Council review.
Remove synchronized from setAcceptThirdPartyCookies

Bug: 16403458
Change-Id: I6073da2c03fd0952bc447f7cfe0d959148af6877
2014-07-24 18:10:25 +01:00
Bo Liu
9f3ed850b6 Add WebView.enableSlowWholeDocumentDraw
BUG: 16300353
Change-Id: Id4475f04f32bb176a6a59ee9d5a09e3f65b94ef0
2014-07-23 19:39:46 -07:00
Robert Ly
39572996f2 am 1903bbb8: am 22bdcd2f: Merge "cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1" into klp-modular-docs
* commit '1903bbb88d8e2e1921b0441911cb73966d3bca4a':
  cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1
2014-07-23 21:06:47 +00:00
Tao Bai
d673c47491 am f56d307b: am d5874836: am 9ba09c25: Merge "WebView permission change" into lmp-dev
* commit 'f56d307b4b082c15a17898bf00fc2ee60a100386':
  WebView permission change
2014-07-23 19:32:00 +00:00
Tao Bai
2871febb19 WebView permission change
As requested by API council, the following were changed
- Changed the PermissionRequest to abstract.
- Used String for resources instead of long.
- Also remove the WebView.preauthorizePermission() which we didn't think

BUG: 15432556
Change-Id: I900a98b4e0288d2bcd8faf0bbcd84970600548a5
2014-07-23 12:16:55 -07:00
Scott Rowe
e2bdaea318 cherrypick from klp-docs docs: formatting for html Change-Id: I1451615c09cc003a03d7585176036c4d695408f1
Change-Id: I21424c1407b44554ac135248dabc2328bc70aef9
2014-07-23 20:54:50 +00:00