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

This commit is contained in:
TreeHugger Robot
2020-05-15 10:31:56 +00:00
committed by Android (Google) Code Review
@@ -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 {