* commit 'ffed6aa2aff57cb6bd03fa7ae1268dcd0f2244e1': Lazy load default app icon in LauncherModel. (Bug 11203738)
This commit is contained in:
@@ -186,9 +186,6 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
mBgAllAppsList = new AllAppsList(iconCache, appFilter);
|
||||
mIconCache = iconCache;
|
||||
|
||||
mDefaultIcon = Utilities.createIconBitmap(
|
||||
mIconCache.getFullResDefaultActivityIcon(), context);
|
||||
|
||||
final Resources res = context.getResources();
|
||||
Configuration config = res.getConfiguration();
|
||||
mPreviousConfigMcc = config.mcc;
|
||||
@@ -400,6 +397,11 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
public Bitmap getFallbackIcon() {
|
||||
if (mDefaultIcon == null) {
|
||||
final Context context = LauncherAppState.getInstance().getContext();
|
||||
mDefaultIcon = Utilities.createIconBitmap(
|
||||
mIconCache.getFullResDefaultActivityIcon(), context);
|
||||
}
|
||||
return Bitmap.createBitmap(mDefaultIcon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user