diff options
| author | 2023-04-25 10:51:33 +0000 | |
|---|---|---|
| committer | 2023-05-03 09:06:15 +0000 | |
| commit | 12c0ea2c98245bb8ef74ea42d09a3058e2c0a2e4 (patch) | |
| tree | 963e9c213142f05dc0acf9eb5dd0fcc0d6767395 | |
| parent | c2261f46947b7c22153a10583e16e5802b883e22 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialog.kt | 8 |
1 files 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 a5b7878f22aa..e79b3f4bf3ad 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) } } |