OSDN Git Service

Support using uninstalled WebView packages as WebView implementation.
authorGustav Sennton <gsennton@google.com>
Tue, 14 Jun 2016 14:32:19 +0000 (15:32 +0100)
committerGustav Sennton <gsennton@google.com>
Thu, 16 Jun 2016 14:45:45 +0000 (15:45 +0100)
commit0df2c5566a9d7d71ca84cb072114f051bbe7a344
tree5bea704533281c61bc3b9bc99771a2520ca83a24
parent7ce75172ddb1c6535bdf3f7f7bc84f65d681e958
Support using uninstalled WebView packages as WebView implementation.

A package can be uninstalled for the system user but still be installed
on the device. Currently, we do not use such a package as WebView
implementation which means we fall back to using the fallback WebView
package.
However, if the fallback package is not valid (because it needs to be
updated first) loading WebView will fail.

With this change we fetch allow the fetching of information from
packages that are uninstalled for the system user so that we can still
load WebView when the only valid WebView provider is uninstalled for the
system user.

Also listen to package additions/changes/removals for all users -
otherwise we won't notice when a package becomes replaced if it was
already uninstalled for the system user.

Bug: 29321185
Change-Id: Ia23c4493844877aea1b4eab7e666fd37540c4f97
services/core/java/com/android/server/webkit/SystemImpl.java
services/core/java/com/android/server/webkit/WebViewUpdateService.java
services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java