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

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

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

parents db5808fc 96b6ed77
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -939,6 +939,9 @@ public class Launcher extends Activity
    protected void onStop() {
        super.onStop();
        FirstFrameAnimatorHelper.setIsVisible(false);
        if (Utilities.isNycOrAbove()) {
            mAppWidgetHost.stopListening();
        }

        if (mLauncherCallbacks != null) {
            mLauncherCallbacks.onStop();
@@ -949,6 +952,9 @@ public class Launcher extends Activity
    protected void onStart() {
        super.onStart();
        FirstFrameAnimatorHelper.setIsVisible(true);
        if (Utilities.isNycOrAbove()) {
            mAppWidgetHost.startListening();
        }

        if (mLauncherCallbacks != null) {
            mLauncherCallbacks.onStart();
+0 −6
Original line number Diff line number Diff line
@@ -82,12 +82,6 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
        }
    }

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

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