commit | 847520f468e523dc44e70f77486230f4192dcf68 | [log] [tgz] |
---|---|---|
author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | Wed Aug 14 22:53:59 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Aug 14 22:53:59 2019 +0000 |
tree | b80d056d89f6f825bb5ab82031ce558de64368c1 | |
parent | 8628eb9353462b66e3120bf9a79b8c6c56d9e481 [diff] | |
parent | 0940c487b15623ecf18b23abd89646df2c84a377 [diff] |
Merge "Fixed PredictionAppTracker as service might not be available on device. am: 7ca46ba2ee" into ub-launcher3-master
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)