From 4564570820d029ff31a3ec2d25ad91b1a6731275 Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 15 Mar 2018 11:24:21 -0400 Subject: [PATCH] Delete secondary text in charging animation Secondary text was causing battery percentag of wireless charging animation to be off center so remove it Test: manual Bug: 74946337 Change-Id: I0bf5ac142580011b24c12d4461b02885193d54d1 --- .../SystemUI/res/layout/wireless_charging_layout.xml | 7 ------- .../systemui/charging/WirelessChargingLayout.java | 12 +----------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/SystemUI/res/layout/wireless_charging_layout.xml b/packages/SystemUI/res/layout/wireless_charging_layout.xml index 113282b8d3fe7..85a325a0e4cb2 100644 --- a/packages/SystemUI/res/layout/wireless_charging_layout.xml +++ b/packages/SystemUI/res/layout/wireless_charging_layout.xml @@ -44,13 +44,6 @@ android:layout_gravity="center" android:textSize="32sp" android:textColor="?attr/wallpaperTextColor"/> - - \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java index 8f87d647a0e3d..9887533721300 100644 --- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java +++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java @@ -65,9 +65,6 @@ public class WirelessChargingLayout extends FrameLayout { // amount of battery: final TextView mPercentage = findViewById(R.id.wireless_charging_percentage); - // (optional) time until full charge if available - final TextView mSecondaryText = findViewById(R.id.wireless_charging_secondary_text); - if (batteryLevel != UNKNOWN_BATTERY_LEVEL) { mPercentage.setText(NumberFormat.getPercentInstance().format(mBatteryLevel / 100f)); mPercentage.setAlpha(0); @@ -110,17 +107,10 @@ public class WirelessChargingLayout extends FrameLayout { circleFadeAnimator.setInterpolator(Interpolators.LINEAR); circleFadeAnimator.setStartDelay(chargingAnimationFadeStartOffset); - // Animation Opacity: secondary text animation fades from 1 to 0 opacity - ValueAnimator secondaryTextFadeAnimator = ObjectAnimator.ofFloat(mSecondaryText, "alpha", - 1, 0); - circleFadeAnimator.setDuration(chargingAnimationFadeDuration); - secondaryTextFadeAnimator.setInterpolator(Interpolators.LINEAR); - secondaryTextFadeAnimator.setStartDelay(chargingAnimationFadeStartOffset); - // play all animations together AnimatorSet animatorSet = new AnimatorSet(); animatorSet.playTogether(textSizeAnimator, textOpacityAnimator, textFadeAnimator, - circleFadeAnimator, secondaryTextFadeAnimator); + circleFadeAnimator); animatorSet.start(); } } \ No newline at end of file