summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/notification/NotificationItemView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2017-03-01 19:01:19 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-01 19:01:19 +0000
commitf41b889b381ccab0e07e51f248d3d070ae7a6d41 (patch)
treeabd3c5b6d6b6ead1c3ac1682e166b65d67490057 /src/com/android/launcher3/notification/NotificationItemView.java
parente5298a57152674a9823914e12ba7b16f63bfa14f (diff)
parent12fec49834d247cfe65ceec95568daf384083c58 (diff)
downloadandroid_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.tar.gz
android_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.tar.bz2
android_packages_apps_Trebuchet-f41b889b381ccab0e07e51f248d3d070ae7a6d41.zip
Merge "Merge deep shortcuts in rounded rect" into ub-launcher3-dorval
am: 12fec49834 Change-Id: I7662f40eade7665f2aa1aba2e341c4ed126a8f14
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationItemView.java')
-rw-r--r--src/com/android/launcher3/notification/NotificationItemView.java46
1 files changed, 1 insertions, 45 deletions
diff --git a/src/com/android/launcher3/notification/NotificationItemView.java b/src/com/android/launcher3/notification/NotificationItemView.java
index 742c90a5a..efd9a3b06 100644
--- a/src/com/android/launcher3/notification/NotificationItemView.java
+++ b/src/com/android/launcher3/notification/NotificationItemView.java
@@ -20,14 +20,7 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.ColorStateList;
-import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
-import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
@@ -36,11 +29,11 @@ import android.widget.FrameLayout;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.R;
+import com.android.launcher3.anim.PillHeightRevealOutlineProvider;
import com.android.launcher3.graphics.IconPalette;
import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider;
import com.android.launcher3.popup.PopupItemView;
import com.android.launcher3.userevent.nano.LauncherLogProto;
-import com.android.launcher3.anim.PillHeightRevealOutlineProvider;
import java.util.List;
@@ -54,9 +47,6 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
private static final Rect sTempRect = new Rect();
- private final Paint mBackgroundClipPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG |
- Paint.FILTER_BITMAP_FLAG);
-
private View mDivider;
private NotificationMainView mMainView;
private NotificationFooterLayout mFooter;
@@ -85,35 +75,6 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
mSwipeHelper.setDisableHardwareLayers(true);
}
- private void initializeBackgroundClipping(boolean force) {
- if (force || mBackgroundClipPaint.getShader() == null) {
- mBackgroundClipPaint.setXfermode(null);
- mBackgroundClipPaint.setShader(null);
- Bitmap backgroundBitmap = Bitmap.createBitmap(getMeasuredWidth(), getMeasuredHeight(),
- Bitmap.Config.ALPHA_8);
- Canvas canvas = new Canvas();
- canvas.setBitmap(backgroundBitmap);
- float roundRectRadius = getResources().getDimensionPixelSize(
- R.dimen.bg_round_rect_radius);
- canvas.drawRoundRect(0, 0, getMeasuredWidth(), getMeasuredHeight(),
- roundRectRadius, roundRectRadius, mBackgroundClipPaint);
- Shader backgroundClipShader = new BitmapShader(backgroundBitmap,
- Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
- mBackgroundClipPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
- mBackgroundClipPaint.setShader(backgroundClipShader);
- }
- }
-
- @Override
- protected void dispatchDraw(Canvas canvas) {
- initializeBackgroundClipping(false /* force */);
- int saveCount = canvas.saveLayer(0, 0, getWidth(), getHeight(), null,
- Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.CLIP_TO_LAYER_SAVE_FLAG);
- super.dispatchDraw(canvas);
- canvas.drawPaint(mBackgroundClipPaint);
- canvas.restoreToCount(saveCount);
- }
-
public Animator animateHeightRemoval(int heightToRemove) {
final int newHeight = getHeight() - heightToRemove;
Animator heightAnimator = new PillHeightRevealOutlineProvider(mPillRect,
@@ -135,11 +96,6 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
}
@Override
- protected float getBackgroundRadius() {
- return getResources().getDimensionPixelSize(R.dimen.bg_round_rect_radius);
- }
-
- @Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (mMainView.getNotificationInfo() == null) {
// The notification hasn't been populated yet.