Revert "Calling start/stop listening in onStart/onStop"

This reverts commit 23ac9cb3e1.

Bug: 28421447
Change-Id: Id04e7b7827d8b897b7c7992705d36f9d83a13320
(cherry picked from commit 7e5d5fc3c6)
This commit is contained in:
Sunny Goyal
2016-04-28 22:24:50 +00:00
parent 3ee9080fb4
commit 0042e3a5e7
2 changed files with 6 additions and 6 deletions

View File

@@ -939,9 +939,6 @@ public class Launcher extends Activity
protected void onStop() {
super.onStop();
FirstFrameAnimatorHelper.setIsVisible(false);
if (Utilities.isNycOrAbove()) {
mAppWidgetHost.stopListening();
}
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStop();
@@ -952,9 +949,6 @@ public class Launcher extends Activity
protected void onStart() {
super.onStart();
FirstFrameAnimatorHelper.setIsVisible(true);
if (Utilities.isNycOrAbove()) {
mAppWidgetHost.startListening();
}
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStart();

View File

@@ -82,6 +82,12 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
}
}
@Override
public void stopListening() {
super.stopListening();
clearViews();
}
public void addProviderChangeListener(Runnable callback) {
mProviderChangeListeners.add(callback);
}