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

Commit 2083fd9b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 04d97d9d 6e4a1ef1
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)