Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleBadgeIconFactory.java +8 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.wm.shell.bubbles; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Path; import android.graphics.Rect; import android.graphics.drawable.AdaptiveIconDrawable; Loading Loading @@ -59,7 +58,8 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { private class CircularRingDrawable extends CircularAdaptiveIcon { final int mImportantConversationColor; final Rect mTempBounds = new Rect(); final int mRingWidth; final Rect mInnerBounds = new Rect(); final Drawable mDr; Loading @@ -68,6 +68,8 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { mDr = dr; mImportantConversationColor = mContext.getResources().getColor( R.color.important_conversation, null); mRingWidth = mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width); } @Override Loading @@ -75,11 +77,10 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { int save = canvas.save(); canvas.clipPath(getIconMask()); canvas.drawColor(mImportantConversationColor); int ringStrokeWidth = mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width); mTempBounds.set(getBounds()); mTempBounds.inset(ringStrokeWidth, ringStrokeWidth); mDr.setBounds(mTempBounds); mInnerBounds.set(getBounds()); mInnerBounds.inset(mRingWidth, mRingWidth); canvas.translate(mInnerBounds.left, mInnerBounds.top); mDr.setBounds(0, 0, mInnerBounds.width(), mInnerBounds.height()); mDr.draw(canvas); canvas.restoreToCount(save); } Loading @@ -106,7 +107,6 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { int save = canvas.save(); canvas.clipPath(getIconMask()); canvas.drawColor(Color.BLACK); Drawable d; if ((d = getBackground()) != null) { d.draw(canvas); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleBadgeIconFactory.java +8 −8 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.wm.shell.bubbles; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Path; import android.graphics.Rect; import android.graphics.drawable.AdaptiveIconDrawable; Loading Loading @@ -59,7 +58,8 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { private class CircularRingDrawable extends CircularAdaptiveIcon { final int mImportantConversationColor; final Rect mTempBounds = new Rect(); final int mRingWidth; final Rect mInnerBounds = new Rect(); final Drawable mDr; Loading @@ -68,6 +68,8 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { mDr = dr; mImportantConversationColor = mContext.getResources().getColor( R.color.important_conversation, null); mRingWidth = mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width); } @Override Loading @@ -75,11 +77,10 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { int save = canvas.save(); canvas.clipPath(getIconMask()); canvas.drawColor(mImportantConversationColor); int ringStrokeWidth = mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.importance_ring_stroke_width); mTempBounds.set(getBounds()); mTempBounds.inset(ringStrokeWidth, ringStrokeWidth); mDr.setBounds(mTempBounds); mInnerBounds.set(getBounds()); mInnerBounds.inset(mRingWidth, mRingWidth); canvas.translate(mInnerBounds.left, mInnerBounds.top); mDr.setBounds(0, 0, mInnerBounds.width(), mInnerBounds.height()); mDr.draw(canvas); canvas.restoreToCount(save); } Loading @@ -106,7 +107,6 @@ public class BubbleBadgeIconFactory extends BaseIconFactory { int save = canvas.save(); canvas.clipPath(getIconMask()); canvas.drawColor(Color.BLACK); Drawable d; if ((d = getBackground()) != null) { d.draw(canvas); Loading