diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-05-27 19:03:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-27 19:03:57 +0000 |
commit | 68348d03e30b261acbf99b5eb160635a95ae75b3 (patch) | |
tree | 643fe26cf3cb606baa77c92db19b99975a9f2cea /services/appprediction | |
parent | 511b7fde3c08d7488df76f8088f66f403b020d9e (diff) | |
parent | 2327596f515df2ea9c622477d8cb7c8784ef8bef (diff) |
Merge "Enable Sharesheet ranking using PeopleService by default to test in Droidfood" into rvc-dev
Diffstat (limited to 'services/appprediction')
-rw-r--r-- | services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java | 7 |
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 103151dcdda5..26e85beba58b 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)); } |