summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPinyao Ting <pinyaoting@google.com>2020-05-13 15:06:26 -0700
committerPinyao Ting <pinyaoting@google.com>2020-05-13 15:06:26 -0700
commit2bc9e49c67515d0ae192c55c84a3a1c358aed41b (patch)
treeea94cae8c293dc06b0c350dc27903e8d8bde6542
parent8e65e076313e907934d0e64a702ef121dd5e4007 (diff)
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
-rw-r--r--services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
index fdc5f810db22..103151dcdda5 100644
--- a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
+++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
@@ -267,6 +267,9 @@ public class AppPredictionPerUserService extends
mRemoteService.destroy();
mRemoteService = null;
+ synchronized (mLock) {
+ mZombie = true;
+ }
mRemoteService = getRemoteServiceLocked();
if (mRemoteService != null) {
if (isDebug()) {