0df2c5566a9d7d71ca84cb072114f051bbe7a344 |
|
14-Jun-2016 |
Gustav Sennton <gsennton@google.com> |
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
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
|
95f7e8e06dd0003a813f7a4b3c718c68d0fa4a01 |
|
14-Apr-2016 |
Gustav Sennton <gsennton@google.com> |
Fix the behaviour for explicitly switching WebView provider Before this CL when we tried to change WebView provider through the Dev setting and failed we would then have the setting point to the provider used before the change. With this CL we instead let the setting point to the intended target but also switch to the package which the WebViewUpdateService see as most fit (rather than just reverting back to the original choice). Add unit tests to verify we kill processes depending on WebView packages when switching WebView provider. Add unit tests to ensure we can recover from trying to change provider when there are no providers available. Bug: 27673076 Bug: 27635535 Change-Id: Ie7bb6afdf8acf4344cfb363947929c0b492775fb
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
|
a9159040c86d94f7a3d45bdc7fe6c4ea24f58456 |
|
11-Apr-2016 |
Gustav Sennton <gsennton@google.com> |
Update persistent WebView packages setting only when user changes it. To ensure that we don't permanently change WebView implementation if the current package is temporarily uninstalled (e.g. when being replaced) we don't update our persistent setting unless the user explicitly changes WebView implementation (and on boot!). Unfortunately this will means that the Dev Setting for changing WebView implementation will work in a slightly less intuitive way. The persistent setting is now persistent across uninstalls and installs. I.e. the Dev Setting shows the current WebView implementation though that could differ to the value chosen by the user since the package chosen by the user could be uninstalled or disabled. In this case installing/enabling that package would again make the Dev Setting point to it. However, as a compromise, we do change the setting at boot so that if the currently chosen package is not valid we will change the setting so that it points to the package we currently use instead. Also ensure we only use WebView packages that are available-by-default if no WebView packages are enabled. Add unit test to ensure that if a user-chosen provider is uninstalled we switch back to using that provider when it is installed again. Add unit test to ensure we switch user-chosen provider at boot if the chosen one is uninstalled. Bug: 27673076 Change-Id: Icd27ae302798ebf695b9ef4bd4d5fd47fe4be02c
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
|
53b78241ffc32e61d12afc6245633266e592db88 |
|
07-Apr-2016 |
Gustav Sennton <gsennton@google.com> |
Add initial unit tests for WebViewUpdateService. The logic in the WebViewUpdateService is now more complex and there are lots of edge cases that should be tested to make sure we don't regress anything. Also refrain from running fallback logic on boot if fallback logic not enabled (bug found through a failing test, yeeah buddy!). Catch uncaught MissingWebViewException (very timing-dependent!) and add test for this. Add tests for: Some package setups (single package, non-default vs. default packages, valid vs. invalid packages). Ensure correct error codes used Switching provider through settings-method Switching provider through adding more prioritized provider Switching provider in the middle of already running webview preparation Ensure fallback logic is run when enabled and not run when disabled (at boot, packageStateChanged, and when adding a new user). Bug: 27635535 Change-Id: I275ecb0f6129f71258da0fa053e7f7b36a675886
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
|