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

Commit efd9c181 authored by Ruslan Tkhakokhov's avatar Ruslan Tkhakokhov
Browse files

Fix flag check for preserve settings feature

getApplicationContext() returns null when calling to get Context object
to pass to FeatureFlagUtils.isEnabled(). Replace with getBaseContext()

Test: Verify the context is not null through logs
Change-Id: I0c27c5bc09e3fc84abeafb0a4ead3357cacc3d2a
parent 2b1f4315
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
     * Get names of the settings for which the current value should be preserved during restore.
     */
    private Set<String> getSettingsToPreserveInRestore(Uri settingsUri) {
        if (!FeatureFlagUtils.isEnabled(getApplicationContext(),
        if (!FeatureFlagUtils.isEnabled(getBaseContext(),
                FeatureFlagUtils.SETTINGS_DO_NOT_RESTORE_PRESERVED)) {
            return Collections.emptySet();
        }