Do not wait until bindComplete for setting NotificationListener

Notification badges are applied only to the icons which are already
bound. So even if some notification changes in the middle of binding
it will get applied properly.

Change-Id: Icc77981688206b61ea4b9c9d311dff2c72fa8f18
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 1461b5c..adfb44c 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -240,8 +240,6 @@
 
     @Thunk boolean mWorkspaceLoading = true;
 
-    private boolean mPaused = true;
-
     private OnResumeCallback mOnResumeCallback;
 
     private ViewOnDrawExecutor mPendingExecutor;
@@ -336,11 +334,6 @@
         mAppWidgetHost = new LauncherAppWidgetHost(this);
         mAppWidgetHost.startListening();
 
-        // If we are getting an onCreate, we can actually preempt onResume and unset mPaused here,
-        // this also ensures that any synchronous binding below doesn't re-trigger another
-        // LauncherModel load.
-        mPaused = false;
-
         mLauncherView = LayoutInflater.from(this).inflate(R.layout.launcher, null);
 
         setupViews();
@@ -780,10 +773,7 @@
             mLauncherCallbacks.onStart();
         }
         mAppWidgetHost.setListenIfResumed(true);
-
-        if (!isWorkspaceLoading()) {
-            NotificationListener.setNotificationsChangedListener(mPopupDataProvider);
-        }
+        NotificationListener.setNotificationsChangedListener(mPopupDataProvider);
 
         if (mShouldFadeInScrim && mDragLayer.getBackground() != null) {
             if (mScrimAnimator != null) {
@@ -813,7 +803,6 @@
 
         mAppLaunchSuccess = false;
         getUserEventDispatcher().resetElapsedSessionMillis();
-        mPaused = false;
         setOnResumeCallback(null);
         // Process any items that were added while Launcher was away.
         InstallShortcutReceiver.disableAndFlushInstallQueue(
@@ -836,7 +825,6 @@
         InstallShortcutReceiver.enableInstallQueue(InstallShortcutReceiver.FLAG_ACTIVITY_PAUSED);
 
         super.onPause();
-        mPaused = true;
         mDragController.cancelDrag();
         mDragController.resetLastGestureUpTime();
 
@@ -2553,7 +2541,6 @@
         InstallShortcutReceiver.disableAndFlushInstallQueue(
                 InstallShortcutReceiver.FLAG_LOADER_RUNNING, this);
 
-        NotificationListener.setNotificationsChangedListener(mPopupDataProvider);
         TraceHelper.endSection("finishBindingItems");
     }