diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt index 79360370d937..13c2ffb70220 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt @@ -19,6 +19,8 @@ package com.android.systemui.keyguard.ui.binder import android.graphics.Rect import android.view.View +import android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED +import android.widget.TextView import androidx.core.view.isVisible import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle @@ -47,7 +49,7 @@ object KeyguardSettingsViewBinder { touchHandlingViewModel: KeyguardTouchHandlingViewModel, rootViewModel: KeyguardRootViewModel?, vibratorHelper: VibratorHelper, - activityStarter: ActivityStarter + activityStarter: ActivityStarter, ): DisposableHandle { val disposableHandle = view.repeatWhenAttached { @@ -57,19 +59,16 @@ object KeyguardSettingsViewBinder { view.animateVisibility(visible = isVisible) if (isVisible) { vibratorHelper.vibrate(KeyguardBottomAreaVibrations.Activated) + val textView = view.requireViewById(R.id.text) as TextView view.setOnTouchListener( - KeyguardSettingsButtonOnTouchListener( - viewModel = viewModel, - ) + KeyguardSettingsButtonOnTouchListener(viewModel = viewModel) ) IconViewBinder.bind( icon = viewModel.icon, view = view.requireViewById(R.id.icon), ) - TextViewBinder.bind( - view = view.requireViewById(R.id.text), - viewModel = viewModel.text, - ) + TextViewBinder.bind(view = textView, viewModel = viewModel.text) + textView.sendAccessibilityEvent(TYPE_VIEW_FOCUSED) } } } @@ -108,15 +107,12 @@ object KeyguardSettingsViewBinder { } /** Opens the wallpaper picker screen after the device is unlocked by the user. */ - private fun navigateToLockScreenSettings( - activityStarter: ActivityStarter, - view: View, - ) { + private fun navigateToLockScreenSettings(activityStarter: ActivityStarter, view: View) { activityStarter.postStartActivityDismissingKeyguard( WallpaperPickerIntentUtils.getIntent(view.context, LAUNCH_SOURCE_KEYGUARD), /* delay= */ 0, /* animationController= */ ActivityTransitionAnimator.Controller.fromView(view), - /* customMessage= */ view.context.getString(R.string.keyguard_unlock_to_customize_ls) + /* customMessage= */ view.context.getString(R.string.keyguard_unlock_to_customize_ls), ) } |