Commit Graph

3214 Commits

Author SHA1 Message Date
Narayan Kamath
f1a9b1bc24 Stop using ErrorStrings for apache.
These strings only ever end up in logcat (at best), so there's no
point having them translated. Also, rename the ErrorStrings class
and move it android.webkit where the last remaining caller lives.

(congrats webview people, this is now your mess to maintain.)

Change-Id: I04dae37c34191b26a69282970318c1b782af1edf
2014-11-27 17:23:41 +00:00
Ignacio Solla
ea1d90f5da [WebView] Allow the WebView to be compiled against the system SDK.
BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
2014-11-25 17:03:49 +00:00
Ignacio Solla
e7cf27b664 [WebView] Interface to access hidden APIs. (DO NOT MERGE)
The WeView provider implementation needs access to
these APIs to implement the WebView functionality.

BUG:18152150

Change-Id: I6b41c623b1e8a776dcee8977d0d17259cb4b34f1
(cherry picked from commits 94ef789f0c
 and 53f2569487)
2014-11-19 21:47:13 +00:00
Marcin Kosiba
1de5704943 am 43751757: Merge "Remove the default WebView text encoding resource entirely." into lmp-dev
* commit '437517573b53b17765eba9b0b98055915bf3a4a1':
  Remove the default WebView text encoding resource entirely.
2014-10-13 09:44:58 +00:00
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
529b78941c am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '89b196958fee07475765bd3c458098464ba16f2e':
  Put in real "code" (aka marketing) name.
2014-10-08 22:48:44 +00:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Hui Shu
00207f564d am 4e0ad44f: Merge "Revert "Remove WebView DRP Setting from Developer Settings"" into lmp-dev
* commit '4e0ad44fcac48b2be77bd116ffdb696cb6490829':
  Revert "Remove WebView DRP Setting from Developer Settings"
2014-10-01 22:39:00 +00:00
Hui Shu
4979a6ade1 am aee5c9e7: Merge "Remove WebView DRP Setting from Developer Settings" into lmp-dev
* commit 'aee5c9e7c1f61126c61722a957daedf57cf26e7e':
  Remove WebView DRP Setting from Developer Settings
2014-10-01 22:37:23 +00: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
26dd49f4c1 am 6e6ae86a: am 46683a27: Remove an @removed member of andorid.webkit.WebResourceResponse.
* commit '6e6ae86a8659a02e30bdf1a9ec4ca910c4a78215':
  Remove an @removed member of andorid.webkit.WebResourceResponse.
2014-09-12 19:19:04 +00: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
96bca16a43 am cdad4651: am 3350edac: Merge "Revise createIntent and parseResult API." into lmp-dev
* commit 'cdad4651a1e93b0cfe2b199e39e5583ce9a19454':
  Revise createIntent and parseResult API.
2014-09-10 21:55:15 +00: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
Elliott Hughes
4656e69bf3 resolved conflicts for merge of 2008cff7 to lmp-dev-plus-aosp
Change-Id: I5148eda624e8504f12dbc1288cd4a7a5b7c10850
2014-09-08 13:08:43 -07:00
Elliott Hughes
ab94a1676e Merge "Small documentation fixes across many files." 2014-09-08 18:44:14 +00:00
Mark Doliner
d0646dca40 Small documentation fixes across many files.
Change-Id: I3e8787ce4bc6018ea1dc9aef2a2cd4e0a8dde663
2014-09-05 13:57:51 -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
Marcin Kosiba
3c4b2273ac Update WebViewFactory.java to compile in AOSP.
Change-Id: I076ef48a3205969f1945bff93ea0305e9907b20a
2014-08-05 11:00:49 +01:00
Torne (Richard Coles)
a7e4fe9af0 Load the WebView Java code via createPackageContext.
Bug: 16329371
Change-Id: I94b4bb0df46a373454eb8ee9742413e13ce1e6a8
2014-08-05 09:26:58 +01:00
Torne (Richard Coles)
3d9bcc066f Remove WebView library preloading mechanism.
We don't want to preload the WebView library in the zygote process any
more, as loading an updatable WebView in the zygote is a stability risk.
The memory benefits of preloading will be obtained in other ways.

Bug: 13005501
Change-Id: Ic89f2a1d057dc92b01fb775bf326b47ac2d4caa2
2014-08-05 09:26:54 +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