Move SharedPreferences code to its own class.

Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
This commit is contained in:
Stefan Andonian
2022-11-10 23:07:40 +00:00
parent 698239e16a
commit 146701ca3e
30 changed files with 88 additions and 72 deletions

View File

@@ -30,7 +30,7 @@ import android.os.UserHandle;
import androidx.annotation.NonNull;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.Utilities;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.model.BgDataModel.FixedContainerItems;
import com.android.launcher3.model.QuickstepModelDelegate.PredictorState;
import com.android.launcher3.model.data.AppInfo;
@@ -59,7 +59,7 @@ public class PredictionUpdateTask extends BaseModelUpdateTask {
Context context = app.getContext();
// TODO: remove this
Utilities.getDevicePrefs(context).edit()
LauncherPrefs.getDevicePrefs(context).edit()
.putBoolean(LAST_PREDICTION_ENABLED_STATE, !mTargets.isEmpty()).apply();
Set<UserHandle> usersForChangedShortcuts =