Merge "Remove drop shadow from corner handles."

This commit is contained in:
James O'Leary
2020-02-20 18:45:19 +00:00
committed by Android (Google) Code Review
3 changed files with 0 additions and 13 deletions

View File

@@ -781,9 +781,6 @@
<dimen name="chooser_action_button_icon_size">18dp</dimen>
<!-- Assistant handles -->
<dimen name="assist_handle_shadow_radius">2dp</dimen>
<!-- For Waterfall Display -->
<dimen name="waterfall_display_left_edge_size">0px</dimen>
<dimen name="waterfall_display_top_edge_size">0px</dimen>

View File

@@ -3840,9 +3840,6 @@
<!-- For App Standby -->
<java-symbol type="string" name="as_app_forced_to_restricted_bucket" />
<!-- Assistant handles -->
<java-symbol type="dimen" name="assist_handle_shadow_radius" />
<!-- For Waterfall Display -->
<java-symbol type="dimen" name="waterfall_display_left_edge_size" />
<java-symbol type="dimen" name="waterfall_display_top_edge_size" />

View File

@@ -57,7 +57,6 @@ public class CornerHandleView extends View {
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeCap(Paint.Cap.ROUND);
mPaint.setStrokeWidth(getStrokePx());
setLayerType(View.LAYER_TYPE_SOFTWARE, mPaint);
final int dualToneDarkTheme = Utils.getThemeAttr(mContext, R.attr.darkIconTheme);
final int dualToneLightTheme = Utils.getThemeAttr(mContext, R.attr.lightIconTheme);
@@ -118,14 +117,8 @@ public class CornerHandleView extends View {
// Handle color is same as home handle color.
int color = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity,
mLightColor, mDarkColor);
// Shadow color is inverse of handle color.
int shadowColor = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity,
mDarkColor, mLightColor);
if (mPaint.getColor() != color) {
mPaint.setColor(color);
mPaint.setShadowLayer(/** radius */ getResources().getDimensionPixelSize(
com.android.internal.R.dimen.assist_handle_shadow_radius), /** shadowDx */ 0,
/** shadowDy */ 0, /** color */ shadowColor);
if (getVisibility() == VISIBLE && getAlpha() > 0) {
invalidate();
} else {