summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjunklu <quic_junklu@quicinc.com>2023-02-14 16:08:26 +0800
committerJunkang Lu <quic_junklu@quicinc.com>2023-02-14 08:48:43 +0000
commiteb3edef5ada09ddfa14848b46516ee12c2695260 (patch)
tree3dd619da5ee9afe65edd5b43dd00bb068d582680
parentc27d35293e4a10b38ee06338c070570a2ccafd21 (diff)
SystemUI: Fix emergency call button shows on lock screen
The control logic of emergency call button was removed in the refactoring, causing the emergency call button to show on the lock screen. Migrate the control logic to the refactored file. Change-Id: Iac771cd6c8c167c15832bdab1fccfcff3b6c8c50 CRs-Fixed: 3405434
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
index c4e3d4e4c1b5..d905cb7280a7 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
@@ -27,6 +27,7 @@ import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
+import com.android.keyguard.EmergencyCarrierArea
import com.android.settingslib.Utils
import com.android.systemui.R
import com.android.systemui.animation.ActivityLaunchAnimator
@@ -86,6 +87,8 @@ object KeyguardBottomAreaViewBinder {
val indicationText: TextView = view.requireViewById(R.id.keyguard_indication_text)
val indicationTextBottom: TextView =
view.requireViewById(R.id.keyguard_indication_text_bottom)
+ val emergencyCarrierArea: EmergencyCarrierArea =
+ view.requireViewById(R.id.keyguard_selector_fade_container)
view.clipChildren = false
view.clipToPadding = false
@@ -122,6 +125,16 @@ object KeyguardBottomAreaViewBinder {
} else {
View.INVISIBLE
}
+ val showEmergencyButton: Boolean =
+ view.context.resources.getBoolean(R.bool.config_showEmergencyButton)
+ emergencyCarrierArea.visibility =
+ if (!showEmergencyButton) {
+ View.GONE
+ } else if (isVisible) {
+ View.VISIBLE
+ } else {
+ View.INVISIBLE
+ }
}
}
@@ -138,6 +151,7 @@ object KeyguardBottomAreaViewBinder {
indicationArea.alpha = alpha
startButton.alpha = alpha
endButton.alpha = alpha
+ emergencyCarrierArea.alpha = alpha
}
}