summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Song Hu <songhu@google.com> 2020-05-26 14:10:26 -0700
committer Song Hu <songhu@google.com> 2020-05-27 10:30:12 -0700
commit2327596f515df2ea9c622477d8cb7c8784ef8bef (patch)
tree867b7fa52c768a1306a3a7bbb0319f27b4b8e2dc
parentb548df99a7a7fb42edccf8cb3955736b5e90f054 (diff)
Enable Sharesheet ranking using PeopleService by default to test in Droidfood
The CL would be rolled back after testing PeopleService on Droidfood for 2 weeks. Bug: 157500121 Test: manual test on the phone. Change-Id: Icf9c19b1c7c6673226c3fb9eab8c649807696c96
-rw-r--r--services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java7
1 files changed, 5 insertions, 2 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..c021edfda2e4 100644
--- a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
+++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java
@@ -51,7 +51,7 @@ import java.util.function.Consumer;
*/
public class AppPredictionPerUserService extends
AbstractPerUserSystemService<AppPredictionPerUserService, AppPredictionManagerService>
- implements RemoteAppPredictionService.RemoteAppPredictionServiceCallbacks {
+ implements RemoteAppPredictionService.RemoteAppPredictionServiceCallbacks {
private static final String TAG = AppPredictionPerUserService.class.getSimpleName();
private static final String PREDICT_USING_PEOPLE_SERVICE_PREFIX =
@@ -114,8 +114,11 @@ public class AppPredictionPerUserService extends
public void onCreatePredictionSessionLocked(@NonNull AppPredictionContext context,
@NonNull AppPredictionSessionId sessionId) {
if (!mSessionInfos.containsKey(sessionId)) {
+ // TODO(b/157500121): remove below forceUsingPeopleService logic after testing
+ // PeopleService for 2 weeks on Droidfood.
+ final boolean forceUsingPeopleService = context.getUiSurface().equals("share");
mSessionInfos.put(sessionId, new AppPredictionSessionInfo(sessionId, context,
- DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
+ forceUsingPeopleService || DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false),
this::removeAppPredictionSessionInfo));
}