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