History log of /frameworks/base/core/java/android/webkit/WebViewFactory.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b088cb36b82359c52ffbffea48ba30fa828bea1b 17-Jun-2016 Gustav Sennton <gsennton@google.com> Use newly fetched PackageInfo for loading WebView code.

During a time window between the point at which a webview package
becomes updated and the WebViewUpdateService receiving an intent
declaring this action the WebViewUpdateService APIs will return a
PackageInfo pointing to an old and possibly removed WebView package.
This means that any paths that PackageInfo is referring to could have
been removed.

Currently, we set WebViewFactory.sPackageInfo using one of these APIs
and we might thus try to use deleted paths to to load WebView. This can
cause crashes, so instead fetch a fresh PackageInfo and assign
WebViewFactory.sPackageInfo to that.

Also early-out in loadWebViewNativeLibraryFromPackage if the current
package version doesn't match that of the one fetched from the
WebViewUpdateService.

Bug: 29381682
Change-Id: I2713ce2338a4a96c5317dcdbb363b424513088d5
/frameworks/base/core/java/android/webkit/WebViewFactory.java
fd07efa44e1337f9b573d977cd3e8d701af8fe48 23-May-2016 Gustav Sennton <gsennton@google.com> Load WebView even if WebView relro creation times out.

There are cases in which the WebView Update Service can stop switching
WebView providers (if the update service is notified about relro
creations an incorrect number of times) and in those cases apps will
fail to load WebView.

In this CL we mitigate this problem by allowing apps to load WebView
even if the time-out is reached and we also decrease the time-out so
apps are less likely to ANR when waiting for the time-out.

This CL does not prevent the update service from ending up in a bad
state - so we will still end up crashing apps if the current WebView
implementation is uninstalled after relro creation fails.

Bug: 28860862
Change-Id: Ib6af3722e17a13db77ef34c37581a6a0e1d045bb
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b5f554a25d93cd24588c63efc06c617bc63b87e7 21-Apr-2016 Hui Shu <hush@google.com> WebView downgrade prevention logic

Prevent *any* WebView provider packages to be downgraded lower than MonoChrome
Stable on the system image.

Assuming that all (and future) WebView provider packages follow the same
versionCode scheme, we can compare the subsection of Chromium versionCode that
contains branch number, which is done by ignoring the least significant 5
digits.

Note this CL is a follow-up to go/ag/895502.

BUG: 27469181
Change-Id: Iffe3c4b7f912d48c034f107079e065e54130713f
/frameworks/base/core/java/android/webkit/WebViewFactory.java
cd8f2737cc550ef1461c74a5c748777fa0c97379 14-Apr-2016 Gustav Sennton <gsennton@google.com> Verify WebView package info before loading WebView

To ensure that the package we are using to load WebView is a valid
provider we need to verify this before loading WebView - not only when
choosing what package to use.

Bug: 27900925
Change-Id: If57ca32a7a3fa08735a3b8ea9ed268c1bb1b8ede
/frameworks/base/core/java/android/webkit/WebViewFactory.java
065b7e6ef588a11c82cee22012706e6c0e66d0a3 01-Apr-2016 Gustav Sennton <gsennton@google.com> Move more code from WebViewUpdateService to separate overridable class

Move more code from WebViewUpdateService to utility classes (methods
handling settings and uninstalling/enabling/disabling packages) to be
overridden during tests.

Also rename system utility class.

Bug: 27635535

Change-Id: If49999fba4fd0962f103f389898fa5ddf19365bd
/frameworks/base/core/java/android/webkit/WebViewFactory.java
1c177d8dae45e72a4709cd023415d98544e756a3 29-Mar-2016 Gustav Sennton <gsennton@google.com> Add system api to reach WebViewUpdateService Binder interface.

Instead of using reflection in XTS tests we add some system-apis to
enable fetching information about webview packages.

Bug: 26381867
Change-Id: If983a01b6855e4a4c08ef0b5873304918d499b76
/frameworks/base/core/java/android/webkit/WebViewFactory.java
79f1216eb15a84f2d1f8ef2b57083eaf7a955bd4 17-Mar-2016 Gustav Sennton <gsennton@google.com> Remove the system api method WebViewFactory.getWebViewPackageName

We no longer user this method and it doesn't return any useful
information.

Bug: 27719581

Change-Id: Id282f1501cde9a7d7cc1fe66016cfb54956686c5
/frameworks/base/core/java/android/webkit/WebViewFactory.java
79a23a093e70e52164b882d045dfa47468ec5d45 18-Mar-2016 Gustav Sennton <gsennton@google.com> Merge "Add utility interface for WebView preparation logic." into nyc-dev
8b17926a78cc686504739730516c9b057d0672da 14-Mar-2016 Gustav Sennton <gsennton@google.com> Add utility interface for WebView preparation logic.

To make the WebView preparation mechanism testable we add a utility
interface that can be overridden during a test to avoid calling the
Android framework and to provide custom WebView packages.

With this change we also split some of the code from the WebViewFactory
(code unrelated to WebView loading) into a separate utility class.

Bug: 27635535
Change-Id: I265ecd42b24ad5383637e125b3654ff339c9df9c
/frameworks/base/core/java/android/webkit/WebViewFactory.java
26c82fff095ad551301111fb0cfca3719f8c3d67 11-Mar-2016 Gustav Sennton <gsennton@google.com> Remove WebView-package-being-replaced logic from WebViewUpdateService.

The replacing-logic tries to handle packages being uninstalled while
being replaced. This can't be handled through listening to
package-replaced intents since those can be delivered long after the
actual problem occurs.

Bug: 27605997
Change-Id: Iba8e546a5bba1ceb6226d4edb71db088c81ae1a9
/frameworks/base/core/java/android/webkit/WebViewFactory.java
1a904125a360d0e2fc867e3e51262db003317b7c 14-Mar-2016 Torne (Richard Coles) <torne@google.com> Load WebView library into the right classloader namespace.

Use the namespace corresponding to the WebView APK's classloader to load
the native library. This prevents the library from being loaded twice in
certain situations.

Bug: 27189432
Change-Id: Ia232bf13a2a04b18214af4fecde68fafc534983f
/frameworks/base/core/java/android/webkit/WebViewFactory.java
5df5e2266c0e52a7ff71148278f9076c88df7a86 25-Feb-2016 Gustav Sennton <gsennton@google.com> Allow disk reads during more parts of WebView loading.

Loading WebView should not cause any StrictMode violations since app
developers using WebView with StrictMode turned on would have to turn
off StrictMode violations at the point at which they create a new
WebView.

Bug: 27240115

Change-Id: Ia2f5565be6f36560bc9881624faf6645bc2c8575
/frameworks/base/core/java/android/webkit/WebViewFactory.java
c83e3fa35a5736a1778d241abd18dffa5953f416 18-Feb-2016 Gustav Sennton <gsennton@google.com> Add fallback packages to be enabled iff no webview packages are valid

This patch makes it possible to declare a WebView package as a fallback
which means that the package will be enabled iff there exist no other
valid and enabled (and available-by-default) webview packages.

The enabled-state of a fallback package is updated at boot and if a
webview package is changed (it it's been up/downgraded or has had its
enabled-state changed).

This patch also adds 'webviewupdate' shell commands for enabling and
disabling this mechanism.

Bug: 26375524, 26375860
Change-Id: I151915e5d6d932697dab10aeb593687e6b9c817e
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b1e45cd0b5af3dd04d4268ea93b20dbfdb97d74f 22-Jan-2016 Gustav Sennton <gsennton@google.com> Fetch WebView package even if it is uninstalled for the current user.

Since the WebView loading mechanism is global - it doesn't differ
between different users, a user for which the current WebView provider
is uninstalled won't be able to fetch any information about the current
provider without passing a certain flag (MATCH_UNINSTALLED_PACKAGES) to
the package manager.

Bug: 26677081
Change-Id: Id1b86164bb22fc7285d292da1b1115fb25e4d226
/frameworks/base/core/java/android/webkit/WebViewFactory.java
1075d812f6d8a0058371f2aecafe38f8706b6374 11-Jan-2016 Gustav Sennton <gsennton@google.com> Merge "Fix WebView loading logic to allow changing provider if current disabled"
fc424478a9e6c253238afe22ca174789d72e0682 06-Jan-2016 Gustav Sennton <gsennton@google.com> Add missing traces for WebView loading steps.

Ever since the refactoring of WebViewFactory - to support using one out
of a list of WebViewProviders - we cover less of the loading code with
traces, this CL fixes this.

Bug: 26409579

Change-Id: I9d74321806037ea34a5ace8fc75b07ca771ab7d9
/frameworks/base/core/java/android/webkit/WebViewFactory.java
27f13de12bc73aed4328866ffa9fb9c394b72f7e 05-Jan-2016 Gustav Sennton <gsennton@google.com> Fix WebView loading logic to allow changing provider if current disabled

Add an XML tag declaring whether a package can be used without
explicitly being chosen by the user (it is available-by-default).

Change the WebView loading logic to either
1. load a user-chosen and enabled package or
2. load an enabled and available-by-default package or
3. any package that is valid

Bug: 26400585
Change-Id: I8de253c1687e3cc7961184c2d770d4e385d6187a
/frameworks/base/core/java/android/webkit/WebViewFactory.java
5c2454cde182118a3619e905b8add2c21e14070d 17-Dec-2015 Gustav Sennton <gsennton@google.com> Allow several valid signatures per WebView provider.

If one of the signatures match the package signature the package is
considered valid. This makes it possible to match signatures in user
builds for both signed and unsigned builds.

Bug: 26220882

Change-Id: Ie2e7567bf518d4859d68b5fdf5b9833fcdaa7670
/frameworks/base/core/java/android/webkit/WebViewFactory.java
6258dcd7ea5450726bc7bcb1fbd50e99f62f38fb 30-Oct-2015 Gustav Sennton <gsennton@google.com> Add functionality for changing WebView provider.

Make it possible to change WebView provider (through a Developer
setting) and kill all apps using the old provider.
This includes checking the signatures of the WebView providers to make
sure they are valid.

Now that we can change WebView provider through a setting it is possible
to change provider while some provider is being updated. Because of this
we now keep track of which provider should be in use in
WebViewUpdateService to make sure we use the correct provider at all
times.

We now also read WebView package meta data (name, package name, and
signature) from a separate xml file.

Main bug: crbug.com/546185

Bug: 25338573

Change-Id: I660fd1a40a5388f6569a06a7f0d029e8ff65945a
/frameworks/base/core/java/android/webkit/WebViewFactory.java
dd337646a92a6da6feba2704f3ed56fb583d9669 05-Nov-2015 Tao Bai <michaelbai@google.com> Using addAssetPathAsSharedLibrary to load asset.

This will alllow framework to overrdie the resource id even the
package resource is app.

Change-Id: I176166e7c51ceb5e84101deb3f467a826f484251
/frameworks/base/core/java/android/webkit/WebViewFactory.java
6ce92c9362143d2f5b4a52c14520528ef2c1bbd5 23-Oct-2015 Gustav Sennton <gsennton@google.com> Load WebView from one out of a list of packages, reland.

Use a priority list of WebView packages instead of a single package to
determine which package to load WebView from.
This to allow Chrome to provide the WebView implementation.

Change-Id: I71813825cd977a72ff4535a39a97a12565ec8a09
/frameworks/base/core/java/android/webkit/WebViewFactory.java
c52839277b8714d150a9fe276b6ba3fa8a0cbf38 10-Aug-2015 Torne (Richard Coles) <torne@google.com> Close ZipFiles correctly in WebViewFactory.

We weren't closing the ZipFiles created in WebViewFactory to check
inside APKs - use try-with-resources to get them closed automatically.

Bug: 23072621
Change-Id: I11c6b77e960a7d240d19d22240cac177b6ba27b2
/frameworks/base/core/java/android/webkit/WebViewFactory.java
d9730182212b157083321ea4e2209182f1fbb72f 18-Jun-2015 Gustav Sennton <gsennton@google.com> Revert "Load WebView from one out of a list of packages."

This was not a clean revert!

This reverts commit 2ed6fee15c85ff991f64ecfa8c1c4738e0fdf9b6.
We essentially only revert the functionality for going through a list of
WebView package names and picking the first compatible one.
Except for that functionality we also fetched the name of the shared
library from a flag in WebView and made some minor refactoring in the
initial commit, these changes have been left alone in this revert.

Bug: 21893371
Change-Id: Idb2539dc33cc5f9e2894ecd665c23573c6cba9f3
/frameworks/base/core/java/android/webkit/WebViewFactory.java
519919b0d4b9ebeb685ce9f3632078545792e408 11-Jun-2015 Simon Baldwin <simonb@google.com> Make apk entry separator compliant with jar url format

Bug: http://b/21726698
Bug: http://b/8076853
Change-Id: I4106dd82aeb5d7d66c9988be6e8c8726c78ae08c
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b98082dcfb45a82d9b12dbf0d2f88acffe96a1c4 15-May-2015 Simon Baldwin <simonb@google.com> Handle load from APK correctly for shared relro

Update WebViewFactory's shared relro handling so that it operates
correctly where libraries are loaded directly from APK files.

Bug: http://b/20810492
Bug: http://b/8076853
Change-Id: I7887c7c0f235388d6a40c366693563b4876de992
/frameworks/base/core/java/android/webkit/WebViewFactory.java
85edb6c6bff62e163e4490951ec49a958c63fad0 15-Apr-2015 Gustav Sennton <gsennton@google.com> Add system API method for loading webview library from another package.

Add method for loading the shared webview library so that several
packages can make use of it. Also add error codes making it possible
to inspect the reason for failing to load the library.

Change-Id: Ic0833d5d122bae488d380e4e10dd81126bd2358e
/frameworks/base/core/java/android/webkit/WebViewFactory.java
a8366e78b58aeb392a9dcc7301183e881d99c783 17-Apr-2015 Gustav Sennton <gsennton@google.com> Fix loading of null webview if there is no webview package.

In the change in go/ag/672863 we throw an AndroidRuntimeException
instead of a PackageManager.NameNotFoundException when no webview
package exists. This should break devices not using webview since
the NameNotFoundException is used to detect webview not being present
(so that the null webview can be loaded instead). In this patch we
create a new type of exception and look for that one instead when we
want to determine whether the device should or should not have webview
installed.

Change-Id: Ia75dec718d7a5b2c3517671c54be3950badb8bba
/frameworks/base/core/java/android/webkit/WebViewFactory.java
2ed6fee15c85ff991f64ecfa8c1c4738e0fdf9b6 03-Mar-2015 Gustav Sennton <gsennton@google.com> Load WebView from one out of a list of packages.

Use a priority list of WebView packages instead of a single package to
determine which package to load WebView from.
This to allow a future version of Chrome to provide the WebView
implementation.

Change-Id: I42e900f0e63152188ebfcff9e39e0d9a99bc6c90
/frameworks/base/core/java/android/webkit/WebViewFactory.java
9915eb56fedc32c9a22d0e46b4cc9b3846da0642 14-Apr-2015 Gustav Sennton <gsennton@google.com> Revert "Load WebView from one out of a list of packages."

This reverts commit fe320b2fe95fc3a7aa95ca4171f8703369a54867.
We need to check in a new Webview APK first.

Change-Id: Ica6adef7a1e68c06b4c6a6a3c851f40f56b006ef
/frameworks/base/core/java/android/webkit/WebViewFactory.java
fe320b2fe95fc3a7aa95ca4171f8703369a54867 03-Mar-2015 Gustav Sennton <gsennton@google.com> Load WebView from one out of a list of packages.

Use a priority list of WebView packages instead of a single package to
determine which package to load WebView from.
This to allow a future version of Chrome to provide the WebView
implementation.

Change-Id: Id63a31396c8c0afbfd250f43a256ccd5981f7a56
/frameworks/base/core/java/android/webkit/WebViewFactory.java
03c76e2b55e25fc22b8024124470e486b932c283 27-Nov-2014 Ignacio Solla <igsolla@google.com> Merge "[WebView] Remove fallback call to WebViewFactoryProvider no-arg constructor."
27936ad3a677509fab1174c7b6655c894f018143 14-Nov-2014 Jeff Sharkey <jsharkey@android.com> Merge "Block loading WebView in privileged processes." into lmp-mr1-dev
85844916b8a7cc7f6aabc6c37af7380a4c000bcb 14-Nov-2014 Jeff Sharkey <jsharkey@android.com> Block loading WebView in privileged processes.

WebView is very powerful, but it also has a large attack area. To
improve security, refuse to load WebView components when running as
the root or system UIDs.

Bug: 18376908
Change-Id: I515b819033586076b1a9668023bb43ee0295d003
/frameworks/base/core/java/android/webkit/WebViewFactory.java
1ea39b350c2a1c2595ab3b7c4ba3ab8a3b029315 10-Nov-2014 Ignacio Solla <igsolla@google.com> [WebView] Remove fallback call to WebViewFactoryProvider no-arg constructor.

This change depends on 584201, in which the NullWebViewFactoryProvider constructor
is replaced with a version taking a WebViewDelegate as an arg.

BUG:18152150
Change-Id: I6c1e3f31a9de46dc12058328abead9c0ba2d376e
/frameworks/base/core/java/android/webkit/WebViewFactory.java
451e338c51e8c45efc0d21536dfae6f78f6d5e06 10-Nov-2014 Ignacio Solla <igsolla@google.com> [WebView] Allow the WebView to be compiled against the system SDK.

BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
/frameworks/base/core/java/android/webkit/WebViewFactory.java
94ef789f0cf0387df20c2c602857ada1e5abfdd6 29-Oct-2014 Ignacio Solla <igsolla@google.com> [WebView] Interface to access hidden APIs.

The WeView provider implementation needs access to
these APIs to implement the WebView functionality.

BUG:18152150

Change-Id: I6b41c623b1e8a776dcee8977d0d17259cb4b34f1
/frameworks/base/core/java/android/webkit/WebViewFactory.java
84392d74fef177a87bc96a255761daf39569e726 14-Aug-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
3822882b32d9b1b803aaff9b657a91d680f1d0f9 13-Aug-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
27cb0d22a839f9fc132ae6b4e7c059c75a1826e1 08-Aug-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
0606cd572ad345fb2c40456509feac626c68dee3 05-Aug-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
5f3278ba1e7572d4a5624d18fd08ba9038abc575 04-Aug-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
e76e81a227a29db5223d231ec88ecb02fa4d6835 29-Jul-2014 Primiano Tucci <primiano@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
5651fc2feeed3af1bd0991e32788a8936d698811 30-Jul-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
5ced502fba5a69dc1d2e55b3d7e5fd429280d6ae 28-Jul-2014 Ben Murdoch <benm@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
161536b5970ba5ab43233e7695ef69ba2bb804f4 28-Jul-2014 Primiano Tucci <primiano@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
1b7977b608cd07366a1708aba36d48203f85bbbd 25-Jul-2014 Primiano Tucci <primiano@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
63d3d8a458cfc124ebd183994d3d152d3b06c1d8 22-Jul-2014 Marcin Kosiba <mkosiba@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
810c052d9b117217152c2a609ccec056a2a61d1e 25-Jul-2014 Primiano Tucci <primiano@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
6c778cebc73e7eb76510f6e2183d804b8c07082b 17-Jul-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
64fb02956b8e6835c87e24a2b5d3947ac626a4bd 28-Jul-2014 Ben Murdoch <benm@google.com> Revert "Load the WebView Java code from an APK." DO NOT MERGE

This reverts commit 72618c3363c83f2668dab4495b100a61d6d8700a.

Bug: 16448724
/frameworks/base/core/java/android/webkit/WebViewFactory.java
8b4cd92852c99ff4cdf062afd2b9f5a20c685e3e 17-Jul-2014 Torne (Richard Coles) <torne@google.com> Load the WebView Java code from an APK.

Use the WebView APK to load the Java code via createPackageContext.

Bug: 16329371
Change-Id: I1292edab639d85c2027dc8ebb52def8c36d41cde
/frameworks/base/core/java/android/webkit/WebViewFactory.java
dc00a84af15ff3594a6dfa512be21095bf9fee82 17-Jul-2014 Ben Murdoch <benm@google.com> Update WebViewUpdateService to receive PACKAGE_REPLACED broadcast.

This allows the WebViewUpdateService to receive notifications that
an update has been installed and we need to trigger recreation of
the relro file.

bug: 16329377
Change-Id: I088e61487416add997995db304beca0cde71390c
/frameworks/base/core/java/android/webkit/WebViewFactory.java
08cfaf672604422dd355d6703aec78f3aa5ee74e 08-May-2014 Torne (Richard Coles) <torne@google.com> Use the WebView's loader library to load the real library.

Load libwebviewchromiumloader and use it to load the real WebView
library, to enable sharing of the relro segment between different
application processes without requiring that the library be preloaded in
the zygote. A system service is added to track whether the relro segment
file has been prepared, and block loading of the library until it has
been.

Bug: 13005501
Change-Id: I846b37c7b8e2a4eb8a39e4fd455bccbb2048c173
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b5de924fad4f9dcd4d8137c0e6a17a41c32bc22a 02-May-2014 Torne (Richard Coles) <torne@google.com> 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
/frameworks/base/core/java/android/webkit/WebViewFactory.java
73f328953a764eb2b4ef55da6fbc8e3125fd2244 19-May-2014 Ben Murdoch <benm@google.com> am 4088970d: am 3011fc1a: Merge "Fallback to NullWebView when Chromium WebView not present." into klp-modular-dev

* commit '4088970dce354f53911f78084a32cb78af45baaf':
Fallback to NullWebView when Chromium WebView not present.
0e04bcfbdc1845c931b45b3498aef438b944e961 16-May-2014 Ben Murdoch <benm@google.com> Fallback to NullWebView when Chromium WebView not present.

If it's not possible to load the Chromium WebView, fallback to loading
the NullWebView that will throw UnsupportedOperationException.

Bug: 13438487
Change-Id: If44b8b7a569c2f8e0e8bba7e6953288802d1c9e0
/frameworks/base/core/java/android/webkit/WebViewFactory.java
2bfd9839aa04265e3c170b1743c08001a2d9313b 09-May-2014 Selim Gurun <sgurun@google.com> Cleanup remainings of old webview.

Cleanup some code that remained from old webview.

Change-Id: I7b654a40284ff88a0a42c7407ad0b2499000f77d
/frameworks/base/core/java/android/webkit/WebViewFactory.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/core/java/android/webkit/WebViewFactory.java
d892afc88d3c67a7fe1c9550bfa7a452051d031d 14-Oct-2013 Torne (Richard Coles) <torne@google.com> Remove support for switching WebView.

WebViewFactory remains as an abstraction layer, but will now always
creates Chromium WebView instances.

Bug: 10427705
Change-Id: I045e43eb35462567fecd29d04e7b61902baef547
/frameworks/base/core/java/android/webkit/WebViewFactory.java
be706eb1c1107f3aba0797c657ecbed56463c4cf 12-Sep-2013 Jonathan Dixon <joth@google.com> Hide Experimental WebView from dev settings DO NOT MERGE

Bug 10427705

The persist.webview system property is no longer needed, so removed too.

Change-Id: I8f02736469464b52636f3d59ec8537d11766d39f
/frameworks/base/core/java/android/webkit/WebViewFactory.java
dc1573595ca6d8b362c3ce0883a35069d2b08f13 16-Sep-2013 Jonathan Dixon <joth@google.com> Revert "Hide Experimental WebView from dev settings" DO NOT MERGE

Bug 10769282

Reverting temporary patch required for factory rom.

This reverts commit 292fd0351be8f414cbe32a7eb322bd18158685d9.
/frameworks/base/core/java/android/webkit/WebViewFactory.java
3d458ab91604cdfd6e6acec5c4164f543aa40908 12-Sep-2013 Jonathan Dixon <joth@google.com> Hide Experimental WebView from dev settings DO NOT MERGE

Bug 10427705

The persist.webview system property is no longer needed, so removed too.

Change-Id: I99bbf2e9b9ec42f282339c72509fd99b18594ebf
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b7d5cbc0073e37e6bcb1e496aefb829babde6931 21-Aug-2013 Jonathan Dixon <joth@google.com> Reset the Experimental WebView property per build

In order to increase test coverage, reset to the default value everytime
the build ID changes.

Bug: 10427705
Change-Id: I75e301d26ee0ca52265c5f7fe48661787b596168
/frameworks/base/core/java/android/webkit/WebViewFactory.java
74c8f51220f78e105545ad14cd2a85b1360f03cf 01-Aug-2013 Ben Murdoch <benm@google.com> Revert "Revert "Flag-flip: set chromium to be the default WebView""

Turn the flag back on.

This reverts commit c9f10b6be981ed4b0c4b2f0e2409d0626a3d4016.

Change-Id: I1a77bdf7f59a6868fd8ab30687062f34fc914bc6
/frameworks/base/core/java/android/webkit/WebViewFactory.java
c9f10b6be981ed4b0c4b2f0e2409d0626a3d4016 31-Jul-2013 Ben Murdoch <benm@google.com> Revert "Flag-flip: set chromium to be the default WebView"

We need to wait until GMail corruption fix is in.

This reverts commit 6716bd3375c647f43a1c332a0d1b027223611610.

Change-Id: Ie3c335e18901d24d878f81fb76b7065520fa32e5
/frameworks/base/core/java/android/webkit/WebViewFactory.java
6716bd3375c647f43a1c332a0d1b027223611610 30-Jul-2013 Jonathan Dixon <joth@google.com> Flag-flip: set chromium to be the default WebView

For now, can still be disabled in Developer Settings.

Change-Id: Id871d1e232de7b3c7be42c7734f2bb83dc526b32
/frameworks/base/core/java/android/webkit/WebViewFactory.java
dad2c6e3fad7e324affbe5a78f704f9b820632cd 31-Jul-2013 Jonathan Dixon <joth@google.com> Merge "Add some logging when the webview dev setting changes"
cb64bb4b1692fba231bf970f19210aefa024cfba 31-Jul-2013 Jonathan Dixon <joth@google.com> Add some logging when the webview dev setting changes

Bug: 9773865

This will not be visible in shipping config, so shouldn't be a major
source of log spam.

Change-Id: If09734b70e59aeab87c6dddee72212aa6748505f
/frameworks/base/core/java/android/webkit/WebViewFactory.java
09397ba3d5a25fd0a2ed8e315a82b5df694c5c9a 30-Jul-2013 Jonathan Dixon <joth@google.com> Make WebViewProvider constants private

In preperation for DEFAULT_TO_EXPERIMENTAL_WEBVIEW flag-flip, make this
field and WEBVIEW_EXPERIMENTAL_PROPERTY private so we know all users are
querying the property in a consistent way.

Change-Id: Iabaffb8ac5a34e323b170339d47f872eb4c83042
/frameworks/base/core/java/android/webkit/WebViewFactory.java
d8501485e30c1184292f15349b9e439343ff5b60 29-Jul-2013 Jonathan Dixon <joth@google.com> Build fix for WebViewFactory

Make fields public again until users are no longer using them

Change-Id: I27d06ca8478f5ba44940e8ce15d65df97cbbb5f1
/frameworks/base/core/java/android/webkit/WebViewFactory.java
a7eaa8ee222611c28f050158db4b68c4d893a8a9 26-Jul-2013 Jonathan Dixon <joth@google.com> Add accessors for WebViewFactory.UseExperimentalWebView

In preperation for flag-flip, have Settings app access the current
state via methods that are neutral to the on/off state.
Also setup the property to change name when enabled by default, to reset
any user changes to this setting.

Change-Id: I55017bcd89573c1ecac7de8913264d9cf66fdcd9
/frameworks/base/core/java/android/webkit/WebViewFactory.java
03ce9b3e69f1eec85e7e7cbfd65bb9093e74cea8 12-Jun-2013 Torne (Richard Coles) <torne@google.com> Enable preloading of the appropriate WebView.

Allow the appropriate WebView to be preloaded in the zygote by
constructing the currently selected WebViewFactoryProvider when the
WebViewFactory is preloaded. At runtime, if the preloaded provider is
still the current selection, the preloaded instance is used, otherwise
the provider is loaded at that time.

This change also removes "graceful" fallback from the experimental
WebView to the classic implementation: if the option to use the
experimental WebView is selected and it could not be loaded
successfully at the time a WebView is created, an exception will be
thrown, rather than allowing execution to continue with the classic
implementation, as the fallback may mislead developers who do not
examine logcat output in detail.

Change-Id: I0cd01c784d7048abeac55ab5863ca16b8fd9ecf2
/frameworks/base/core/java/android/webkit/WebViewFactory.java
eb665d66bac9aa3d7bf1834cfda6c886f721b157 17-May-2013 Primiano Tucci <primiano@google.com> Deprecate webview.use_chromium and introduce webview.force_provider.

The new webview.force_provider property, when set, enforces the use
of Chromium or classic WebView, regardless the value of the
persist.sys.webview.exp (accessible through the settings UI).
This will help telemetry tests to run correctly regardless of UI
settings.

Change-Id: Ica5a0faa7f7539c22332cac5a8946f11fb7df6b2
/frameworks/base/core/java/android/webkit/WebViewFactory.java
eb07f3cad0e3b03c7a303e87039e3a8d27b5d44d 04-Jun-2013 Torne (Richard Coles) <torne@google.com> WebViewChromium: don't use a separate class loader.

Use the ordinary system class loader to load the Chromium-based WebView
implementation classes now that the implementation .jar is part of the
boot class path. Instead of checking for the .jar file's existence, just
check to see if we can load the class to determine whether the new
WebView is available.

This also removes the check for Build.IS_DEBUGGABLE; the Chromium-based
WebView will now be available in user builds if enabled in the developer
options.

Change-Id: I06bae9b91656aa41b09c0e6f63f90736db993418
/frameworks/base/core/java/android/webkit/WebViewFactory.java
b0e35846b818bdf0db9cafe881a8a535116d596e 20-Mar-2013 Jared Duke <jdduke@google.com> Adding new Chomium-WebView property key, and deprecating old key.

Also adding isExperimentalWebViewAvailable(), which is required to show/hide the corresponding setting in Developer Options.

BUG=8383477

Change-Id: I82608cb4a3c7a85c3ad9091365913df5f2663f9c
/frameworks/base/core/java/android/webkit/WebViewFactory.java
a9bbd9439c3043bd76a7474e6dca3c8131b1b258 24-Oct-2012 Torne (Richard Coles) <torne@google.com> Rename Chromium-powered WebView package.

The Chromium-powered WebView package has been renamed from
com.android.webviewchromium to com.android.webview.chromium. Reflect
this renaming in the factory.

Change-Id: I64ba2b54c52aad8f10eef68d12366ce9be09b9c8
/frameworks/base/core/java/android/webkit/WebViewFactory.java
9f9d34552f53c534141584a5ad4a8a49ad7939dc 20-Sep-2012 John Reck <jreck@google.com> Use less static synchronized

Bug: 6482144

Change-Id: I86161e3298101c10a112add406615001561e649e
/frameworks/base/core/java/android/webkit/WebViewFactory.java
e09e976dad1d974ca28381451b0bbbeafbb872d5 19-Jul-2012 Ben Murdoch <benm@google.com> Allow switching to the Chromium WebViewFactoryProvider at runtime.

Currently, WebViewFactory is hardcoded to always load
android.webkit.WebViewClassic$Factory. This change allows us to
load the Chromium powered WebView by setting the
"webview.use_chromium" system propery to true.

Change-Id: Icebfc4d5c4a61230c5e5dccac1ec5eca59f650ac
/frameworks/base/core/java/android/webkit/WebViewFactory.java
d3101b1d300f5942fdb7dfa323dc8830c4edc007 12-Apr-2012 Jonathan Dixon <joth@google.com> Seperate interface and implementation of 4 WebView classes

GeolocationPermissionsClassic
CookieManagerClassic
WebIconDatabaseClassic
WebStorageClassic

Also creats a WebViewFactory top level class - this remains hidden
for now, as it's currently only used implicitly by the other
public WebView classes to create the provider instances.

Bug: 5626244

Change-Id: Id0ca1c16d8058f31a86414bbc0e8a55db4b907ba
/frameworks/base/core/java/android/webkit/WebViewFactory.java