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

Commit f1df005e authored by Mohit Mali's avatar Mohit Mali
Browse files

Update packages/SettingsProvider/res/values/defaults.xml,...

Update packages/SettingsProvider/res/values/defaults.xml, packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java files
parent 08e064c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@
    <bool name="def_wifi_wakeup_enabled">true</bool>
    <bool name="def_networks_available_notification_on">true</bool>

    <bool name="def_backup_enabled">false</bool>
    <string name="def_backup_transport" translatable="false">android/com.android.internal.backup.LocalTransport</string>
    <bool name="def_backup_enabled">true</bool>
   <string name="def_backup_transport" translatable="false">com.stevesoltys.seedvault.transport.ConfigurableBackupTransport</string>

    <!-- Default value for whether or not to pulse the notification LED when there is a
         pending notification -->
+30 −1
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.os.UserManagerInternal;
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.provider.Settings.Global;
import android.text.TextUtils;
import android.util.ArrayMap;
@@ -2890,7 +2891,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 148;
            private static final int SETTINGS_VERSION = 149;

            private final int mUserId;

@@ -3471,6 +3472,34 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 148;
                }

                if (currentVersion == 148) {
                    // Version 187: Update default Backup app to Seedvault
                    final SettingsState secureSettings = getSecureSettingsLocked(userId);
                    Setting currentBackupTransportSetting = secureSettings.getSettingLocked(
                            Secure.BACKUP_TRANSPORT);
                    if (currentBackupTransportSetting.isDefaultFromSystem()) {
                        secureSettings.insertSettingLocked(
                                Settings.Secure.BACKUP_TRANSPORT,
                                getContext().getResources().getString(
                                        R.string.def_backup_transport),
                                null, true,
                                SettingsState.SYSTEM_PACKAGE_NAME);
                    }

                    Setting currentBackupEnabledSetting = secureSettings.getSettingLocked(
                            Secure.BACKUP_ENABLED);
                    if (currentBackupEnabledSetting.isDefaultFromSystem()) {
                        secureSettings.insertSettingLocked(
                                Settings.Secure.BACKUP_ENABLED,
                                getContext().getResources().getBoolean(
                                        R.bool.def_backup_enabled)? "1" : "0",
                                null, true,
                                SettingsState.SYSTEM_PACKAGE_NAME);
                    }
                    currentVersion = 149;
                }


                // vXXX: Add new settings above this point.

                if (currentVersion != newVersion) {