Cancelling launcher reload on mcc change

Bug: 21022833
Change-Id: Iccd477e7b1638d162e1a500cdb7a52b8d359c657
This commit is contained in:
Sunny Goyal
2015-06-18 13:56:59 -07:00
parent 230eade4a3
commit 2003c75ac4
3 changed files with 4 additions and 26 deletions

View File

@@ -219,7 +219,7 @@ public class IconCache {
// Remove all active icon update tasks.
mWorkerHandler.removeCallbacksAndMessages(ICON_UPDATE_TOKEN);
mIconDb.updateSystemStateString(mContext);
mIconDb.updateSystemStateString();
for (UserHandleCompat user : mUserManager.getUserProfiles()) {
// Query for the set of apps
final List<LauncherActivityInfoCompat> apps = mLauncherApps.getActivityList(null, user);
@@ -756,15 +756,13 @@ public class IconCache {
public IconDB(Context context) {
super(context, LauncherFiles.APP_ICONS_DB, null, DB_VERSION);
updateSystemStateString(context);
updateSystemStateString();
}
public void updateSystemStateString(Context c) {
mSystemState = Locale.getDefault().toString() + ","
+ c.getResources().getConfiguration().mcc;
public void updateSystemStateString() {
mSystemState = Locale.getDefault().toString();
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (" +