commit | 2083fd9b9fb881e92ab24c810459439ce5a502a7 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Aug 14 22:28:34 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Aug 14 22:28:34 2019 +0000 |
tree | 3b259c11ebeffd15678963ad107273dae64bdae7 | |
parent | 04d97d9da3d0a375b30f46b4dec6e3e3013c432f [diff] | |
parent | 6e4a1ef16cfa253fa8b587e1a1e7c8118ceea2a6 [diff] |
Merge "Fixed PredictionAppTracker as service might not be available on device." into qt-qpr1-dev
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 8f1282d..24fc61b 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)