Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt +32 −0 Original line number Diff line number Diff line Loading @@ -219,5 +219,37 @@ constructor( sensorRect.left ) } // This is only intended to be here until the KeyguardBottomAreaRefactor flag is enabled // Without this logic, the lock icon location changes but the KeyguardBottomAreaView is not // updated and visible ui layout jank occurs. This is due to AmbientIndicationContainer // being in NPVC and laying out prior to the KeyguardRootView. // Remove when both DeviceEntryUdfpsRefactor and KeyguardBottomAreaRefactor are enabled. if (DeviceEntryUdfpsRefactor.isEnabled && !KeyguardBottomAreaRefactor.isEnabled) { with(notificationPanelView) { val isUdfpsSupported = deviceEntryIconViewModel.get().isUdfpsSupported.value val bottomAreaViewRight = findViewById<View>(R.id.keyguard_bottom_area)?.right ?: 0 findViewById<View>(R.id.ambient_indication_container)?.let { val (ambientLeft, ambientTop) = it.locationOnScreen if (isUdfpsSupported) { // make top of ambient indication view the bottom of the lock icon it.layout( ambientLeft, sensorRect.bottom, bottomAreaViewRight - ambientLeft, ambientTop + it.measuredHeight ) } else { // make bottom of ambient indication view the top of the lock icon it.layout( ambientLeft, sensorRect.top - it.measuredHeight, bottomAreaViewRight - ambientLeft, sensorRect.top ) } } } } } } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt +32 −0 Original line number Diff line number Diff line Loading @@ -219,5 +219,37 @@ constructor( sensorRect.left ) } // This is only intended to be here until the KeyguardBottomAreaRefactor flag is enabled // Without this logic, the lock icon location changes but the KeyguardBottomAreaView is not // updated and visible ui layout jank occurs. This is due to AmbientIndicationContainer // being in NPVC and laying out prior to the KeyguardRootView. // Remove when both DeviceEntryUdfpsRefactor and KeyguardBottomAreaRefactor are enabled. if (DeviceEntryUdfpsRefactor.isEnabled && !KeyguardBottomAreaRefactor.isEnabled) { with(notificationPanelView) { val isUdfpsSupported = deviceEntryIconViewModel.get().isUdfpsSupported.value val bottomAreaViewRight = findViewById<View>(R.id.keyguard_bottom_area)?.right ?: 0 findViewById<View>(R.id.ambient_indication_container)?.let { val (ambientLeft, ambientTop) = it.locationOnScreen if (isUdfpsSupported) { // make top of ambient indication view the bottom of the lock icon it.layout( ambientLeft, sensorRect.bottom, bottomAreaViewRight - ambientLeft, ambientTop + it.measuredHeight ) } else { // make bottom of ambient indication view the top of the lock icon it.layout( ambientLeft, sensorRect.top - it.measuredHeight, bottomAreaViewRight - ambientLeft, sensorRect.top ) } } } } } }