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

am: 2083fd9b9f

Change-Id: I33e5538fd20a0094f055c097824662fd5ff0f6d7
This commit is contained in:
Felipe Leme
2019-08-14 15:37:47 -07:00
committed by android-build-merger
@@ -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)