From 3ffc38c012034beefdb9c1d0b8e1fc76ec14fb0d Mon Sep 17 00:00:00 2001 From: Hawkwood Glazier Date: Fri, 13 Jan 2023 16:02:10 +0000 Subject: [PATCH] Revert "Set Visibility on ClockSwitch Animation" This reverts commit f07b624784353c2385dcaa81bd34fc36b331ebb1. Reason for revert: b/265108008 Change-Id: I131a60ce0e16c7799f005dcc7fb9e2c312671ce1 --- .../com/android/keyguard/KeyguardClockSwitch.java | 14 +++----------- .../keyguard/KeyguardClockSwitchController.java | 8 ++++++++ .../android/keyguard/KeyguardClockSwitchTest.java | 5 ----- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java index ae09620a3f3a5..62babadc45d83 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java @@ -183,7 +183,6 @@ public class KeyguardClockSwitch extends RelativeLayout { if (!animate) { out.setAlpha(0f); - out.setVisibility(INVISIBLE); in.setAlpha(1f); in.setVisibility(VISIBLE); mStatusArea.setTranslationY(statusAreaYTranslation); @@ -199,10 +198,7 @@ public class KeyguardClockSwitch extends RelativeLayout { direction * -mClockSwitchYAmount)); mClockOutAnim.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator animation) { - if (mClockOutAnim == animation) { - out.setVisibility(INVISIBLE); - mClockOutAnim = null; - } + mClockOutAnim = null; } }); @@ -216,9 +212,7 @@ public class KeyguardClockSwitch extends RelativeLayout { mClockInAnim.setStartDelay(CLOCK_OUT_MILLIS / 2); mClockInAnim.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator animation) { - if (mClockInAnim == animation) { - mClockInAnim = null; - } + mClockInAnim = null; } }); @@ -231,9 +225,7 @@ public class KeyguardClockSwitch extends RelativeLayout { mStatusAreaAnim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); mStatusAreaAnim.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator animation) { - if (mStatusAreaAnim == animation) { - mStatusAreaAnim = null; - } + mStatusAreaAnim = null; } }); mStatusAreaAnim.start(); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index 1b8ee734932a6..788f1200d6030 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -337,6 +337,10 @@ public class KeyguardClockSwitchController extends ViewController