Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit feb6cf4a authored by Gustav Sennton's avatar Gustav Sennton Committed by android-build-merger
Browse files

Merge "Remove WebView-fallback code for handling the non-functional stub." into oc-dev

am: fc33499c

Change-Id: Iefa63e6d00a10647457d197c02975442fade34d7
parents e241a3c1 fc33499c
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -315,15 +315,6 @@ class WebViewUpdater {
            }
        }

        // Could not find any installed and enabled package either, use the most stable and
        // default-available provider.
        // TODO(gsennton) remove this when we have a functional WebView stub.
        for (ProviderAndPackageInfo providerAndPackage : providers) {
            if (providerAndPackage.provider.availableByDefault) {
                return providerAndPackage.packageInfo;
            }
        }

        // This should never happen during normal operation (only with modified system images).
        mAnyWebViewInstalled = false;
        throw new WebViewPackageMissingException("Could not find a loadable WebView package");
+5 −8
Original line number Diff line number Diff line
@@ -1219,14 +1219,11 @@ public class WebViewUpdateServiceTest {

        runWebViewBootPreparationOnMainSync();

        checkPreparationPhasesForPackage(testPackageName, 1 /* first preparation phase */);
        // TODO(gsennton) change this logic to use the code below when we have created a functional
        // stub.
        //Mockito.verify(mTestSystemImpl, Mockito.never()).onWebViewProviderChanged(
        //        Matchers.anyObject());
        //WebViewProviderResponse response = mWebViewUpdateServiceImpl.waitForAndGetProvider();
        //assertEquals(WebViewFactory.LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES, response.status);
        //assertEquals(null, mWebViewUpdateServiceImpl.getCurrentWebViewPackage());
        Mockito.verify(mTestSystemImpl, Mockito.never()).onWebViewProviderChanged(
                Matchers.anyObject());
        WebViewProviderResponse response = mWebViewUpdateServiceImpl.waitForAndGetProvider();
        assertEquals(WebViewFactory.LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES, response.status);
        assertEquals(null, mWebViewUpdateServiceImpl.getCurrentWebViewPackage());
    }

    @Test