mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Cancelling launcher reload on mcc change
Bug: 21022833 Change-Id: Iccd477e7b1638d162e1a500cdb7a52b8d359c657
This commit is contained in:
@@ -30,8 +30,6 @@ import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ProviderInfo;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
@@ -177,8 +175,6 @@ public class LauncherModel extends BroadcastReceiver
|
||||
|
||||
@Thunk IconCache mIconCache;
|
||||
|
||||
protected int mPreviousConfigMcc;
|
||||
|
||||
@Thunk final LauncherAppsCompat mLauncherApps;
|
||||
@Thunk final UserManagerCompat mUserManager;
|
||||
|
||||
@@ -243,9 +239,6 @@ public class LauncherModel extends BroadcastReceiver
|
||||
mBgWidgetsModel = new WidgetsModel(context, iconCache, appFilter);
|
||||
mIconCache = iconCache;
|
||||
|
||||
final Resources res = context.getResources();
|
||||
Configuration config = res.getConfiguration();
|
||||
mPreviousConfigMcc = config.mcc;
|
||||
mLauncherApps = LauncherAppsCompat.getInstance(context);
|
||||
mUserManager = UserManagerCompat.getInstance(context);
|
||||
}
|
||||
@@ -1286,18 +1279,6 @@ public class LauncherModel extends BroadcastReceiver
|
||||
if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
|
||||
// If we have changed locale we need to clear out the labels in all apps/workspace.
|
||||
forceReload();
|
||||
} else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
|
||||
// Check if configuration change was an mcc/mnc change which would affect app resources
|
||||
// and we would need to clear out the labels in all apps/workspace. Same handling as
|
||||
// above for ACTION_LOCALE_CHANGED
|
||||
Configuration currentConfig = context.getResources().getConfiguration();
|
||||
if (mPreviousConfigMcc != currentConfig.mcc) {
|
||||
Log.d(TAG, "Reload apps on config change. curr_mcc:"
|
||||
+ currentConfig.mcc + " prevmcc:" + mPreviousConfigMcc);
|
||||
forceReload();
|
||||
}
|
||||
// Update previousConfig
|
||||
mPreviousConfigMcc = currentConfig.mcc;
|
||||
} else if (SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED.equals(action) ||
|
||||
SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED.equals(action)) {
|
||||
Callbacks callbacks = getCallback();
|
||||
|
||||
Reference in New Issue
Block a user