Merge "Enable Sharesheet ranking using PeopleService by default to test in Droidfood" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-27 19:03:57 +00:00
committed by Android (Google) Code Review

View File

@@ -114,8 +114,11 @@ public class AppPredictionPerUserService extends
public void onCreatePredictionSessionLocked(@NonNull AppPredictionContext context, public void onCreatePredictionSessionLocked(@NonNull AppPredictionContext context,
@NonNull AppPredictionSessionId sessionId) { @NonNull AppPredictionSessionId sessionId) {
if (!mSessionInfos.containsKey(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, mSessionInfos.put(sessionId, new AppPredictionSessionInfo(sessionId, context,
DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI, forceUsingPeopleService || DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI,
PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false), PREDICT_USING_PEOPLE_SERVICE_PREFIX + context.getUiSurface(), false),
this::removeAppPredictionSessionInfo)); this::removeAppPredictionSessionInfo));
} }