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

Commit 09397ba3 authored by Jonathan Dixon's avatar Jonathan Dixon
Browse files

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
parent d8501485
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ import android.util.Log;
 * @hide
 */
public final class WebViewFactory {
    public static final boolean DEFAULT_TO_EXPERIMENTAL_WEBVIEW = false;
    private static final boolean DEFAULT_TO_EXPERIMENTAL_WEBVIEW = false;
    private static final String EXPERIMENTAL_PROPERTY_DEFAULT_OFF = "persist.sys.webview.exp";
    private static final String EXPERIMENTAL_PROPERTY_DEFAULT_ON  = "persist.sys.webview.exp_on";

    // Modify the persisted property name when the experiment is on-by-default, so that any user
    // setting override lives in a different property namespace.
    public static final String WEBVIEW_EXPERIMENTAL_PROPERTY = DEFAULT_TO_EXPERIMENTAL_WEBVIEW ?
    private static final String WEBVIEW_EXPERIMENTAL_PROPERTY = DEFAULT_TO_EXPERIMENTAL_WEBVIEW ?
        EXPERIMENTAL_PROPERTY_DEFAULT_ON : EXPERIMENTAL_PROPERTY_DEFAULT_OFF;

    private static final String FORCE_PROVIDER_PROPERTY = "webview.force_provider";
+1 −2
Original line number Diff line number Diff line
@@ -815,8 +815,7 @@ public final class ProcessTracker {
                    mRuntime = runtime;
                }
            }
            String webview = SystemProperties.getBoolean(
                    WebViewFactory.WEBVIEW_EXPERIMENTAL_PROPERTY, false) ? "chromeview" : "webview";
            String webview = WebViewFactory.useExperimentalWebView() ? "chromeview" : "webview";
            if (!Objects.equals(webview, mWebView)) {
                changed = true;
                if (update) {