Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8a2ba27 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

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

parents da3de6dd 7e5d5fc3
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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();
+6 −0
Original line number Diff line number Diff line
@@ -82,6 +82,12 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
        }
    }

    @Override
    public void stopListening() {
        super.stopListening();
        clearViews();
    }

    public void addProviderChangeListener(Runnable callback) {
        mProviderChangeListeners.add(callback);
    }