From 12c0ea2c98245bb8ef74ea42d09a3058e2c0a2e4 Mon Sep 17 00:00:00 2001 From: Candice Lo Date: Tue, 25 Apr 2023 10:51:33 +0000 Subject: [PATCH] Provides text preview whenever the seekbar progress changes When the font scale is modified by the icon buttons, we also like to show the preview of text first to avoid the feeling of lag for users to wait for the system font size change. Bug: 279525588 Test: manually - attach the video to the bug Change-Id: I8da85eb9b264f331c4347a87e2107d52872f4274 --- .../accessibility/fontscaling/FontScalingDialog.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialog.kt b/packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialog.kt index a5b7878f22aa0..e79b3f4bf3ad3 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialog.kt +++ b/packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialog.kt @@ -107,13 +107,13 @@ class FontScalingDialog( var isTrackingTouch = false override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { + // Always provide preview configuration for text first when there is a change + // in the seekbar progress. + createTextPreview(progress) + if (!isTrackingTouch) { // The seekbar progress is changed by icon buttons changeFontSize(progress, CHANGE_BY_BUTTON_DELAY_MS) - } else { - // Provide preview configuration for text instead of changing the system - // font scale before users release their finger from the seekbar. - createTextPreview(progress) } }