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

Commit 90b38a9e authored by Gustav Sennton's avatar Gustav Sennton
Browse files

Reenable Strictmode disk reads checks in WebViewFactory.

In an earlier release we had to allow disk reads during a part of
WebView initialization, now that this fault is fixed we can remove that
allowance.

Bug: 63324842
Test: Manual: ensure calling new WebView() doesn't cause StrictMode disk
read violation.
Test: run WebViewHostSideStartupTest.testStrictMode()

Change-Id: If7b4ad790c67469806c255427d86e5fd28d19f35
parent dc4cb146
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StrictMode;
import android.os.Trace;
import android.util.AndroidRuntimeException;
import android.util.ArraySet;
@@ -251,7 +250,6 @@ public final class WebViewFactory {
                        "WebView.disableWebView() was called: WebView is disabled");
            }

            StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
            Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "WebViewFactory.getProvider()");
            try {
                Class<WebViewFactoryProvider> providerClass = getProviderClass();
@@ -279,7 +277,6 @@ public final class WebViewFactory {
                }
            } finally {
                Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
                StrictMode.setThreadPolicy(oldPolicy);
            }
        }
    }