Merge "Changing global variable for local variable to prevent memory leaks" into tm-qpr-dev am: 9c83077712 am: 35252fd9f2 am: 59b6888cd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22293180 Change-Id: Iffcc020155a460d2a129016ff512968b19a89f29 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -80,7 +80,6 @@ public class FloatingIconView extends FrameLayout implements
|
|||||||
|
|
||||||
public static final float SHAPE_PROGRESS_DURATION = 0.10f;
|
public static final float SHAPE_PROGRESS_DURATION = 0.10f;
|
||||||
private static final RectF sTmpRectF = new RectF();
|
private static final RectF sTmpRectF = new RectF();
|
||||||
private static final Object[] sTmpObjArray = new Object[1];
|
|
||||||
|
|
||||||
private Runnable mEndRunnable;
|
private Runnable mEndRunnable;
|
||||||
private CancellationSignal mLoadIconSignal;
|
private CancellationSignal mLoadIconSignal;
|
||||||
@@ -289,12 +288,13 @@ public class FloatingIconView extends FrameLayout implements
|
|||||||
} else {
|
} else {
|
||||||
int width = (int) pos.width();
|
int width = (int) pos.width();
|
||||||
int height = (int) pos.height();
|
int height = (int) pos.height();
|
||||||
|
Object[] tmpObjArray = new Object[1];
|
||||||
if (supportsAdaptiveIcons) {
|
if (supportsAdaptiveIcons) {
|
||||||
boolean shouldThemeIcon = btvIcon instanceof FastBitmapDrawable
|
boolean shouldThemeIcon = btvIcon instanceof FastBitmapDrawable
|
||||||
&& ((FastBitmapDrawable) btvIcon).isThemed();
|
&& ((FastBitmapDrawable) btvIcon).isThemed();
|
||||||
drawable = getFullDrawable(l, info, width, height, shouldThemeIcon, sTmpObjArray);
|
drawable = getFullDrawable(l, info, width, height, shouldThemeIcon, tmpObjArray);
|
||||||
if (drawable instanceof AdaptiveIconDrawable) {
|
if (drawable instanceof AdaptiveIconDrawable) {
|
||||||
badge = getBadge(l, info, sTmpObjArray[0]);
|
badge = getBadge(l, info, tmpObjArray[0]);
|
||||||
} else {
|
} else {
|
||||||
// The drawable we get back is not an adaptive icon, so we need to use the
|
// The drawable we get back is not an adaptive icon, so we need to use the
|
||||||
// BubbleTextView icon that is already legacy treated.
|
// BubbleTextView icon that is already legacy treated.
|
||||||
@@ -306,7 +306,7 @@ public class FloatingIconView extends FrameLayout implements
|
|||||||
drawable = btvIcon;
|
drawable = btvIcon;
|
||||||
} else {
|
} else {
|
||||||
drawable = getFullDrawable(l, info, width, height, true /* shouldThemeIcon */,
|
drawable = getFullDrawable(l, info, width, height, true /* shouldThemeIcon */,
|
||||||
sTmpObjArray);
|
tmpObjArray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -679,7 +679,6 @@ public class FloatingIconView extends FrameLayout implements
|
|||||||
mOriginalIcon = null;
|
mOriginalIcon = null;
|
||||||
mOnTargetChangeRunnable = null;
|
mOnTargetChangeRunnable = null;
|
||||||
mBadge = null;
|
mBadge = null;
|
||||||
sTmpObjArray[0] = null;
|
|
||||||
sRecycledFetchIconId = sFetchIconId;
|
sRecycledFetchIconId = sFetchIconId;
|
||||||
mIconLoadResult = null;
|
mIconLoadResult = null;
|
||||||
mClipIconView.recycle();
|
mClipIconView.recycle();
|
||||||
|
|||||||
Reference in New Issue
Block a user