use of org.adw.launcher2.IconCache in project ADWLauncher2 by boombuler.
the class LauncherApplication method onCreate.
@Override
public void onCreate() {
//VMRuntime.getRuntime().setMinimumHeapSize(4 * 1024 * 1024);
super.onCreate();
mIconCache = new IconCache(this);
mAppDB = new AppDB(this, mIconCache);
mModel = new LauncherModel(this, mIconCache);
// Register intent receivers
IntentFilter filter = new IntentFilter(AppDB.INTENT_DB_CHANGED);
registerReceiver(mModel, filter);
filter = new IntentFilter();
filter.addAction(ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
filter.addAction(ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
registerReceiver(mModel, filter);
// Register for changes to the favorites
ContentResolver resolver = getContentResolver();
resolver.registerContentObserver(LauncherSettings.Favorites.CONTENT_URI, true, mFavoritesObserver);
}
use of org.adw.launcher2.IconCache in project ADWLauncher2 by boombuler.
the class Preferences method getAppNameComparator.
private Comparator<IconItemInfo> getAppNameComparator() {
final IconCache myIconCache = mLauncher.getIconCache();
final Collator sCollator = Collator.getInstance();
return new Comparator<IconItemInfo>() {
@Override
public final int compare(IconItemInfo a, IconItemInfo b) {
return sCollator.compare(a.getTitle(myIconCache), b.getTitle(myIconCache));
}
};
}
Aggregations