Merge "Make keyguard binders update their own views" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b185fae3d9
@@ -67,14 +67,15 @@ object KeyguardAmbientIndicationAreaViewBinder {
|
||||
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||
launch {
|
||||
keyguardRootViewModel.alpha.collect { alpha ->
|
||||
view.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
|
||||
ambientIndicationArea?.alpha = alpha
|
||||
ambientIndicationArea?.apply {
|
||||
this.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
this.alpha = alpha
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,14 +176,15 @@ object KeyguardBottomAreaViewBinder {
|
||||
|
||||
launch {
|
||||
viewModel.alpha.collect { alpha ->
|
||||
view.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
|
||||
ambientIndicationArea?.alpha = alpha
|
||||
ambientIndicationArea?.apply {
|
||||
this.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
this.alpha = alpha
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,25 +73,27 @@ object KeyguardIndicationAreaBinder {
|
||||
launch {
|
||||
if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
|
||||
keyguardRootViewModel.alpha.collect { alpha ->
|
||||
view.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
|
||||
indicationArea.alpha = alpha
|
||||
indicationArea.apply {
|
||||
this.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
this.alpha = alpha
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewModel.alpha.collect { alpha ->
|
||||
view.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
|
||||
indicationArea.alpha = alpha
|
||||
indicationArea.apply {
|
||||
this.importantForAccessibility =
|
||||
if (alpha == 0f) {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
} else {
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
|
||||
}
|
||||
this.alpha = alpha
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user