Send registerPredictionUpdates request immediately instead of pushing it to the main thread Looper queue.
This ensure requestPredictionUpdate executing after registerPredictionUpdates; otherwise when main thread is busy, requestPredictionUpdate may occur before registerPredictionUpdates and skip executing main logic due to no registered callback.
Bug: 200323675
Test: manually test on the device
Change-Id: I70631a74583b41bb392600bd7c7bcf076727a802
(cherry picked from commit 50af435b77)
This commit is contained in:
@@ -187,7 +187,7 @@ public class AppPredictionPerUserService extends
|
||||
@NonNull IPredictionCallback callback) {
|
||||
final AppPredictionSessionInfo sessionInfo = mSessionInfos.get(sessionId);
|
||||
if (sessionInfo == null) return;
|
||||
final boolean serviceExists = resolveService(sessionId, false,
|
||||
final boolean serviceExists = resolveService(sessionId, true,
|
||||
sessionInfo.mUsesPeopleService,
|
||||
s -> s.registerPredictionUpdates(sessionId, callback));
|
||||
if (serviceExists) {
|
||||
|
||||
Reference in New Issue
Block a user