summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hawkwood Glazier <jglazier@google.com> 2024-09-18 21:19:12 +0000
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2024-09-19 00:34:46 +0000
commitefb3bf540fc6cef04f5cba5c78267b11383bc549 (patch)
tree72ce94136b2f82a9bbca8178efe3a7f231b70e8a
parenteb084db4cedc34a0d6dcf5f41a55829851ee249d (diff)
Revert "Refresh Notification Shelf layout when it becomes visible"
This reverts commit 73444553956a6e7cec6edcf3015a8eaa50b9dcdf. Reason for revert: b/368102426 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0a9a1b9c50435c4235f08d28eec1f10fade0288f) Merged-In: I1ae2ac8cd59fafad0d55fb3500438edfd03e9a1c Change-Id: I1ae2ac8cd59fafad0d55fb3500438edfd03e9a1c
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt39
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBlueprintViewModel.kt15
2 files changed, 28 insertions, 26 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
index deb0b2d8f848..b5f6b418e322 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
@@ -261,7 +261,10 @@ object KeyguardRootViewBinder {
->
if (biometricMessage?.message != null) {
chipbarCoordinator!!.displayView(
- createChipbarInfo(biometricMessage.message, R.drawable.ic_lock)
+ createChipbarInfo(
+ biometricMessage.message,
+ R.drawable.ic_lock,
+ )
)
} else {
chipbarCoordinator!!.removeView(ID, "occludingAppMsgNull")
@@ -324,16 +327,12 @@ object KeyguardRootViewBinder {
.getDimensionPixelSize(R.dimen.shelf_appear_translation)
.stateIn(this)
viewModel.isNotifIconContainerVisible.collect { isVisible ->
- if (isVisible.value) {
- blueprintViewModel.refreshBlueprint()
- } else {
- childViews[aodNotificationIconContainerId]
- ?.setAodNotifIconContainerIsVisible(
- isVisible,
- iconsAppearTranslationPx.value,
- screenOffAnimationController,
- )
- }
+ childViews[aodNotificationIconContainerId]
+ ?.setAodNotifIconContainerIsVisible(
+ isVisible,
+ iconsAppearTranslationPx.value,
+ screenOffAnimationController,
+ )
}
}
@@ -383,7 +382,7 @@ object KeyguardRootViewBinder {
if (msdlFeedback()) {
msdlPlayer?.playToken(
MSDLToken.UNLOCK,
- authInteractionProperties,
+ authInteractionProperties
)
} else {
vibratorHelper.performHapticFeedback(
@@ -399,7 +398,7 @@ object KeyguardRootViewBinder {
if (msdlFeedback()) {
msdlPlayer?.playToken(
MSDLToken.FAILURE,
- authInteractionProperties,
+ authInteractionProperties
)
} else {
vibratorHelper.performHapticFeedback(
@@ -426,7 +425,7 @@ object KeyguardRootViewBinder {
blueprintViewModel,
clockViewModel,
childViews,
- burnInParams,
+ burnInParams
)
)
@@ -465,7 +464,11 @@ object KeyguardRootViewBinder {
*/
private fun createChipbarInfo(message: String, @DrawableRes icon: Int): ChipbarInfo {
return ChipbarInfo(
- startIcon = TintedIcon(Icon.Resource(icon, null), ChipbarInfo.DEFAULT_ICON_TINT),
+ startIcon =
+ TintedIcon(
+ Icon.Resource(icon, null),
+ ChipbarInfo.DEFAULT_ICON_TINT,
+ ),
text = Text.Loaded(message),
endItem = null,
vibrationEffect = null,
@@ -496,7 +499,7 @@ object KeyguardRootViewBinder {
oldLeft: Int,
oldTop: Int,
oldRight: Int,
- oldBottom: Int,
+ oldBottom: Int
) {
// After layout, ensure the notifications are positioned correctly
childViews[nsslPlaceholderId]?.let { notificationListPlaceholder ->
@@ -512,7 +515,7 @@ object KeyguardRootViewBinder {
viewModel.onNotificationContainerBoundsChanged(
notificationListPlaceholder.top.toFloat(),
notificationListPlaceholder.bottom.toFloat(),
- animate = shouldAnimate,
+ animate = shouldAnimate
)
}
@@ -528,7 +531,7 @@ object KeyguardRootViewBinder {
Int.MAX_VALUE
} else {
view.getTop()
- },
+ }
)
}
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBlueprintViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBlueprintViewModel.kt
index 4cf3c4e7f6d0..c6efcfad8da7 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBlueprintViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBlueprintViewModel.kt
@@ -25,18 +25,20 @@ import androidx.constraintlayout.widget.ConstraintLayout
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor
import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransition.Config
-import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransition.Type
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
-data class TransitionData(val config: Config, val start: Long = System.currentTimeMillis())
+data class TransitionData(
+ val config: Config,
+ val start: Long = System.currentTimeMillis(),
+)
class KeyguardBlueprintViewModel
@Inject
constructor(
@Main private val handler: Handler,
- private val keyguardBlueprintInteractor: KeyguardBlueprintInteractor,
+ keyguardBlueprintInteractor: KeyguardBlueprintInteractor,
) {
val blueprint = keyguardBlueprintInteractor.blueprint
val blueprintId = keyguardBlueprintInteractor.blueprintId
@@ -74,9 +76,6 @@ constructor(
}
}
- fun refreshBlueprint(type: Type = Type.NoTransition) =
- keyguardBlueprintInteractor.refreshBlueprint(type)
-
fun updateTransitions(data: TransitionData?, mutate: MutableSet<Transition>.() -> Unit) {
runningTransitions.mutate()
@@ -96,7 +95,7 @@ constructor(
Log.w(
TAG,
"runTransition: skipping ${transition::class.simpleName}: " +
- "currentPriority=$currentPriority; config=$config",
+ "currentPriority=$currentPriority; config=$config"
)
}
apply()
@@ -107,7 +106,7 @@ constructor(
Log.i(
TAG,
"runTransition: running ${transition::class.simpleName}: " +
- "currentPriority=$currentPriority; config=$config",
+ "currentPriority=$currentPriority; config=$config"
)
}