Move SharedPreferences code to its own class.
Bug: 251502424 Test: Code compiled correctly. Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
This commit is contained in:
@@ -59,8 +59,8 @@ import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.config.FlagTogglerPrefUi;
|
||||
import com.android.launcher3.secondarydisplay.SecondaryDisplayLauncher;
|
||||
@@ -392,7 +392,8 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat {
|
||||
onboardingPref.setTitle(title);
|
||||
onboardingPref.setSummary("Tap to reset");
|
||||
onboardingPref.setOnPreferenceClickListener(preference -> {
|
||||
SharedPreferences.Editor sharedPrefsEdit = Utilities.getPrefs(getContext()).edit();
|
||||
SharedPreferences.Editor sharedPrefsEdit = LauncherPrefs.getPrefs(getContext())
|
||||
.edit();
|
||||
for (String key : keys) {
|
||||
sharedPrefsEdit.remove(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user