diff options
Diffstat (limited to 'src/com/android/launcher2/LauncherApplication.java')
-rw-r--r-- | src/com/android/launcher2/LauncherApplication.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java index a72e53a21..183dbf571 100644 --- a/src/com/android/launcher2/LauncherApplication.java +++ b/src/com/android/launcher2/LauncherApplication.java @@ -25,11 +25,8 @@ import android.os.Handler; import dalvik.system.VMRuntime; public class LauncherApplication extends Application { - public final LauncherModel mModel; - - public LauncherApplication() { - mModel = new LauncherModel(this); - } + public LauncherModel mModel; + public IconCache mIconCache; @Override public void onCreate() { @@ -37,6 +34,9 @@ public class LauncherApplication extends Application { super.onCreate(); + mIconCache = new IconCache(this); + mModel = new LauncherModel(this, mIconCache); + // Register intent receivers IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); filter.addAction(Intent.ACTION_PACKAGE_REMOVED); @@ -79,4 +79,12 @@ public class LauncherApplication extends Application { mModel.initialize(launcher); return mModel; } + + IconCache getIconCache() { + return mIconCache; + } + + LauncherModel getModel() { + return mModel; + } } |