commit | 0940c487b15623ecf18b23abd89646df2c84a377 | [log] [tgz] |
---|---|---|
author | Felipe Leme <felipeal@google.com> | Wed Aug 14 15:53:49 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Wed Aug 14 15:53:49 2019 -0700 |
tree | 66cfd466d4f34bb06ce4c7557d0bc925280f1e36 | |
parent | 23582eb7c0792045cca1ff23f6e81f7eb63a5af1 [diff] | |
parent | 7ca46ba2ee185cf9a199172b94bf37163d06f2d7 [diff] |
Fixed PredictionAppTracker as service might not be available on device. am: 7ca46ba2ee Change-Id: Ib7eed879bdb25291cd5faefa5e2176aed0b32095
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java index 09cc421..7d8fab1 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java
@@ -95,6 +95,10 @@ 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)