Loading quickstep/src/com/android/quickstep/TaskIconCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class TaskIconCache { key.getComponent(), key.userId); if (activityInfo != null) { BitmapInfo bitmapInfo = getBitmapInfo( mIconProvider.getIcon(activityInfo, UserHandle.of(key.userId)), mIconProvider.getIcon(activityInfo), key.userId, desc.getPrimaryColor(), activityInfo.applicationInfo.isInstantApp()); Loading src/com/android/launcher3/WidgetPreviewLoader.java +6 −9 Original line number Diff line number Diff line Loading @@ -541,20 +541,17 @@ public class WidgetPreviewLoader { c.setBitmap(preview); c.drawColor(0, PorterDuff.Mode.CLEAR); } RectF boxRect = drawBoxWithShadow(c, size, size); drawBoxWithShadow(c, size, size); LauncherIcons li = LauncherIcons.obtain(mContext); Bitmap icon = li.createBadgedIconBitmap( Drawable icon = li.createBadgedIconBitmap( mutateOnMainThread(info.getFullResIcon(mIconCache)), Process.myUserHandle(), 0).icon; Process.myUserHandle(), 0).newIcon(launcher); li.recycle(); Rect src = new Rect(0, 0, icon.getWidth(), icon.getHeight()); boxRect.set(0, 0, iconSize, iconSize); boxRect.offset(padding, padding); c.drawBitmap(icon, src, boxRect, new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG)); icon.setBounds(padding, padding, padding + iconSize, padding + iconSize); icon.draw(c); c.setBitmap(null); return preview; } Loading src/com/android/launcher3/notification/NotificationInfo.java +2 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.app.ActivityOptions; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.os.Bundle; Loading Loading @@ -86,9 +85,8 @@ public class NotificationInfo implements View.OnClickListener { mIsIconLarge = true; } if (mIconDrawable == null) { mIconDrawable = new BitmapDrawable(context.getResources(), LauncherAppState .getInstance(context).getIconCache() .getDefaultIcon(statusBarNotification.getUser()).icon); mIconDrawable = LauncherAppState.getInstance(context).getIconCache() .getDefaultIcon(statusBarNotification.getUser()).newIcon(context); } intent = notification.contentIntent; autoCancel = (notification.flags & Notification.FLAG_AUTO_CANCEL) != 0; Loading src/com/android/launcher3/widget/PendingItemDragHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.launcher3.dragndrop.DraggableView; import com.android.launcher3.graphics.DragPreviewProvider; import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.icons.LauncherIcons; import com.android.launcher3.icons.RoundDrawableWrapper; import com.android.launcher3.widget.dragndrop.AppWidgetHostViewDragListener; /** Loading Loading @@ -118,12 +119,12 @@ public class PendingItemDragHelper extends DragPreviewProvider { .addDragListener(new AppWidgetHostViewDragListener(launcher)); } if (preview == null) { FastBitmapDrawable p = new FastBitmapDrawable( Drawable p = new FastBitmapDrawable( app.getWidgetCache().generateWidgetPreview(launcher, createWidgetInfo.info, maxWidth, null, previewSizeBeforeScale).first); if (RoundedCornerEnforcement.isRoundedCornerEnabled()) { p.setRoundedCornersRadius(mEnforcedRoundedCornersForWidget); p = new RoundDrawableWrapper(p, mEnforcedRoundedCornersForWidget); } preview = p; } Loading src/com/android/launcher3/widget/WidgetCell.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.icons.BaseIconFactory; import com.android.launcher3.icons.BitmapRenderer; import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.icons.RoundDrawableWrapper; import com.android.launcher3.model.WidgetItem; /** Loading Loading @@ -248,8 +249,7 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener { public void applyPreview(Bitmap bitmap) { FastBitmapDrawable drawable = new FastBitmapDrawable(bitmap); drawable.setRoundedCornersRadius(mEnforcedCornerRadius); applyPreview(drawable); applyPreview(new RoundDrawableWrapper(drawable, mEnforcedCornerRadius)); } private void applyPreview(Drawable drawable) { Loading Loading
quickstep/src/com/android/quickstep/TaskIconCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class TaskIconCache { key.getComponent(), key.userId); if (activityInfo != null) { BitmapInfo bitmapInfo = getBitmapInfo( mIconProvider.getIcon(activityInfo, UserHandle.of(key.userId)), mIconProvider.getIcon(activityInfo), key.userId, desc.getPrimaryColor(), activityInfo.applicationInfo.isInstantApp()); Loading
src/com/android/launcher3/WidgetPreviewLoader.java +6 −9 Original line number Diff line number Diff line Loading @@ -541,20 +541,17 @@ public class WidgetPreviewLoader { c.setBitmap(preview); c.drawColor(0, PorterDuff.Mode.CLEAR); } RectF boxRect = drawBoxWithShadow(c, size, size); drawBoxWithShadow(c, size, size); LauncherIcons li = LauncherIcons.obtain(mContext); Bitmap icon = li.createBadgedIconBitmap( Drawable icon = li.createBadgedIconBitmap( mutateOnMainThread(info.getFullResIcon(mIconCache)), Process.myUserHandle(), 0).icon; Process.myUserHandle(), 0).newIcon(launcher); li.recycle(); Rect src = new Rect(0, 0, icon.getWidth(), icon.getHeight()); boxRect.set(0, 0, iconSize, iconSize); boxRect.offset(padding, padding); c.drawBitmap(icon, src, boxRect, new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG)); icon.setBounds(padding, padding, padding + iconSize, padding + iconSize); icon.draw(c); c.setBitmap(null); return preview; } Loading
src/com/android/launcher3/notification/NotificationInfo.java +2 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.app.ActivityOptions; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.os.Bundle; Loading Loading @@ -86,9 +85,8 @@ public class NotificationInfo implements View.OnClickListener { mIsIconLarge = true; } if (mIconDrawable == null) { mIconDrawable = new BitmapDrawable(context.getResources(), LauncherAppState .getInstance(context).getIconCache() .getDefaultIcon(statusBarNotification.getUser()).icon); mIconDrawable = LauncherAppState.getInstance(context).getIconCache() .getDefaultIcon(statusBarNotification.getUser()).newIcon(context); } intent = notification.contentIntent; autoCancel = (notification.flags & Notification.FLAG_AUTO_CANCEL) != 0; Loading
src/com/android/launcher3/widget/PendingItemDragHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.launcher3.dragndrop.DraggableView; import com.android.launcher3.graphics.DragPreviewProvider; import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.icons.LauncherIcons; import com.android.launcher3.icons.RoundDrawableWrapper; import com.android.launcher3.widget.dragndrop.AppWidgetHostViewDragListener; /** Loading Loading @@ -118,12 +119,12 @@ public class PendingItemDragHelper extends DragPreviewProvider { .addDragListener(new AppWidgetHostViewDragListener(launcher)); } if (preview == null) { FastBitmapDrawable p = new FastBitmapDrawable( Drawable p = new FastBitmapDrawable( app.getWidgetCache().generateWidgetPreview(launcher, createWidgetInfo.info, maxWidth, null, previewSizeBeforeScale).first); if (RoundedCornerEnforcement.isRoundedCornerEnabled()) { p.setRoundedCornersRadius(mEnforcedRoundedCornersForWidget); p = new RoundDrawableWrapper(p, mEnforcedRoundedCornersForWidget); } preview = p; } Loading
src/com/android/launcher3/widget/WidgetCell.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.icons.BaseIconFactory; import com.android.launcher3.icons.BitmapRenderer; import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.icons.RoundDrawableWrapper; import com.android.launcher3.model.WidgetItem; /** Loading Loading @@ -248,8 +249,7 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener { public void applyPreview(Bitmap bitmap) { FastBitmapDrawable drawable = new FastBitmapDrawable(bitmap); drawable.setRoundedCornersRadius(mEnforcedCornerRadius); applyPreview(drawable); applyPreview(new RoundDrawableWrapper(drawable, mEnforcedCornerRadius)); } private void applyPreview(Drawable drawable) { Loading