Merge "Calling start/stop listening in onStart/onStop" into ub-launcher3-calgary
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 445831c..ba5ec51 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -963,6 +963,9 @@
     protected void onStop() {
         super.onStop();
         FirstFrameAnimatorHelper.setIsVisible(false);
+        if (Utilities.isNycOrAbove()) {
+            mAppWidgetHost.stopListening();
+        }
 
         if (mLauncherCallbacks != null) {
             mLauncherCallbacks.onStop();
@@ -973,6 +976,9 @@
     protected void onStart() {
         super.onStart();
         FirstFrameAnimatorHelper.setIsVisible(true);
+        if (Utilities.isNycOrAbove()) {
+            mAppWidgetHost.startListening();
+        }
 
         if (mLauncherCallbacks != null) {
             mLauncherCallbacks.onStart();
diff --git a/src/com/android/launcher3/LauncherAppWidgetHost.java b/src/com/android/launcher3/LauncherAppWidgetHost.java
index 8c23ff3..1510558 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHost.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHost.java
@@ -82,12 +82,6 @@
         }
     }
 
-    @Override
-    public void stopListening() {
-        super.stopListening();
-        clearViews();
-    }
-
     public void addProviderChangeListener(Runnable callback) {
         mProviderChangeListeners.add(callback);
     }