Revert "Removing some unused code from All-Apps"
Revert submission 17866780-cancel-request
Reason for revert: wrong icons
Reverted Changes:
Iedc98e5ef:Cancelling previous request and clearing UI when a...
I72394fb42:Removing some unused code from All-Apps
Change-Id: I2ecefcaf07e6105a10f86b8dc19f75089e45a3e0
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 6302739..74ec7ee 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -96,6 +96,7 @@
private static final int MAX_SEARCH_LOOP_COUNT = 20;
private static final int[] STATE_PRESSED = new int[]{android.R.attr.state_pressed};
+ private static final float HIGHLIGHT_SCALE = 1.16f;
private final PointF mTranslationForReorderBounce = new PointF(0, 0);
private final PointF mTranslationForReorderPreview = new PointF(0, 0);
@@ -258,12 +259,6 @@
mDotParams.scale = 0f;
mForceHideDot = false;
setBackground(null);
-
- setTag(null);
- if (mIconLoadRequest != null) {
- mIconLoadRequest.cancel();
- mIconLoadRequest = null;
- }
}
private void cancelDotScaleAnim() {
@@ -368,7 +363,8 @@
}
}
- public void setBubbleTextHolder(BubbleTextHolder bubbleTextHolder) {
+ public void setBubbleTextHolder(
+ BubbleTextHolder bubbleTextHolder) {
mBubbleTextHolder = bubbleTextHolder;
}
@@ -1024,6 +1020,19 @@
getIconBounds(mIconSize, bounds);
}
+ private int getIconSizeForDisplay(int display) {
+ DeviceProfile grid = mActivity.getDeviceProfile();
+ switch (display) {
+ case DISPLAY_ALL_APPS:
+ return grid.allAppsIconSizePx;
+ case DISPLAY_FOLDER:
+ return grid.folderChildIconSizePx;
+ case DISPLAY_WORKSPACE:
+ default:
+ return grid.iconSizePx;
+ }
+ }
+
public void getSourceVisualDragBounds(Rect bounds) {
getIconBounds(mIconSize, bounds);
}
@@ -1036,8 +1045,8 @@
}
private void resetIconScale() {
- if (mIcon != null) {
- mIcon.resetScale();
+ if (mIcon instanceof FastBitmapDrawable) {
+ ((FastBitmapDrawable) mIcon).resetScale();
}
}