Merge "Prevent all apps prediction update while visible" into ub-launcher3-rvc-dev am: e241f6c243

Change-Id: I46f4afd992fd15c4c9b82a8bc4b85ba923598024
This commit is contained in:
TreeHugger Robot
2020-05-15 10:43:06 +00:00
committed by Automerger Merge Worker
@@ -211,8 +211,11 @@ public class PredictionUiStateManager implements StateListener<LauncherState>,
}
private void dispatchOnChange(boolean changed) {
PredictionState newState = changed ? parseLastState() :
(mPendingState == null ? mCurrentState : mPendingState);
PredictionState newState = changed
? parseLastState()
: mPendingState != null && canApplyPredictions(mPendingState)
? mPendingState
: mCurrentState;
if (changed && mAppsView != null && !canApplyPredictions(newState)) {
scheduleApplyPredictedApps(newState);
} else {