Merge "Ignore the charging ripple flag." into sc-v2-dev am: 8833af1652

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16470199

Change-Id: Ie0ecb98e50f56daa784316fd1ee5b72d8a02426c
This commit is contained in:
Shan Huang
2021-12-15 06:40:22 +00:00
committed by Automerger Merge Worker

View File

@@ -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.)