From 575a868e862d1487d5c076c5ebbd169bcab28749 Mon Sep 17 00:00:00 2001 From: Shan Huang Date: Wed, 15 Dec 2021 01:45:27 +0000 Subject: [PATCH] Ignore the charging ripple flag. Will fully remove the flag in a follow up CL. Bug: 210438197 Test: adb shell cmd statusbar charging-ripple Change-Id: I5a6a1eb902fef5485f56ab4e48e11f8596001075 --- .../statusbar/charging/WiredChargingRippleController.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt index 04c60fc197d8d..8909e9d9e9f74 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt @@ -93,9 +93,8 @@ class WiredChargingRippleController @Inject constructor( nowPluggedIn: Boolean, charging: Boolean ) { - // Suppresses the ripple when it's disabled, or when the state change comes - // from wireless charging. - if (!rippleEnabled || batteryController.isPluggedInWireless) { + // Suppresses the ripple when the state change comes from wireless charging. + if (batteryController.isPluggedInWireless) { return } val wasPluggedIn = pluggedIn @@ -145,7 +144,7 @@ class WiredChargingRippleController @Inject constructor( } fun startRipple() { - if (!rippleEnabled || rippleView.rippleInProgress || rippleView.parent != null) { + if (rippleView.rippleInProgress || rippleView.parent != null) { // Skip if ripple is still playing, or not playing but already added the parent // (which might happen just before the animation starts or right after // the animation ends.)