Merge "Calling start/stop listening in onStart/onStop" into ub-launcher3-calgary

am: 849344b

* commit '849344b2466cce4354581f8d4b1d0e4c0681940d':
  Calling start/stop listening in onStart/onStop

Change-Id: I4b40689c12928040638cb9b90af468cc9ffca0c9
This commit is contained in:
Sunny Goyal
2016-04-08 21:53:51 +00:00
committed by android-build-merger
2 changed files with 6 additions and 6 deletions
+6
View File
@@ -963,6 +963,9 @@ public class Launcher extends Activity
protected void onStop() {
super.onStop();
FirstFrameAnimatorHelper.setIsVisible(false);
if (Utilities.isNycOrAbove()) {
mAppWidgetHost.stopListening();
}
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStop();
@@ -973,6 +976,9 @@ public class Launcher extends Activity
protected void onStart() {
super.onStart();
FirstFrameAnimatorHelper.setIsVisible(true);
if (Utilities.isNycOrAbove()) {
mAppWidgetHost.startListening();
}
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStart();
@@ -82,12 +82,6 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
}
}
@Override
public void stopListening() {
super.stopListening();
clearViews();
}
public void addProviderChangeListener(Runnable callback) {
mProviderChangeListeners.add(callback);
}