Removing predicted apps reset on every onResume

Predicted apps should be pushed by the called whenever they change
instead of Launcher polling them on every UI update.

Bug: 67305604
Change-Id: Ibd3d809b09b7d8fd39036f69367e8580fb90dcef
This commit is contained in:
Sunny Goyal
2017-10-04 10:40:28 -07:00
parent 0474222c25
commit d0d0703399
5 changed files with 8 additions and 56 deletions

View File

@@ -216,7 +216,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
Action.Direction.UP,
containerType);
}
mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */);
mLauncher.showAppsView(true /* animated */);
if (hasSpringAnimationHandler()) {
mSpringAnimationHandler.add(mSearchSpring, true /* setDefaultValues */);
// The icons are moving upwards, so we go to 0 from 1. (y-axis 1 is below 0.)
@@ -239,7 +239,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
Action.Direction.UP,
containerType);
}
mLauncher.showAppsView(true, /* animated */ false /* updatePredictedApps */);
mLauncher.showAppsView(true /* animated */);
}
}
}
@@ -256,10 +256,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
// Initialize values that should not change until #onDragEnd
mStatusBarHeight = mLauncher.getDragLayer().getInsets().top;
mHotseat.setVisibility(View.VISIBLE);
if (!mLauncher.isAllAppsVisible()) {
mLauncher.tryAndUpdatePredictedApps();
mAppsView.setVisibility(View.VISIBLE);
}
mAppsView.setVisibility(View.VISIBLE);
}
}