Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5cbf88f authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

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

am: 2083fd9b

Change-Id: I33e5538fd20a0094f055c097824662fd5ff0f6d7
parents 9c0f711d 2083fd9b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)