commit | e12999faf71bc8b86e0532f783298436a7e0098a | [log] [tgz] |
---|---|---|
author | Yabin Huang <yabinh@google.com> | Fri Oct 08 20:30:20 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Oct 08 20:30:20 2021 +0000 |
tree | 82a8889db93bfe8f460073497a01e7115bfeb032 | |
parent | 4e280349f35d1b36684fd13ce9111ae394546ddc [diff] | |
parent | a45bf643bd953a1ad5153237a332bacaadb065f7 [diff] |
Restore focus inside the LazyLayoutView properly am: a45bf643bd Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/Media/+/15987299 Change-Id: Ia6377c51300f5d63bf31562b4f89edf04ad7af3f
diff --git a/src/com/android/car/media/MediaActivityController.java b/src/com/android/car/media/MediaActivityController.java index deda8e1..9811945 100644 --- a/src/com/android/car/media/MediaActivityController.java +++ b/src/com/android/car/media/MediaActivityController.java
@@ -448,6 +448,10 @@ if (carUiRecyclerView != null && carUiRecyclerView instanceof LazyLayoutView && !carUiRecyclerView.getView().hasFocus() && !carUiRecyclerView.getView().isInTouchMode()) { + // Park the focus on the FocusParkingView to ensure that it can restore focus inside + // the LazyLayoutView successfully later. + mFpv.performAccessibilityAction(ACTION_FOCUS, null); + LazyLayoutView lazyLayoutView = (LazyLayoutView) carUiRecyclerView; com.android.car.ui.utils.ViewUtils.initFocus(lazyLayoutView); }