Merge "Calling start/stop listening in onStart/onStop" into ub-launcher3-calgary
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user