Move LauncherApplication's state and code to LauncherAppState.
This removes Launcher's static data and other state out of
the Application object. Now LauncherApplication (extends
Application) exists only to instantiate LauncherAppState.
Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
diff --git a/src/com/android/launcher3/PreloadReceiver.java b/src/com/android/launcher3/PreloadReceiver.java
index ee34348..4c9032f 100644
--- a/src/com/android/launcher3/PreloadReceiver.java
+++ b/src/com/android/launcher3/PreloadReceiver.java
@@ -31,7 +31,7 @@
@Override
public void onReceive(Context context, Intent intent) {
- final LauncherApplication app = (LauncherApplication) context.getApplicationContext();
+ final LauncherAppState app = LauncherAppState.getInstance();
final LauncherProvider provider = app.getLauncherProvider();
if (provider != null) {
String name = intent.getStringExtra(EXTRA_WORKSPACE_NAME);