mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Split ApplicationInfo into ApplicationInfo which is used for AllAppsView and ShortcutInfo which is
used for the workspace. Consolidate the three icon resampling functions into one. Ensure that the icons stored in LauncherProvider are the right size, so we don't have to resample them each time we load them.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user