Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3992f2e9 authored by Nick Ning's avatar Nick Ning Committed by Android (Google) Code Review
Browse files

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

parents 35c66c8d 91898a29
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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.
     */