diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java index 508262d4ddec6..835025bbfc88d 100644 --- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java +++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java @@ -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. */