Resurrect app prediciton sessions after destroy and rebind

After App Prediction service restarts, existing app prediction sessions
will be inactive and needs to be resurrected.

Test: flash to physical device and
1. Open a couple of Personal Profile and Work Profile apps and observe
that they make it to the prediction row.
2. Clear storage via the Settings > Privacy > Device Personalization
Services > Personal > Clear data > All time
3. Verify prediction row should start getting updated again for
subsequently opened apps
Bug: 146802640

Change-Id: I74d87e374806b92649a9a3436926fb5bd5572874
This commit is contained in:
Pinyao Ting
2020-05-13 15:06:26 -07:00
parent 8e65e07631
commit 2bc9e49c67

View File

@@ -267,6 +267,9 @@ public class AppPredictionPerUserService extends
mRemoteService.destroy();
mRemoteService = null;
synchronized (mLock) {
mZombie = true;
}
mRemoteService = getRemoteServiceLocked();
if (mRemoteService != null) {
if (isDebug()) {