summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 0725a652f..79bc08424 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -114,7 +114,7 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
resolver.registerContentObserver(LauncherSettings.Favorites.CONTENT_URI, true,
mFavoritesObserver);
}
-
+
public void recreateWidgetPreviewDb() {
if (mWidgetPreviewCacheDb != null) {
mWidgetPreviewCacheDb.close();
@@ -127,6 +127,8 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
*/
public void onTerminate() {
sContext.unregisterReceiver(mModel);
+ final LauncherAppsCompat launcherApps = LauncherAppsCompat.getInstance(sContext);
+ launcherApps.removeOnAppsChangedListener(mModel);
ContentResolver resolver = sContext.getContentResolver();
resolver.unregisterContentObserver(mFavoritesObserver);