Merge "Add a static method to make charging animation for unknown battery level." into tm-dev

This commit is contained in:
Nick Ning
2022-03-10 19:21:09 +00:00
committed by Android (Google) Code Review

View File

@@ -16,6 +16,8 @@
package com.android.systemui.charging;
import static com.android.systemui.charging.WirelessChargingLayout.UNKNOWN_BATTERY_LEVEL;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
@@ -75,6 +77,16 @@ public class WirelessChargingAnimation {
batteryLevel, callback, isDozing, uiEventLogger);
}
/**
* Creates a charging animation object using mostly default values for non-dozing and unknown
* battery level without charging number shown.
*/
public static WirelessChargingAnimation makeChargingAnimationWithNoBatteryLevel(
@NonNull Context context, UiEventLogger uiEventLogger) {
return makeWirelessChargingAnimation(context, null,
UNKNOWN_BATTERY_LEVEL, UNKNOWN_BATTERY_LEVEL, null, false, uiEventLogger);
}
/**
* Show the view for the specified duration.
*/