mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 00:36:49 +00:00
Permanently provide functionality for LauncherPref items that don't need
to be migrated, but are boot aware. Bug: 251502424 Test: Tested that Migration works as expected, as well as shared preference information that doesn't need to be migrated. Also sanity tested phone in general. Change-Id: Ie8460e360856cbe20a7770b1747f75c7154759ab
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN;
|
||||
import static com.android.launcher3.LauncherPrefs.SHOULD_SHOW_SMARTSPACE;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.TABLE_NAME;
|
||||
import static com.android.launcher3.config.FeatureFlags.SMARTSPACE_AS_A_WIDGET;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_HAS_SHORTCUT_PERMISSION;
|
||||
@@ -299,28 +300,17 @@ public class LoaderTask implements Runnable {
|
||||
logASplit("bindWidgets");
|
||||
verifyNotStopped();
|
||||
|
||||
if (SMARTSPACE_AS_A_WIDGET.get() && LauncherPrefs.get(mApp.getContext())
|
||||
.get(LauncherPrefs.SHOULD_SHOW_SMARTSPACE)) {
|
||||
LauncherPrefs prefs = LauncherPrefs.get(mApp.getContext());
|
||||
if (SMARTSPACE_AS_A_WIDGET.get() && prefs.get(SHOULD_SHOW_SMARTSPACE)) {
|
||||
mLauncherBinder.bindSmartspaceWidget();
|
||||
// Turn off pref.
|
||||
LauncherPrefs.get(mApp.getContext()).putSync(
|
||||
LauncherPrefs.backedUpItem(
|
||||
LauncherPrefs.SHOULD_SHOW_SMARTSPACE_KEY,
|
||||
WIDGET_ON_FIRST_SCREEN,
|
||||
true)
|
||||
.to(false));
|
||||
prefs.putSync(SHOULD_SHOW_SMARTSPACE.to(false));
|
||||
logASplit("bindSmartspaceWidget");
|
||||
verifyNotStopped();
|
||||
} else if (!SMARTSPACE_AS_A_WIDGET.get() && WIDGET_ON_FIRST_SCREEN
|
||||
&& !LauncherPrefs.get(mApp.getContext())
|
||||
.get(LauncherPrefs.SHOULD_SHOW_SMARTSPACE)) {
|
||||
&& !prefs.get(LauncherPrefs.SHOULD_SHOW_SMARTSPACE)) {
|
||||
// Turn on pref.
|
||||
LauncherPrefs.get(mApp.getContext()).putSync(
|
||||
LauncherPrefs.backedUpItem(
|
||||
LauncherPrefs.SHOULD_SHOW_SMARTSPACE_KEY,
|
||||
WIDGET_ON_FIRST_SCREEN,
|
||||
true)
|
||||
.to(true));
|
||||
prefs.putSync(SHOULD_SHOW_SMARTSPACE.to(true));
|
||||
}
|
||||
|
||||
if (FeatureFlags.CHANGE_MODEL_DELEGATE_LOADING_ORDER.get()) {
|
||||
|
||||
Reference in New Issue
Block a user