Merge "Fixed PredictionAppTracker as service might not be available on device." into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2019-08-14 22:28:34 +00:00
commit 2083fd9b9f
1 file changed
+4
@@ -95,6 +95,10 @@ public class PredictionAppTracker extends AppLaunchTracker {
private AppPredictor createPredictor(Client client, int count) {
AppPredictionManager apm = mContext.getSystemService(AppPredictionManager.class);
if (apm == null) {
return null;
}
AppPredictor predictor = apm.createAppPredictionSession(
new AppPredictionContext.Builder(mContext)
.setUiSurface(client.id)