diff options
| author | 2019-09-19 16:33:05 +0000 | |
|---|---|---|
| committer | 2019-09-20 14:52:21 +0000 | |
| commit | e92074dc6697dfe1f95c0eb66a40ff2fc0169b32 (patch) | |
| tree | 3c261ef10f38390ac845d6ff5cdf17a74a169844 | |
| parent | b2125a719567a4881d2651c39b2ba89aea1d3631 (diff) | |
Revert "Add shadow to assistant handles"
This reverts commit c445bbf3eb07ab0282ef94cf666545a9f683b18d.
Reason for revert: Causes memory issues on the GPU (~50mb -> ~70mb)
Test: Memory usage goes back down to 53mb with this revert.
https://sponge.corp.google.com/invocation?tab=Logfile+Index&id=7643bf50-41bb-45a7-8c93-d0ddb1f82a04&searchFor=
(last file, search for com.android.systemui#anon-and-swap-avg-median)
Bug: 141187457
Change-Id: Ia48eca3f95097562771abc3a523bd32b74f2d443
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/CornerHandleView.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/CornerHandleView.java b/packages/SystemUI/src/com/android/systemui/CornerHandleView.java index 6209c2c36206..a94952c5bc19 100644 --- a/packages/SystemUI/src/com/android/systemui/CornerHandleView.java +++ b/packages/SystemUI/src/com/android/systemui/CornerHandleView.java @@ -19,7 +19,6 @@ package com.android.systemui; import android.animation.ArgbEvaluator; import android.content.Context; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; @@ -28,7 +27,6 @@ import android.util.DisplayMetrics; import android.view.ContextThemeWrapper; import android.view.View; -import com.android.internal.graphics.ColorUtils; import com.android.settingslib.Utils; /** @@ -109,7 +107,6 @@ public class CornerHandleView extends View { mPaint.setColor((int) ArgbEvaluator.getInstance().evaluate(darkIntensity, mLightColor, mDarkColor)); - updateShadow(); if (getVisibility() == VISIBLE) { invalidate(); } @@ -121,21 +118,6 @@ public class CornerHandleView extends View { canvas.drawPath(mPath, mPaint); } - private void updateShadow() { - if (ColorUtils.calculateLuminance(mPaint.getColor()) > 0.7f) { - mPaint.setShadowLayer(/** radius */ 5,/** shadowDx */ 0, /** shadowDy */ -1, - /** color */ ColorUtils.setAlphaComponent(/** color */ Color.BLACK, - /** alpha */ 102)); - } else { - mPaint.setShadowLayer(/** radius */ 0, /** shadowDx */ 0, /** shadowDy */ 0, - /** color */ Color.TRANSPARENT); - } - - if (getVisibility() == VISIBLE) { - invalidate(); - } - } - private static float convertDpToPixel(float dp, Context context) { return dp * ((float) context.getResources().getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEFAULT); |