summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-06-18 22:09:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-18 22:09:50 +0000
commite91a14c6986660253996018982d500a728585199 (patch)
tree9f07aee81a617c132f1f61059b21b01530eadf50 /src
parentc44de1adcf57c52ee93b4a9d2f4505e17b6cc857 (diff)
parent2003c75ac43ecd66ee8a89142b7969feb993abe7 (diff)
downloadandroid_packages_apps_Trebuchet-e91a14c6986660253996018982d500a728585199.tar.gz
android_packages_apps_Trebuchet-e91a14c6986660253996018982d500a728585199.tar.bz2
android_packages_apps_Trebuchet-e91a14c6986660253996018982d500a728585199.zip
Merge "Cancelling launcher reload on mcc change" into ub-launcher3-burnaby
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/IconCache.java10
-rw-r--r--src/com/android/launcher3/LauncherAppState.java1
-rw-r--r--src/com/android/launcher3/LauncherModel.java19
3 files changed, 4 insertions, 26 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index 432b33c6b..91b242854 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -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 + " (" +
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 0565d3f4b..83d90da97 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -95,7 +95,6 @@ public class LauncherAppState {
// Register intent receivers
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_LOCALE_CHANGED);
- filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
filter.addAction(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED);
// For handling managed profiles
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index d2112afb4..f09ad7599 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -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();