Merge "Revert "Calling start/stop listening in onStart/onStop"" into ub-launcher3-calgary
This commit is contained in:
commit
f8a2ba2707
|
@ -958,9 +958,6 @@ public class Launcher extends Activity
|
|||
protected void onStop() {
|
||||
super.onStop();
|
||||
FirstFrameAnimatorHelper.setIsVisible(false);
|
||||
if (Utilities.isNycOrAbove()) {
|
||||
mAppWidgetHost.stopListening();
|
||||
}
|
||||
|
||||
if (mLauncherCallbacks != null) {
|
||||
mLauncherCallbacks.onStop();
|
||||
|
@ -971,9 +968,6 @@ public class Launcher extends Activity
|
|||
protected void onStart() {
|
||||
super.onStart();
|
||||
FirstFrameAnimatorHelper.setIsVisible(true);
|
||||
if (Utilities.isNycOrAbove()) {
|
||||
mAppWidgetHost.startListening();
|
||||
}
|
||||
|
||||
if (mLauncherCallbacks != null) {
|
||||
mLauncherCallbacks.onStart();
|
||||
|
|
|
@ -82,6 +82,12 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopListening() {
|
||||
super.stopListening();
|
||||
clearViews();
|
||||
}
|
||||
|
||||
public void addProviderChangeListener(Runnable callback) {
|
||||
mProviderChangeListeners.add(callback);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue