Loading packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java +26 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ import android.util.Slog; import android.view.Gravity; import android.view.WindowManager; import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; /** * A WirelessChargingAnimation is a view containing view + animation for wireless charging. * @hide Loading @@ -54,9 +57,10 @@ public class WirelessChargingAnimation { * @hide */ public WirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing, UiEventLogger uiEventLogger) { mCurrentWirelessChargingView = new WirelessChargingView(context, looper, transmittingBatteryLevel, batteryLevel, callback, isDozing); transmittingBatteryLevel, batteryLevel, callback, isDozing, uiEventLogger); } /** Loading @@ -66,9 +70,9 @@ public class WirelessChargingAnimation { */ public static WirelessChargingAnimation makeWirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { Callback callback, boolean isDozing, UiEventLogger uiEventLogger) { return new WirelessChargingAnimation(context, looper, transmittingBatteryLevel, batteryLevel, callback, isDozing); batteryLevel, callback, isDozing, uiEventLogger); } /** Loading @@ -95,6 +99,7 @@ public class WirelessChargingAnimation { private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams(); private final Handler mHandler; private final UiEventLogger mUiEventLogger; private int mGravity; private WirelessChargingLayout mView; Loading @@ -104,11 +109,12 @@ public class WirelessChargingAnimation { public WirelessChargingView(Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { boolean isDozing, UiEventLogger uiEventLogger) { mCallback = callback; mNextView = new WirelessChargingLayout(context, transmittingBatteryLevel, batteryLevel, isDozing); mGravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER; mUiEventLogger = uiEventLogger; final WindowManager.LayoutParams params = mParams; params.height = WindowManager.LayoutParams.MATCH_PARENT; Loading Loading @@ -195,6 +201,7 @@ public class WirelessChargingAnimation { mCallback.onAnimationStarting(); } mWM.addView(mView, mParams); mUiEventLogger.log(WirelessChargingRippleEvent.WIRELESS_RIPPLE_PLAYED); } catch (WindowManager.BadTokenException e) { Slog.d(TAG, "Unable to add wireless charging view. " + e); } Loading @@ -215,5 +222,19 @@ public class WirelessChargingAnimation { mView = null; } } enum WirelessChargingRippleEvent implements UiEventLogger.UiEventEnum { @UiEvent(doc = "Wireless charging ripple effect played") WIRELESS_RIPPLE_PLAYED(830); private final int mInt; WirelessChargingRippleEvent(int id) { mInt = id; } @Override public int getId() { return mInt; } } } } packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -2587,7 +2587,7 @@ public class StatusBar extends SystemUI implements DemoMode, public void onAnimationEnded() { mNotificationShadeWindowController.setRequestTopUi(false, TAG); } }, false).show(animationDelay); }, false, sUiEventLogger).show(animationDelay); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java +26 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ import android.util.Slog; import android.view.Gravity; import android.view.WindowManager; import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; /** * A WirelessChargingAnimation is a view containing view + animation for wireless charging. * @hide Loading @@ -54,9 +57,10 @@ public class WirelessChargingAnimation { * @hide */ public WirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing, UiEventLogger uiEventLogger) { mCurrentWirelessChargingView = new WirelessChargingView(context, looper, transmittingBatteryLevel, batteryLevel, callback, isDozing); transmittingBatteryLevel, batteryLevel, callback, isDozing, uiEventLogger); } /** Loading @@ -66,9 +70,9 @@ public class WirelessChargingAnimation { */ public static WirelessChargingAnimation makeWirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { Callback callback, boolean isDozing, UiEventLogger uiEventLogger) { return new WirelessChargingAnimation(context, looper, transmittingBatteryLevel, batteryLevel, callback, isDozing); batteryLevel, callback, isDozing, uiEventLogger); } /** Loading @@ -95,6 +99,7 @@ public class WirelessChargingAnimation { private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams(); private final Handler mHandler; private final UiEventLogger mUiEventLogger; private int mGravity; private WirelessChargingLayout mView; Loading @@ -104,11 +109,12 @@ public class WirelessChargingAnimation { public WirelessChargingView(Context context, @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) { boolean isDozing, UiEventLogger uiEventLogger) { mCallback = callback; mNextView = new WirelessChargingLayout(context, transmittingBatteryLevel, batteryLevel, isDozing); mGravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER; mUiEventLogger = uiEventLogger; final WindowManager.LayoutParams params = mParams; params.height = WindowManager.LayoutParams.MATCH_PARENT; Loading Loading @@ -195,6 +201,7 @@ public class WirelessChargingAnimation { mCallback.onAnimationStarting(); } mWM.addView(mView, mParams); mUiEventLogger.log(WirelessChargingRippleEvent.WIRELESS_RIPPLE_PLAYED); } catch (WindowManager.BadTokenException e) { Slog.d(TAG, "Unable to add wireless charging view. " + e); } Loading @@ -215,5 +222,19 @@ public class WirelessChargingAnimation { mView = null; } } enum WirelessChargingRippleEvent implements UiEventLogger.UiEventEnum { @UiEvent(doc = "Wireless charging ripple effect played") WIRELESS_RIPPLE_PLAYED(830); private final int mInt; WirelessChargingRippleEvent(int id) { mInt = id; } @Override public int getId() { return mInt; } } } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -2587,7 +2587,7 @@ public class StatusBar extends SystemUI implements DemoMode, public void onAnimationEnded() { mNotificationShadeWindowController.setRequestTopUi(false, TAG); } }, false).show(animationDelay); }, false, sUiEventLogger).show(animationDelay); } @Override Loading