Loading packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt +8 −1 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ object UserSwitcherViewBinder { } } sectionView.removeAllViewsInLayout() sectionView.removeAllViewsInLayout() for (viewModel in section) { section.onEachIndexed { index, viewModel -> val view = val view = layoutInflater.inflate( layoutInflater.inflate( R.layout.user_switcher_fullscreen_popup_item, R.layout.user_switcher_fullscreen_popup_item, Loading @@ -237,6 +237,13 @@ object UserSwitcherViewBinder { view.resources.getString(viewModel.textResourceId) view.resources.getString(viewModel.textResourceId) view.setOnClickListener { viewModel.onClicked() } view.setOnClickListener { viewModel.onClicked() } sectionView.addView(view) sectionView.addView(view) // Ensure that the first item in the first section gets accessibility focus. // Request for focus with a delay when view is inflated an added to the listview. if (index == 0 && position == 0) { view.postDelayed({ view.requestAccessibilityFocus() }, 200) } } } return sectionView return sectionView } } Loading Loading
packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt +8 −1 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ object UserSwitcherViewBinder { } } sectionView.removeAllViewsInLayout() sectionView.removeAllViewsInLayout() for (viewModel in section) { section.onEachIndexed { index, viewModel -> val view = val view = layoutInflater.inflate( layoutInflater.inflate( R.layout.user_switcher_fullscreen_popup_item, R.layout.user_switcher_fullscreen_popup_item, Loading @@ -237,6 +237,13 @@ object UserSwitcherViewBinder { view.resources.getString(viewModel.textResourceId) view.resources.getString(viewModel.textResourceId) view.setOnClickListener { viewModel.onClicked() } view.setOnClickListener { viewModel.onClicked() } sectionView.addView(view) sectionView.addView(view) // Ensure that the first item in the first section gets accessibility focus. // Request for focus with a delay when view is inflated an added to the listview. if (index == 0 && position == 0) { view.postDelayed({ view.requestAccessibilityFocus() }, 200) } } } return sectionView return sectionView } } Loading