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

Commit 725c7b9d authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

Remove WebView fallback logic migration code.

The WebView fallback mechanism was removed in Q and replaced with code
to migrate the state of upgraded devices to the new configuration. This
is no longer necessary; remove the logic to simplify the code.

The notion of a WebView provider being designated as the fallback is
kept, as this is still used by the code which checks if there is no
valid provider at all at boot time and tries to fix the situation by
re-enabling the fallback provider for all users - this was added for
b/132815849 and should suffice for any devices which haven't executed
the fallback migration code.

Bug: 129470358
Test: atest WebViewUpdateServiceTest
Change-Id: I4de777b650fb793903f6df74a7ff639190d8b0a9
parent ca7e318b
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -10442,14 +10442,6 @@ public final class Settings {
        public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY =
                "webview_data_reduction_proxy_key";
       /**
        * Whether or not the WebView fallback mechanism should be enabled.
        * 0=disabled, 1=enabled.
        * @hide
        */
       public static final String WEBVIEW_FALLBACK_LOGIC_ENABLED =
               "webview_fallback_logic_enabled";
       /**
        * Name of the package used as WebView provider (if unset the provider is instead determined
        * by the system).
+0 −3
Original line number Diff line number Diff line
@@ -1493,9 +1493,6 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
                GlobalSettingsProto.Webview.DATA_REDUCTION_PROXY_KEY);
        dumpSetting(s, p,
                Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED,
                GlobalSettingsProto.Webview.FALLBACK_LOGIC_ENABLED);
        dumpSetting(s, p,
                Settings.Global.WEBVIEW_PROVIDER,
                GlobalSettingsProto.Webview.PROVIDER);
+0 −1
Original line number Diff line number Diff line
@@ -524,7 +524,6 @@ public class SettingsBackupTest {
                    Settings.Global.NETWORK_ACCESS_TIMEOUT_MS,
                    Settings.Global.WARNING_TEMPERATURE,
                    Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
                    Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED,
                    Settings.Global.WEBVIEW_MULTIPROCESS,
                    Settings.Global.WEBVIEW_PROVIDER,
                    Settings.Global.WFC_IMS_ENABLED,
+0 −13
Original line number Diff line number Diff line
@@ -196,19 +196,6 @@ public class SystemImpl implements SystemInterface {
        }
    }

    @Override
    public boolean isFallbackLogicEnabled() {
        // Note that this is enabled by default (i.e. if the setting hasn't been set).
        return Settings.Global.getInt(AppGlobals.getInitialApplication().getContentResolver(),
                Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED, 1) == 1;
    }

    @Override
    public void enableFallbackLogic(boolean enable) {
        Settings.Global.putInt(AppGlobals.getInitialApplication().getContentResolver(),
                Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED, enable ? 1 : 0);
    }

    @Override
    public void enablePackageForAllUsers(Context context, String packageName, boolean enable) {
        UserManager userManager = (UserManager)context.getSystemService(Context.USER_SERVICE);
+0 −3
Original line number Diff line number Diff line
@@ -41,9 +41,6 @@ public interface SystemInterface {
    public void updateUserSetting(Context context, String newProviderName);
    public void killPackageDependents(String packageName);

    public boolean isFallbackLogicEnabled();
    public void enableFallbackLogic(boolean enable);

    public void enablePackageForAllUsers(Context context, String packageName, boolean enable);

    public boolean systemIsDebuggable();
Loading