summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 469c5f1c0..35bf9e9ee 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -16,6 +16,9 @@
package com.android.launcher3;
+import static com.android.launcher3.LauncherAppState.ACTION_FORCE_ROLOAD;
+import static com.android.launcher3.config.FeatureFlags.IS_DOGFOOD_BUILD;
+
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentProviderOperation;
@@ -37,6 +40,7 @@ import android.util.Pair;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.compat.PackageInstallerCompat.PackageInstallInfo;
import com.android.launcher3.compat.UserManagerCompat;
+import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.graphics.LauncherIcons;
import com.android.launcher3.model.AddWorkspaceItemsTask;
import com.android.launcher3.model.BgDataModel;
@@ -135,7 +139,6 @@ public class LauncherModel extends BroadcastReceiver
};
public interface Callbacks {
- public boolean setLoadOnResume();
public int getCurrentWorkspaceScreen();
public void clearPendingBinds();
public void startBinding();
@@ -405,6 +408,8 @@ public class LauncherModel extends BroadcastReceiver
enqueueModelUpdateTask(new UserLockStateChangedTask(user));
}
}
+ } else if (IS_DOGFOOD_BUILD && ACTION_FORCE_ROLOAD.equals(action)) {
+ forceReload();
}
}
@@ -419,25 +424,11 @@ public class LauncherModel extends BroadcastReceiver
mModelLoaded = false;
}
- // Do this here because if the launcher activity is running it will be restarted.
- // If it's not running startLoaderFromBackground will merely tell it that it needs
- // to reload.
- startLoaderFromBackground();
- }
-
- /**
- * When the launcher is in the background, it's possible for it to miss paired
- * configuration changes. So whenever we trigger the loader from the background
- * tell the launcher that it needs to re-run the loader when it comes back instead
- * of doing it now.
- */
- public void startLoaderFromBackground() {
+ // Start the loader if launcher is already running, otherwise the loader will run,
+ // the next time launcher starts
Callbacks callbacks = getCallback();
if (callbacks != null) {
- // Only actually run the loader if they're not paused.
- if (!callbacks.setLoadOnResume()) {
- startLoader(callbacks.getCurrentWorkspaceScreen());
- }
+ startLoader(callbacks.getCurrentWorkspaceScreen());
}
}