Loading quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +1 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,7 @@ public class HotseatPredictionController implements DragController.DragListener, } if (mAppPredictor != null) { mAppPredictor.destroy(); mAppPredictor = null; } WeakReference<HotseatPredictionController> controllerRef = new WeakReference<>(this); Loading src/com/android/launcher3/model/PredictionModel.java +8 −11 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class PredictionModel implements ResourceBasedOverride { private static final int MAX_CACHE_ITEMS = 5; protected Context mContext; private ArrayList<ComponentKey> mCachedComponentKeys; private SharedPreferences mDevicePrefs; private UserCache mUserCache; Loading Loading @@ -78,7 +77,6 @@ public class PredictionModel implements ResourceBasedOverride { builder.append("\n"); } mDevicePrefs.edit().putString(CACHED_ITEMS_KEY, builder.toString()).apply(); mCachedComponentKeys = null; }); } Loading @@ -89,17 +87,16 @@ public class PredictionModel implements ResourceBasedOverride { @WorkerThread public List<ComponentKey> getPredictionComponentKeys() { Preconditions.assertWorkerThread(); if (mCachedComponentKeys == null) { mCachedComponentKeys = new ArrayList<>(); ArrayList<ComponentKey> items = new ArrayList<>(); String cachedBlob = mDevicePrefs.getString(CACHED_ITEMS_KEY, ""); for (String line : cachedBlob.split("\n")) { ComponentKey key = getComponentKeyFromSerializedString(line); if (key != null) { mCachedComponentKeys.add(key); } items.add(key); } } return mCachedComponentKeys; return items; } private String serializeComponentKeyToString(ComponentKey componentKey) { Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +1 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,7 @@ public class HotseatPredictionController implements DragController.DragListener, } if (mAppPredictor != null) { mAppPredictor.destroy(); mAppPredictor = null; } WeakReference<HotseatPredictionController> controllerRef = new WeakReference<>(this); Loading
src/com/android/launcher3/model/PredictionModel.java +8 −11 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class PredictionModel implements ResourceBasedOverride { private static final int MAX_CACHE_ITEMS = 5; protected Context mContext; private ArrayList<ComponentKey> mCachedComponentKeys; private SharedPreferences mDevicePrefs; private UserCache mUserCache; Loading Loading @@ -78,7 +77,6 @@ public class PredictionModel implements ResourceBasedOverride { builder.append("\n"); } mDevicePrefs.edit().putString(CACHED_ITEMS_KEY, builder.toString()).apply(); mCachedComponentKeys = null; }); } Loading @@ -89,17 +87,16 @@ public class PredictionModel implements ResourceBasedOverride { @WorkerThread public List<ComponentKey> getPredictionComponentKeys() { Preconditions.assertWorkerThread(); if (mCachedComponentKeys == null) { mCachedComponentKeys = new ArrayList<>(); ArrayList<ComponentKey> items = new ArrayList<>(); String cachedBlob = mDevicePrefs.getString(CACHED_ITEMS_KEY, ""); for (String line : cachedBlob.split("\n")) { ComponentKey key = getComponentKeyFromSerializedString(line); if (key != null) { mCachedComponentKeys.add(key); } items.add(key); } } return mCachedComponentKeys; return items; } private String serializeComponentKeyToString(ComponentKey componentKey) { Loading