summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Pietal <mpietal@google.com> 2024-12-19 14:08:06 +0000
committer Matt Pietal <mpietal@google.com> 2024-12-19 20:16:22 +0000
commitdaa90b7ca503b794cfdf42bee51df1d1c455241c (patch)
tree3d3e98d7da74ca3937b758a4bc0b8c925a6b17e4
parent786cb5767fd1f78604d834edf5af4a53e3a2a81b (diff)
Remove shipped lockscreen transition flag
And a few references to the clock migration flag Bug: 301502635 Test: atest SystemUITests Flag: EXEMPT flag cleanup Change-Id: Ic63ac74c7cd278f97f4ea78549ea7b5c68036d07
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaControllerTest.kt29
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLoggerTest.kt88
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt128
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaController.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java28
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeSurface.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeSurfaceImpl.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt80
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt66
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java81
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java28
12 files changed, 50 insertions, 518 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaControllerTest.kt
index 2f95936a576f..3be9e18cdfe5 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaControllerTest.kt
@@ -16,7 +16,6 @@
package com.android.systemui.media.controls.ui.controller
-import android.provider.Settings
import android.testing.TestableLooper
import android.view.View.GONE
import android.view.View.VISIBLE
@@ -88,7 +87,7 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
configurationController,
ResourcesSplitShadeStateController(),
mock<KeyguardMediaControllerLogger>(),
- mock<DumpManager>()
+ mock<DumpManager>(),
)
keyguardMediaController.attachSinglePaneContainer(mediaContainerView)
keyguardMediaController.useSplitShade = false
@@ -142,7 +141,7 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
assertTrue(
"HostView wasn't attached to the split pane container",
- splitShadeContainer.childCount == 1
+ splitShadeContainer.childCount == 1,
)
}
@@ -153,7 +152,7 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
assertTrue(
"HostView wasn't attached to the single pane container",
- mediaContainerView.childCount == 1
+ mediaContainerView.childCount == 1,
)
}
@@ -174,17 +173,6 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
}
@Test
- fun dozeWakeUpAnimationWaiting_inSplitShade_mediaIsHidden() {
- val splitShadeContainer = FrameLayout(context)
- keyguardMediaController.attachSplitShadeContainer(splitShadeContainer)
- keyguardMediaController.useSplitShade = true
-
- keyguardMediaController.isDozeWakeUpAnimationWaiting = true
-
- assertThat(splitShadeContainer.visibility).isEqualTo(GONE)
- }
-
- @Test
fun dozing_inSingleShade_mediaIsVisible() {
val splitShadeContainer = FrameLayout(context)
keyguardMediaController.attachSplitShadeContainer(splitShadeContainer)
@@ -195,17 +183,6 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
assertThat(mediaContainerView.visibility).isEqualTo(VISIBLE)
}
- @Test
- fun dozeWakeUpAnimationWaiting_inSingleShade_mediaIsVisible() {
- val splitShadeContainer = FrameLayout(context)
- keyguardMediaController.attachSplitShadeContainer(splitShadeContainer)
- keyguardMediaController.useSplitShade = false
-
- keyguardMediaController.isDozeWakeUpAnimationWaiting = true
-
- assertThat(mediaContainerView.visibility).isEqualTo(VISIBLE)
- }
-
private fun setDozing() {
whenever(statusBarStateController.isDozing).thenReturn(true)
statusBarStateListener.onDozingChanged(true)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLoggerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLoggerTest.kt
index a5206f52b6f2..1591208f3fcf 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLoggerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLoggerTest.kt
@@ -84,91 +84,50 @@ class NotificationWakeUpCoordinatorLoggerTest : SysuiTestCase() {
@Test
fun updateDozeAmountWillThrottleFractionalInputUpdates() {
- logger.logUpdateDozeAmount(0f, 0f, null, 0f, StatusBarState.SHADE, changed = false)
+ logger.logUpdateDozeAmount(0f, null, 0f, StatusBarState.SHADE, changed = false)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.1f, 0f, null, 0.1f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.1f, null, 0.1f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.2f, 0f, null, 0.2f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.3f, 0f, null, 0.3f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.4f, 0f, null, 0.4f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.5f, 0f, null, 0.5f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.2f, null, 0.2f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.3f, null, 0.3f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.4f, null, 0.4f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, null, 0.5f, StatusBarState.SHADE, changed = true)
verifyDidLog(0)
- logger.logUpdateDozeAmount(1f, 0f, null, 1f, StatusBarState.SHADE, changed = true)
- verifyDidLog(1)
- }
-
- @Test
- fun updateDozeAmountWillThrottleFractionalDelayUpdates() {
- logger.logUpdateDozeAmount(0f, 0f, null, 0f, StatusBarState.SHADE, changed = false)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(0f, 0.1f, null, 0.1f, StatusBarState.SHADE, changed = true)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(0f, 0.2f, null, 0.2f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0f, 0.3f, null, 0.3f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0f, 0.4f, null, 0.4f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0f, 0.5f, null, 0.5f, StatusBarState.SHADE, changed = true)
- verifyDidLog(0)
- logger.logUpdateDozeAmount(0f, 1f, null, 1f, StatusBarState.SHADE, changed = true)
- verifyDidLog(1)
- }
-
- @Test
- fun updateDozeAmountWillIncludeFractionalUpdatesWhenOtherInputChangesFractionality() {
- logger.logUpdateDozeAmount(0.0f, 1.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(0.1f, 1.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(0.2f, 1.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(0.3f, 1.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(0.4f, 1.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(0)
- logger.logUpdateDozeAmount(0.5f, 0.9f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(0.6f, 0.8f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(0.8f, 0.6f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(0.9f, 0.5f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(0)
- logger.logUpdateDozeAmount(1.0f, 0.4f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(1)
- logger.logUpdateDozeAmount(1.0f, 0.3f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(1.0f, 0.2f, 1f, 1f, StatusBarState.SHADE, changed = false)
- logger.logUpdateDozeAmount(1.0f, 0.1f, 1f, 1f, StatusBarState.SHADE, changed = false)
- verifyDidLog(0)
- logger.logUpdateDozeAmount(1.0f, 0.0f, 1f, 1f, StatusBarState.SHADE, changed = false)
+ logger.logUpdateDozeAmount(1f, null, 1f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
}
@Test
fun updateDozeAmountWillIncludeFractionalUpdatesWhenStateChanges() {
- logger.logUpdateDozeAmount(0f, 0f, null, 0f, StatusBarState.SHADE, changed = false)
+ logger.logUpdateDozeAmount(0f, null, 0f, StatusBarState.SHADE, changed = false)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.1f, 0f, null, 0.1f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.1f, null, 0.1f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.2f, 0f, null, 0.2f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.3f, 0f, null, 0.3f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.4f, 0f, null, 0.4f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.5f, 0f, null, 0.5f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.2f, null, 0.2f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.3f, null, 0.3f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.4f, null, 0.4f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, null, 0.5f, StatusBarState.SHADE, changed = true)
verifyDidLog(0)
- logger.logUpdateDozeAmount(0.5f, 0f, null, 0.5f, StatusBarState.KEYGUARD, changed = false)
+ logger.logUpdateDozeAmount(0.5f, null, 0.5f, StatusBarState.KEYGUARD, changed = false)
verifyDidLog(1)
}
@Test
fun updateDozeAmountWillIncludeFractionalUpdatesWhenHardOverrideChanges() {
- logger.logUpdateDozeAmount(0f, 0f, null, 0f, StatusBarState.SHADE, changed = false)
+ logger.logUpdateDozeAmount(0f, null, 0f, StatusBarState.SHADE, changed = false)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.1f, 0f, null, 0.1f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.1f, null, 0.1f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.2f, 0f, null, 0.2f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.3f, 0f, null, 0.3f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.4f, 0f, null, 0.4f, StatusBarState.SHADE, changed = true)
- logger.logUpdateDozeAmount(0.5f, 0f, null, 0.5f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.2f, null, 0.2f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.3f, null, 0.3f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.4f, null, 0.4f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, null, 0.5f, StatusBarState.SHADE, changed = true)
verifyDidLog(0)
- logger.logUpdateDozeAmount(0.5f, 0f, 1f, 1f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, 1f, 1f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.5f, 0f, 0f, 0f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, 0f, 0f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
- logger.logUpdateDozeAmount(0.5f, 0f, null, 0.5f, StatusBarState.SHADE, changed = true)
+ logger.logUpdateDozeAmount(0.5f, null, 0.5f, StatusBarState.SHADE, changed = true)
verifyDidLog(1)
}
@@ -177,6 +136,7 @@ class NotificationWakeUpCoordinatorLoggerTest : SysuiTestCase() {
val tracker =
object : LogcatEchoTracker {
override fun isBufferLoggable(bufferName: String, level: LogLevel): Boolean = false
+
override fun isTagLoggable(tagName: String, level: LogLevel): Boolean {
recentLogs.add(tagName to level)
return true
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt
index 0dc01a65df19..3abd6207338c 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorTest.kt
@@ -37,11 +37,9 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.scene.data.repository.Idle
import com.android.systemui.scene.data.repository.setSceneTransition
import com.android.systemui.scene.shared.model.Scenes
-import com.android.systemui.shade.ShadeViewController.Companion.WAKEUP_ANIMATION_DELAY_MS
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.notification.headsup.HeadsUpManager
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
-import com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_WAKEUP
import com.android.systemui.statusbar.notification.stack.domain.interactor.notificationsKeyguardInteractor
import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.phone.KeyguardBypassController
@@ -61,7 +59,6 @@ import org.mockito.Mockito.anyFloat
import org.mockito.kotlin.clearInvocations
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
-import org.mockito.kotlin.never
import org.mockito.kotlin.verify
import org.mockito.kotlin.verifyNoMoreInteractions
import org.mockito.kotlin.whenever
@@ -266,52 +263,6 @@ class NotificationWakeUpCoordinatorTest(flags: FlagsParameterization) : SysuiTes
assertThat(notificationWakeUpCoordinator.statusBarState).isEqualTo(StatusBarState.SHADE)
}
- private val delayedDozeDelay = WAKEUP_ANIMATION_DELAY_MS.toLong()
- private val delayedDozeDuration = ANIMATION_DURATION_WAKEUP.toLong()
-
- @Test
- fun dozeAmountOutputClampsTo1WhenDelayStarts() {
- notificationWakeUpCoordinator.setWakingUp(true, requestDelayedAnimation = true)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
-
- // verify further doze amount changes have no effect on output
- setDozeAmount(0.5f)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
- }
-
- @Test
- fun verifyDozeAmountOutputTracksDelay() {
- dozeAmountOutputClampsTo1WhenDelayStarts()
-
- // Animator waiting the delay amount should not yet affect the output
- animatorTestRule.advanceTimeBy(delayedDozeDelay)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
-
- // input doze amount change to 0 has no effect
- setDozeAmount(0.0f)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
-
- // Advancing the delay to 50% will cause the 50% output
- animatorTestRule.advanceTimeBy(delayedDozeDuration / 2)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 0.5f, hideAmount = 0.5f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isFalse()
-
- // Now advance delay to 100% completion; notifications become fully visible
- animatorTestRule.advanceTimeBy(delayedDozeDuration / 2)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 0f, hideAmount = 0f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isFalse()
-
- // Now advance delay to 200% completion -- should not invoke anything else
- animatorTestRule.advanceTimeBy(delayedDozeDuration)
- verify(stackScrollerController, never()).setDozeAmount(anyFloat())
- verify(stackScrollerController, never()).setHideAmount(anyFloat(), anyFloat())
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isFalse()
- }
-
@Test
fun verifyWakeUpListenerCallbacksWhenDozing() {
// prime internal state as dozing, then add the listener
@@ -334,85 +285,6 @@ class NotificationWakeUpCoordinatorTest(flags: FlagsParameterization) : SysuiTes
verifyNoMoreInteractions(wakeUpListener)
}
- @Test
- fun verifyWakeUpListenerCallbacksWhenDelayingAnimation() {
- // prime internal state as dozing, then add the listener
- setDozeAmount(1f)
- notificationWakeUpCoordinator.addListener(wakeUpListener)
-
- // setWakingUp() doesn't do anything yet
- notificationWakeUpCoordinator.setWakingUp(true, requestDelayedAnimation = true)
- verifyNoMoreInteractions(wakeUpListener)
-
- // verify further doze amount changes have no effect
- setDozeAmount(0.5f)
- verifyNoMoreInteractions(wakeUpListener)
-
- // advancing to just before the start time should not invoke the listener
- animatorTestRule.advanceTimeBy(delayedDozeDelay - 1)
- verifyNoMoreInteractions(wakeUpListener)
-
- animatorTestRule.advanceTimeBy(1)
- verify(wakeUpListener).onDelayedDozeAmountAnimationRunning(eq(true))
- verifyNoMoreInteractions(wakeUpListener)
- clearInvocations(wakeUpListener)
-
- // input doze amount change to 0 has no effect
- setDozeAmount(0.0f)
- verifyNoMoreInteractions(wakeUpListener)
-
- // Advancing the delay to 50% will cause notifications to no longer be fully hidden
- animatorTestRule.advanceTimeBy(delayedDozeDuration / 2)
- verify(wakeUpListener).onFullyHiddenChanged(eq(false))
- verifyNoMoreInteractions(wakeUpListener)
- clearInvocations(wakeUpListener)
-
- // Now advance delay to 99.x% completion; notifications become fully visible
- animatorTestRule.advanceTimeBy(delayedDozeDuration / 2 - 1)
- verifyNoMoreInteractions(wakeUpListener)
-
- // advance to 100%; animation no longer running
- animatorTestRule.advanceTimeBy(1)
- verify(wakeUpListener).onDelayedDozeAmountAnimationRunning(eq(false))
- verifyNoMoreInteractions(wakeUpListener)
- clearInvocations(wakeUpListener)
-
- // Now advance delay to 200% completion -- should not invoke anything else
- animatorTestRule.advanceTimeBy(delayedDozeDuration)
- verifyNoMoreInteractions(wakeUpListener)
- }
-
- @Test
- fun verifyDelayedDozeAmountCanBeOverridden() {
- dozeAmountOutputClampsTo1WhenDelayStarts()
-
- // input doze amount change to 0 has no effect
- setDozeAmount(0.0f)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
-
- // Advancing the delay to 50% will cause the 50% output
- animatorTestRule.advanceTimeBy(delayedDozeDelay + delayedDozeDuration / 2)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 0.5f, hideAmount = 0.5f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isFalse()
-
- // Enabling bypass and showing keyguard will override back to fully dozing/hidden
- setBypassEnabled(true)
- setStatusBarState(StatusBarState.KEYGUARD)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 1f, hideAmount = 1f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isTrue()
- }
-
- @Test
- fun verifyRemovingOverrideRestoresOtherwiseCalculatedDozeAmount() {
- verifyDelayedDozeAmountCanBeOverridden()
-
- // Disabling bypass will return back to the 50% value
- setBypassEnabled(false)
- verifyStackScrollerDozeAndHideAmount(dozeAmount = 0.5f, hideAmount = 0.5f)
- assertThat(notificationWakeUpCoordinator.notificationsFullyHidden).isFalse()
- }
-
private fun verifyStackScrollerDozeAndHideAmount(dozeAmount: Float, hideAmount: Float) {
// First verify that we did in-fact receive the correct values
verify(stackScrollerController).setDozeAmount(eased(dozeAmount))
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index fe9c9cb4f7c8..2997dd7de133 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -335,11 +335,6 @@ object Flags {
// 2900 - Zero Jank fixes. Naming convention is: zj_<bug number>_<cuj name>
- // TODO:(b/285623104): Tracking bug
- @JvmField
- val ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD =
- releasedFlag("zj_285570694_lockscreen_transition_from_aod")
-
// TODO(b/283447257): Tracking bug
@JvmField
val BIGPICTURE_NOTIFICATION_LAZY_LOADING =
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaController.kt
index 9bea6e916e5a..520cc2365088 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/KeyguardMediaController.kt
@@ -25,7 +25,6 @@ import androidx.annotation.VisibleForTesting
import com.android.systemui.Dumpable
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dump.DumpManager
-import com.android.systemui.keyguard.MigrateClocksToBlueprint
import com.android.systemui.media.controls.ui.view.MediaHost
import com.android.systemui.media.controls.ui.view.MediaHostState
import com.android.systemui.media.dagger.MediaModule.KEYGUARD
@@ -114,15 +113,6 @@ constructor(
var visibilityChangedListener: ((Boolean) -> Unit)? = null
- /**
- * Whether the doze wake up animation is delayed and we are currently waiting for it to start.
- */
- var isDozeWakeUpAnimationWaiting: Boolean = false
- set(value) {
- field = value
- refreshMediaPosition(reason = "isDozeWakeUpAnimationWaiting changed")
- }
-
/** single pane media container placed at the top of the notifications list */
var singlePaneContainer: MediaContainerView? = null
private set
@@ -150,7 +140,7 @@ constructor(
refreshMediaPosition(reason = "onMediaHostVisibilityChanged")
if (visible) {
- if (MigrateClocksToBlueprint.isEnabled && useSplitShade) {
+ if (useSplitShade) {
return
}
mediaHost.hostView.layoutParams.apply {
@@ -241,13 +231,7 @@ constructor(
// by the clock. This is not the case for single-line clock though.
// For single shade, we don't need to do it, because media is a child of NSSL, which already
// gets hidden on AOD.
- // Media also has to be hidden when waking up from dozing, and the doze wake up animation is
- // delayed and waiting to be started.
- // This is to stay in sync with the delaying of the horizontal alignment of the rest of the
- // keyguard container, that is also delayed until the "wait" is over.
- // If we show media during this waiting period, the shade will still be centered, and using
- // the entire width of the screen, and making media show fully stretched.
- return !statusBarStateController.isDozing && !isDozeWakeUpAnimationWaiting
+ return !statusBarStateController.isDozing
}
private fun showMediaPlayer() {
@@ -291,18 +275,17 @@ constructor(
println("visible", visible)
println("useSplitShade", useSplitShade)
println("bypassController.bypassEnabled", bypassController.bypassEnabled)
- println("isDozeWakeUpAnimationWaiting", isDozeWakeUpAnimationWaiting)
println("singlePaneContainer", singlePaneContainer)
println("splitShadeContainer", splitShadeContainer)
if (lastUsedStatusBarState != -1) {
println(
"lastUsedStatusBarState",
- StatusBarState.toString(lastUsedStatusBarState)
+ StatusBarState.toString(lastUsedStatusBarState),
)
}
println(
"statusBarStateController.state",
- StatusBarState.toString(statusBarStateController.state)
+ StatusBarState.toString(statusBarStateController.state),
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index a89dca40910c..e681c98b10f4 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -569,13 +569,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private boolean mIgnoreXTouchSlop;
private boolean mExpandLatencyTracking;
private boolean mUseExternalTouch = false;
-
- /**
- * Whether we're waking up and will play the delayed doze animation in
- * {@link NotificationWakeUpCoordinator}. If so, we'll want to keep the clock centered until the
- * delayed doze animation starts.
- */
- private boolean mWillPlayDelayedDozeAmountAnimation = false;
private final DreamingToLockscreenTransitionViewModel mDreamingToLockscreenTransitionViewModel;
private final OccludedToLockscreenTransitionViewModel mOccludedToLockscreenTransitionViewModel;
private final LockscreenToDreamingTransitionViewModel mLockscreenToDreamingTransitionViewModel;
@@ -1008,12 +1001,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
public void onFullyHiddenChanged(boolean isFullyHidden) {
mKeyguardStatusBarViewController.updateForHeadsUp();
}
-
- @Override
- public void onDelayedDozeAmountAnimationRunning(boolean running) {
- // On running OR finished, the animation is no longer waiting to play
- setWillPlayDelayedDozeAmountAnimation(false);
- }
});
mView.setRtlChangeListener(layoutDirection -> {
@@ -1592,26 +1579,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// Pulsing notification appears on the right. Move clock left to avoid overlap.
return false;
}
- if (mWillPlayDelayedDozeAmountAnimation) {
- return true;
- }
// "Visible" notifications are actually not visible on AOD (unless pulsing), so it is safe
// to center the clock without overlap.
return isOnAod();
}
- @Override
- public void setWillPlayDelayedDozeAmountAnimation(boolean willPlay) {
- if (mWillPlayDelayedDozeAmountAnimation == willPlay) return;
-
- mWillPlayDelayedDozeAmountAnimation = willPlay;
- mWakeUpCoordinator.logDelayingClockWakeUpAnimation(willPlay);
- mKeyguardMediaController.setDozeWakeUpAnimationWaiting(willPlay);
-
- // Once changing this value, see if we should move the clock.
- positionClockAndNotifications();
- }
-
private boolean isOnAod() {
return mDozing && mDozeParameters.getAlwaysOn();
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeSurface.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeSurface.kt
index 9ca23f0f1e17..6069705be5fb 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeSurface.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeSurface.kt
@@ -59,12 +59,6 @@ interface ShadeSurface :
fun setTouchAndAnimationDisabled(disabled: Boolean)
/**
- * Notify us that {@link NotificationWakeUpCoordinator} is going to play the doze wakeup
- * animation after a delay. If so, we'll keep the clock centered until that animation starts.
- */
- fun setWillPlayDelayedDozeAmountAnimation(willPlay: Boolean)
-
- /**
* Sets the dozing state.
*
* @param dozing `true` when dozing.
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeSurfaceImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeSurfaceImpl.kt
index 3bbda162cf31..9b971d7740f2 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeSurfaceImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeSurfaceImpl.kt
@@ -49,10 +49,6 @@ class ShadeSurfaceImpl @Inject constructor() : ShadeSurface, ShadeViewController
// TODO(b/332732878): determine if still needed
}
- override fun setWillPlayDelayedDozeAmountAnimation(willPlay: Boolean) {
- // TODO(b/322494538): determine if still needed
- }
-
override fun setDozing(dozing: Boolean, animate: Boolean) {
// Do nothing
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
index 7a59f79c77a6..4b4e0d651ea5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
@@ -32,7 +32,6 @@ import com.android.systemui.keyguard.domain.interactor.PulseExpansionInteractor
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.shade.ShadeExpansionChangeEvent
import com.android.systemui.shade.ShadeExpansionListener
-import com.android.systemui.shade.ShadeViewController
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.domain.interactor.NotificationsKeyguardInteractor
@@ -44,11 +43,8 @@ import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.phone.KeyguardBypassController.OnBypassStateChangedListener
import com.android.systemui.statusbar.phone.ScreenOffAnimationController
-import com.android.systemui.util.doOnEnd
-import com.android.systemui.util.doOnStart
import java.io.PrintWriter
import javax.inject.Inject
-import kotlin.math.max
import kotlin.math.min
import kotlinx.coroutines.CoroutineScope
@@ -77,8 +73,6 @@ constructor(
private var inputLinearDozeAmount: Float = 0.0f
private var inputEasedDozeAmount: Float = 0.0f
- private var delayedDozeAmountOverride: Float = 0.0f
- private var delayedDozeAmountAnimator: ObjectAnimator? = null
/** Valid values: {1f, 0f, null} null => use input */
private var hardDozeAmountOverride: Float? = null
private var hardDozeAmountOverrideSource: String = "n/a"
@@ -100,8 +94,9 @@ constructor(
var fullyAwake: Boolean = false
var wakingUp = false
- private set(value) {
+ set(value) {
field = value
+ logger.logSetWakingUp(value)
willWakeUp = false
if (value) {
if (
@@ -342,8 +337,7 @@ constructor(
private fun updateDozeAmount() {
// Calculate new doze amount (linear)
- val newOutputLinearDozeAmount =
- hardDozeAmountOverride ?: max(inputLinearDozeAmount, delayedDozeAmountOverride)
+ val newOutputLinearDozeAmount = hardDozeAmountOverride ?: inputLinearDozeAmount
val changed = outputLinearDozeAmount != newOutputLinearDozeAmount
// notify when the animation is starting
@@ -361,7 +355,6 @@ constructor(
outputEasedDozeAmount = dozeAmountInterpolator.getInterpolation(outputLinearDozeAmount)
logger.logUpdateDozeAmount(
inputLinear = inputLinearDozeAmount,
- delayLinear = delayedDozeAmountOverride,
hardOverride = hardDozeAmountOverride,
outputLinear = outputLinearDozeAmount,
state = statusBarStateController.state,
@@ -379,48 +372,6 @@ constructor(
}
}
- /**
- * Notifies the wakeup coordinator that we're waking up.
- *
- * [requestDelayedAnimation] is used to request that we delay the start of the wakeup animation
- * in order to wait for a potential fingerprint authentication to arrive, since unlocking during
- * the wakeup animation looks chaotic.
- *
- * If called with [wakingUp] and [requestDelayedAnimation] both `true`, the [WakeUpListener]s
- * are guaranteed to receive at least one [WakeUpListener.onDelayedDozeAmountAnimationRunning]
- * call with `false` at some point in the near future. A call with `true` before that will
- * happen if the animation is not already running.
- */
- fun setWakingUp(wakingUp: Boolean, requestDelayedAnimation: Boolean) {
- logger.logSetWakingUp(wakingUp, requestDelayedAnimation)
- this.wakingUp = wakingUp
- if (wakingUp && requestDelayedAnimation) {
- scheduleDelayedDozeAmountAnimation()
- }
- }
-
- @Deprecated("As part of b/301915812")
- private fun scheduleDelayedDozeAmountAnimation() {
- val alreadyRunning = delayedDozeAmountAnimator != null
- logger.logStartDelayedDozeAmountAnimation(alreadyRunning)
- if (alreadyRunning) return
- delayedDozeAmount.setValue(this, 1.0f)
- delayedDozeAmountAnimator =
- ObjectAnimator.ofFloat(this, delayedDozeAmount, 0.0f).apply {
- interpolator = InterpolatorsAndroidX.LINEAR
- duration = StackStateAnimator.ANIMATION_DURATION_WAKEUP.toLong()
- startDelay = ShadeViewController.WAKEUP_ANIMATION_DELAY_MS.toLong()
- doOnStart {
- wakeUpListeners.forEach { it.onDelayedDozeAmountAnimationRunning(true) }
- }
- doOnEnd {
- delayedDozeAmountAnimator = null
- wakeUpListeners.forEach { it.onDelayedDozeAmountAnimationRunning(false) }
- }
- start()
- }
- }
-
override fun onStateChanged(newState: Int) {
logger.logOnStateChanged(newState = newState, storedState = state)
if (state == StatusBarState.SHADE && newState == StatusBarState.SHADE) {
@@ -646,7 +597,6 @@ constructor(
override fun dump(pw: PrintWriter, args: Array<out String>) {
pw.println("inputLinearDozeAmount: $inputLinearDozeAmount")
pw.println("inputEasedDozeAmount: $inputEasedDozeAmount")
- pw.println("delayedDozeAmountOverride: $delayedDozeAmountOverride")
pw.println("hardDozeAmountOverride: $hardDozeAmountOverride")
pw.println("hardDozeAmountOverrideSource: $hardDozeAmountOverrideSource")
pw.println("outputLinearDozeAmount: $outputLinearDozeAmount")
@@ -667,20 +617,10 @@ constructor(
pw.println("canShowPulsingHuns: $canShowPulsingHuns")
}
- fun logDelayingClockWakeUpAnimation(delayingAnimation: Boolean) {
- logger.logDelayingClockWakeUpAnimation(delayingAnimation)
- }
-
interface WakeUpListener {
/** Called whenever the notifications are fully hidden or shown */
fun onFullyHiddenChanged(isFullyHidden: Boolean) {}
- /**
- * Called when the animator started by [scheduleDelayedDozeAmountAnimation] begins running
- * after the start delay, or after it ends/is cancelled.
- */
- fun onDelayedDozeAmountAnimationRunning(running: Boolean) {}
-
/** Called whenever a pulse has started or stopped expanding. */
fun onPulseExpandingChanged(isPulseExpanding: Boolean) {}
}
@@ -697,19 +637,5 @@ constructor(
return coordinator.linearVisibilityAmount
}
}
-
- private val delayedDozeAmount =
- object : FloatProperty<NotificationWakeUpCoordinator>("delayedDozeAmount") {
-
- override fun setValue(coordinator: NotificationWakeUpCoordinator, value: Float) {
- coordinator.delayedDozeAmountOverride = value
- coordinator.logger.logSetDelayDozeAmountOverride(value)
- coordinator.updateDozeAmount()
- }
-
- override fun get(coordinator: NotificationWakeUpCoordinator): Float {
- return coordinator.delayedDozeAmountOverride
- }
- }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
index 752ec2d2840c..38d013c5b992 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
@@ -24,18 +24,15 @@ class NotificationWakeUpCoordinatorLogger
constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
private var allowThrottle = true
private var lastSetDozeAmountLogInputWasFractional = false
- private var lastSetDozeAmountLogDelayWasFractional = false
private var lastSetDozeAmountLogState = -1
private var lastSetHardOverride: Float? = null
private var lastOnDozeAmountChangedLogWasFractional = false
- private var lastSetDelayDozeAmountOverrideLogWasFractional = false
private var lastSetVisibilityAmountLogWasFractional = false
private var lastSetHideAmountLogWasFractional = false
private var lastSetHideAmount = -1f
fun logUpdateDozeAmount(
inputLinear: Float,
- delayLinear: Float,
hardOverride: Float?,
outputLinear: Float,
state: Int,
@@ -43,11 +40,9 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
) {
// Avoid logging on every frame of the animation if important values are not changing
val isInputFractional = inputLinear != 1f && inputLinear != 0f
- val isDelayFractional = delayLinear != 1f && delayLinear != 0f
if (
- (isInputFractional || isDelayFractional) &&
+ (isInputFractional) &&
lastSetDozeAmountLogInputWasFractional == isInputFractional &&
- lastSetDozeAmountLogDelayWasFractional == isDelayFractional &&
lastSetDozeAmountLogState == state &&
lastSetHardOverride == hardOverride &&
allowThrottle
@@ -55,7 +50,6 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
return
}
lastSetDozeAmountLogInputWasFractional = isInputFractional
- lastSetDozeAmountLogDelayWasFractional = isDelayFractional
lastSetDozeAmountLogState = state
lastSetHardOverride = hardOverride
@@ -66,15 +60,14 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
double1 = inputLinear.toDouble()
str1 = hardOverride.toString()
str2 = outputLinear.toString()
- str3 = delayLinear.toString()
int1 = state
bool1 = changed
},
{
- "updateDozeAmount() inputLinear=$double1 delayLinear=$str3" +
+ "updateDozeAmount() inputLinear=$double1" +
" hardOverride=$str1 outputLinear=$str2" +
" state=${StatusBarState.toString(int1)} changed=$bool1"
- }
+ },
)
}
@@ -86,7 +79,7 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
bool1 = dozing
str1 = source
},
- { "setDozeAmountOverride(dozing=$bool1, source=\"$str1\")" }
+ { "setDozeAmountOverride(dozing=$bool1, source=\"$str1\")" },
)
}
@@ -106,7 +99,7 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
"willRemove=$willRemove onKeyguard=$onKeyguard dozing=$dozing" +
" bypass=$bypass animating=$animating idleOnCommunal=$idleOnCommunal"
},
- { "maybeClearHardDozeAmountOverrideHidingNotifs() $str1" }
+ { "maybeClearHardDozeAmountOverrideHidingNotifs() $str1" },
)
}
@@ -122,20 +115,7 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
double1 = linear.toDouble()
str2 = eased.toString()
},
- { "onDozeAmountChanged(linear=$double1, eased=$str2)" }
- )
- }
-
- fun logSetDelayDozeAmountOverride(linear: Float) {
- // Avoid logging on every frame of the animation when values are fractional
- val isFractional = linear != 1f && linear != 0f
- if (lastSetDelayDozeAmountOverrideLogWasFractional && isFractional && allowThrottle) return
- lastSetDelayDozeAmountOverrideLogWasFractional = isFractional
- buffer.log(
- TAG,
- DEBUG,
- { double1 = linear.toDouble() },
- { "setDelayDozeAmountOverride($double1)" }
+ { "onDozeAmountChanged(linear=$double1, eased=$str2)" },
)
}
@@ -158,15 +138,6 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
buffer.log(TAG, DEBUG, { double1 = linear.toDouble() }, { "setHideAmount($double1)" })
}
- fun logStartDelayedDozeAmountAnimation(alreadyRunning: Boolean) {
- buffer.log(
- TAG,
- DEBUG,
- { bool1 = alreadyRunning },
- { "startDelayedDozeAmountAnimation() alreadyRunning=$bool1" }
- )
- }
-
fun logOnStateChanged(newState: Int, storedState: Int) {
buffer.log(
TAG,
@@ -178,7 +149,7 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
{
"onStateChanged(newState=${StatusBarState.toString(int1)})" +
" stored=${StatusBarState.toString(int2)}"
- }
+ },
)
}
@@ -187,7 +158,7 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
wasCollapsedEnoughToHide: Boolean,
isCollapsedEnoughToHide: Boolean,
couldShowPulsingHuns: Boolean,
- canShowPulsingHuns: Boolean
+ canShowPulsingHuns: Boolean,
) {
buffer.log(
TAG,
@@ -203,29 +174,12 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
"onPanelExpansionChanged($double1):" +
" collapsedEnoughToHide: $bool1 -> $bool2," +
" canShowPulsingHuns: $bool3 -> $bool4"
- }
- )
- }
-
- fun logSetWakingUp(wakingUp: Boolean, requestDelayedAnimation: Boolean) {
- buffer.log(
- TAG,
- DEBUG,
- {
- bool1 = wakingUp
- bool2 = requestDelayedAnimation
},
- { "setWakingUp(wakingUp=$bool1, requestDelayedAnimation=$bool2)" }
)
}
- fun logDelayingClockWakeUpAnimation(delayingAnimation: Boolean) {
- buffer.log(
- TAG,
- DEBUG,
- { bool1 = delayingAnimation },
- { "logDelayingClockWakeUpAnimation($bool1)" }
- )
+ fun logSetWakingUp(wakingUp: Boolean) {
+ buffer.log(TAG, DEBUG, { bool1 = wakingUp }, { "setWakingUp(wakingUp=$bool1)" })
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 6dc25aa5144f..233559c7e689 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -53,7 +53,6 @@ import android.content.IntentFilter;
import android.content.res.Configuration;
import android.graphics.Point;
import android.hardware.devicestate.DeviceStateManager;
-import android.hardware.fingerprint.FingerprintManager;
import android.metrics.LogMaker;
import android.net.Uri;
import android.os.Binder;
@@ -66,7 +65,6 @@ import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
-import android.provider.Settings;
import android.service.dreams.IDreamManager;
import android.service.notification.StatusBarNotification;
import android.util.ArraySet;
@@ -132,13 +130,11 @@ import com.android.systemui.demomode.DemoModeController;
import com.android.systemui.emergency.EmergencyGesture;
import com.android.systemui.emergency.EmergencyGestureModule.EmergencyGestureIntentFactory;
import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.fragments.ExtensionFragmentListener;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.keyguard.MigrateClocksToBlueprint;
import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.navigationbar.NavigationBarController;
@@ -251,7 +247,6 @@ import java.util.function.Consumer;
import javax.inject.Inject;
import javax.inject.Named;
-import javax.inject.Provider;
/**
* A class handling initialization and coordination between some of the key central surfaces in
@@ -380,15 +375,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
private PowerButtonReveal mPowerButtonReveal;
/**
- * Whether we should delay the wakeup animation (which shows the notifications and moves the
- * clock view). This is typically done when waking up from a 'press to unlock' gesture on a
- * device with a side fingerprint sensor, so that if the fingerprint scan is successful, we
- * can play the unlock animation directly rather than interrupting the wakeup animation part
- * way through.
- */
- private boolean mShouldDelayWakeUpAnimation = false;
-
- /**
* Whether we should delay the AOD->Lockscreen animation.
* If false, the animation will start in onStartedWakingUp().
* If true, the animation will start in onFinishedWakingUp().
@@ -450,7 +436,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
private final MessageRouter mMessageRouter;
private final WallpaperManager mWallpaperManager;
private final UserTracker mUserTracker;
- private final Provider<FingerprintManager> mFingerprintManager;
private final ActivityStarter mActivityStarter;
private final DisplayMetrics mDisplayMetrics;
@@ -702,7 +687,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
LightRevealScrim lightRevealScrim,
AlternateBouncerInteractor alternateBouncerInteractor,
UserTracker userTracker,
- Provider<FingerprintManager> fingerprintManager,
ActivityStarter activityStarter,
BrightnessMirrorShowingInteractor brightnessMirrorShowingInteractor,
GlanceableHubContainerController glanceableHubContainerController,
@@ -798,7 +782,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
mCameraLauncherLazy = cameraLauncherLazy;
mAlternateBouncerInteractor = alternateBouncerInteractor;
mUserTracker = userTracker;
- mFingerprintManager = fingerprintManager;
mActivityStarter = activityStarter;
mBrightnessMirrorShowingInteractor = brightnessMirrorShowingInteractor;
if (!SceneContainerFlag.isEnabled()) {
@@ -1523,9 +1506,9 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
return (v, event) -> {
mAutoHideController.checkUserAutoHide(event);
mRemoteInputManager.checkRemoteInputOutside(event);
- if (!MigrateClocksToBlueprint.isEnabled() || mQsController.isCustomizing()) {
- // For migrate clocks flag, when the user is editing QS tiles they need to be able
- // to touch outside the customizer to close it, such as on the status or nav bar.
+ if (mQsController.isCustomizing()) {
+ // When the user is editing QS tiles they need to be able to touch outside the
+ // customizer to close it, such as on the status or nav bar.
mShadeController.onStatusBarTouch(event);
}
return getNotificationShadeWindowView().onTouchEvent(event);
@@ -2240,11 +2223,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
}
if (mStatusBarStateController.leaveOpenOnKeyguardHide()) {
- if (!mStatusBarStateController.isKeyguardRequested()) {
- if (!MigrateClocksToBlueprint.isEnabled()) {
- mStatusBarStateController.setLeaveOpenOnKeyguardHide(false);
- }
- }
long delay = mKeyguardStateController.calculateGoingToFullShadeDelay();
mLockscreenShadeTransitionController.onHideKeyguard(delay, previousState);
@@ -2353,10 +2331,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
}
- public boolean shouldDelayWakeUpAnimation() {
- return mShouldDelayWakeUpAnimation;
- }
-
private void updateDozingState() {
if (Trace.isTagEnabled(Trace.TRACE_TAG_APP)) {
Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, "Dozing", 0);
@@ -2594,55 +2568,12 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
DejankUtils.startDetectingBlockingIpcs(tag);
mNotificationShadeWindowController.batchApplyWindowLayoutParams(()-> {
mDeviceInteractive = true;
-
- boolean isFlaggedOff = MigrateClocksToBlueprint.isEnabled();
- if (!isFlaggedOff && shouldAnimateDozeWakeup()) {
- // If this is false, the power button must be physically pressed in order to
- // trigger fingerprint authentication.
- final boolean touchToUnlockAnytime = Settings.Secure.getIntForUser(
- mContext.getContentResolver(),
- Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED,
- -1,
- mUserTracker.getUserId()) > 0;
-
- // Delay if we're waking up, not mid-doze animation (which means we are
- // cancelling a sleep), from the power button, on a device with a power button
- // FPS, and 'press to unlock' is required.
- mShouldDelayWakeUpAnimation =
- !mDozeServiceHost.isPulsing()
- && mStatusBarStateController.getDozeAmount() == 1f
- && mWakefulnessLifecycle.getLastWakeReason()
- == PowerManager.WAKE_REASON_POWER_BUTTON
- && mFingerprintManager.get() != null
- && mFingerprintManager.get().isPowerbuttonFps()
- && mKeyguardUpdateMonitor
- .isUnlockWithFingerprintPossible(
- mUserTracker.getUserId())
- && !touchToUnlockAnytime;
- if (DEBUG_WAKEUP_DELAY) {
- Log.d(TAG, "mShouldDelayWakeUpAnimation=" + mShouldDelayWakeUpAnimation);
- }
- } else {
- // If we're not animating anyway, we do not need to delay it.
- mShouldDelayWakeUpAnimation = false;
- if (DEBUG_WAKEUP_DELAY) {
- Log.d(TAG, "mShouldDelayWakeUpAnimation CLEARED");
- }
- }
-
- mShadeSurface.setWillPlayDelayedDozeAmountAnimation(
- mShouldDelayWakeUpAnimation);
- mWakeUpCoordinator.setWakingUp(
- /* wakingUp= */ true,
- mShouldDelayWakeUpAnimation);
-
+ mWakeUpCoordinator.setWakingUp(true);
updateIsKeyguard();
// TODO(b/301913237): can't delay transition if config_displayBlanksAfterDoze=true,
// otherwise, the clock will flicker during LOCKSCREEN_TRANSITION_FROM_AOD
mShouldDelayLockscreenTransitionFromAod = mDozeParameters.getAlwaysOn()
- && !mDozeParameters.getDisplayNeedsBlanking()
- && mFeatureFlags.isEnabled(
- Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD);
+ && !mDozeParameters.getDisplayNeedsBlanking();
if (!mShouldDelayLockscreenTransitionFromAod) {
startLockscreenTransitionFromAod();
}
@@ -2678,7 +2609,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
this::startLockscreenTransitionFromAod);
}
mWakeUpCoordinator.setFullyAwake(true);
- mWakeUpCoordinator.setWakingUp(false, false);
+ mWakeUpCoordinator.setWakingUp(false);
if (mKeyguardStateController.isOccluded()
&& !mDozeParameters.canControlUnlockedScreenOff()) {
// When the keyguard is occluded we don't use the KEYGUARD state which would
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index d157cf2d51e0..411c81d13e0b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -69,7 +69,6 @@ import android.graphics.Rect;
import android.hardware.devicestate.DeviceState;
import android.hardware.devicestate.DeviceStateManager;
import android.hardware.display.AmbientDisplayConfiguration;
-import android.hardware.fingerprint.FingerprintManager;
import android.metrics.LogMaker;
import android.os.Binder;
import android.os.Handler;
@@ -123,7 +122,6 @@ import com.android.systemui.emergency.EmergencyGestureModule.EmergencyGestureInt
import com.android.systemui.flags.DisableSceneContainer;
import com.android.systemui.flags.EnableSceneContainer;
import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.keyguard.KeyguardViewMediator;
@@ -360,7 +358,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
@Mock private AlternateBouncerInteractor mAlternateBouncerInteractor;
@Mock private UserTracker mUserTracker;
@Mock private AvalancheProvider mAvalancheProvider;
- @Mock private FingerprintManager mFingerprintManager;
@Mock IPowerManager mPowerManagerService;
@Mock ActivityStarter mActivityStarter;
@Mock private WindowRootViewVisibilityInteractor mWindowRootViewVisibilityInteractor;
@@ -399,8 +396,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
// Set default value to avoid IllegalStateException.
mFeatureFlags.set(SHORTCUT_LIST_SEARCH_LAYOUT, false);
- // Turn AOD on and toggle feature flag for jank fixes
- mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true);
when(mDozeParameters.getAlwaysOn()).thenReturn(true);
IThermalService thermalService = mock(IThermalService.class);
@@ -443,7 +438,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
mVisualInterruptionDecisionProvider.start();
mContext.addMockSystemService(TrustManager.class, mock(TrustManager.class));
- mContext.addMockSystemService(FingerprintManager.class, mock(FingerprintManager.class));
mMetricsLogger = new FakeMetricsLogger();
@@ -637,7 +631,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
mLightRevealScrim,
mAlternateBouncerInteractor,
mUserTracker,
- () -> mFingerprintManager,
mActivityStarter,
mBrightnessMirrorShowingInteractor,
mGlanceableHubContainerController,
@@ -1121,27 +1114,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
verify(mStatusBarStateController).setState(SHADE);
}
- /** Regression test for b/298355063 */
- @Test
- public void fingerprintManagerNull_noNPE() {
- // GIVEN null fingerprint manager
- mFingerprintManager = null;
- createCentralSurfaces();
-
- // GIVEN should animate doze wakeup
- when(mDozeServiceHost.shouldAnimateWakeup()).thenReturn(true);
- when(mBiometricUnlockController.getMode()).thenReturn(
- BiometricUnlockController.MODE_ONLY_WAKE);
- when(mDozeServiceHost.isPulsing()).thenReturn(false);
- when(mStatusBarStateController.getDozeAmount()).thenReturn(1f);
-
- // WHEN waking up from the power button
- mWakefulnessLifecycle.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
- mCentralSurfaces.mWakefulnessObserver.onStartedWakingUp();
-
- // THEN no NPE when fingerprintManager is null
- }
-
@Test
@DisableFlags(StatusBarConnectedDisplays.FLAG_NAME)
public void bubbleBarVisibility() {