From 9dc158a9c8ecf58cad52729fd299f736e0bfc650 Mon Sep 17 00:00:00 2001 From: James O'Leary Date: Thu, 25 Jul 2019 15:00:16 -0400 Subject: [PATCH] Fix handles redrawing when not visible Bug: 137877559 Test: Verify CornerHandleView.onDraw() is no longer called when swiping along navbar Change-Id: I10b89fc2d88f93bbbb86bf60db15869d6480a3e2 --- .../SystemUI/src/com/android/systemui/CornerHandleView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/CornerHandleView.java b/packages/SystemUI/src/com/android/systemui/CornerHandleView.java index 54a36355decbc..a94952c5bc19f 100644 --- a/packages/SystemUI/src/com/android/systemui/CornerHandleView.java +++ b/packages/SystemUI/src/com/android/systemui/CornerHandleView.java @@ -107,7 +107,9 @@ public class CornerHandleView extends View { mPaint.setColor((int) ArgbEvaluator.getInstance().evaluate(darkIntensity, mLightColor, mDarkColor)); - invalidate(); + if (getVisibility() == VISIBLE) { + invalidate(); + } } @Override