Add a static method to make charging animation for unknown battery level.
The method presumes default values for the non-dozing, battery level unknown case. Bug: 220330974 Test: DockingAnimationCallbackTest Change-Id: I3a26ba7c63b8cc0470a4a88d2435bd924d81d565
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user