Remove released flag: keyboard nav. fix. Fix: 409610301 Test: presubmits Flag: EXEMPT removing com.android.intentresolver.keyboard_navigation_fix Change-Id: Id91a457f6dd21f2ec0bfbbef72f20b6fcd8d6041
diff --git a/aconfig/FeatureFlags.aconfig b/aconfig/FeatureFlags.aconfig index 19d1642..393eeb1 100644 --- a/aconfig/FeatureFlags.aconfig +++ b/aconfig/FeatureFlags.aconfig
@@ -73,16 +73,6 @@ } flag { - name: "keyboard_navigation_fix" - namespace: "intentresolver" - description: "Enable Chooser keyboard navigation bugfix" - bug: "325259478" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "rebuild_adapters_on_target_pinning" namespace: "intentresolver" description: "Rebuild and swap adapters when a target gets (un)pinned to avoid flickering."
diff --git a/java/src/com/android/intentresolver/ChooserActivity.java b/java/src/com/android/intentresolver/ChooserActivity.java index c7d146e..aaaa939 100644 --- a/java/src/com/android/intentresolver/ChooserActivity.java +++ b/java/src/com/android/intentresolver/ChooserActivity.java
@@ -26,7 +26,6 @@ import static com.android.intentresolver.Flags.delayDrawerOffsetCalculation; import static com.android.intentresolver.Flags.fixShortcutsFlashingFixed; import static com.android.intentresolver.Flags.interactiveSession; -import static com.android.intentresolver.Flags.keyboardNavigationFix; import static com.android.intentresolver.Flags.rebuildAdaptersOnTargetPinning; import static com.android.intentresolver.Flags.refineSystemActions; import static com.android.intentresolver.Flags.shareouselUpdateExcludeComponentsExtra; @@ -1378,16 +1377,14 @@ mChooserMultiProfilePagerAdapter.setupViewPager(mViewPager); ChooserNestedScrollView scrollableContainer = requireViewById(R.id.chooser_scrollable_container); - if (keyboardNavigationFix()) { - scrollableContainer.setRequestChildFocusPredicate((child, focused) -> - // TabHost view will request focus on the newly activated tab. The RecyclerView - // from the tab gets focused and notifies its parents (including - // NestedScrollView) about it through #requestChildFocus method call. - // NestedScrollView's view implementation of the method will scroll to the - // focused view. As we don't want to change drawer's position upon tab change, - // ignore focus requests from tab RecyclerViews. - focused == null || focused.getId() != com.android.internal.R.id.resolver_list); - } + scrollableContainer.setRequestChildFocusPredicate((child, focused) -> + // TabHost view will request focus on the newly activated tab. The RecyclerView + // from the tab gets focused and notifies its parents (including + // NestedScrollView) about it through #requestChildFocus method call. + // NestedScrollView's view implementation of the method will scroll to the + // focused view. As we don't want to change drawer's position upon tab change, + // ignore focus requests from tab RecyclerViews. + focused == null || focused.getId() != com.android.internal.R.id.resolver_list); boolean result = postRebuildList(rebuildCompleted); Trace.endSection(); return result;
diff --git a/java/src/com/android/intentresolver/profiles/ChooserMultiProfilePagerAdapter.java b/java/src/com/android/intentresolver/profiles/ChooserMultiProfilePagerAdapter.java index 677b636..9176cd3 100644 --- a/java/src/com/android/intentresolver/profiles/ChooserMultiProfilePagerAdapter.java +++ b/java/src/com/android/intentresolver/profiles/ChooserMultiProfilePagerAdapter.java
@@ -16,8 +16,6 @@ package com.android.intentresolver.profiles; -import static com.android.intentresolver.Flags.keyboardNavigationFix; - import android.content.Context; import android.os.UserHandle; import android.view.LayoutInflater; @@ -127,9 +125,6 @@ LayoutInflater inflater = LayoutInflater.from(context); ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.chooser_list_per_profile_wrap, null, false); - if (!keyboardNavigationFix()) { - rootView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); - } RecyclerView recyclerView = rootView.findViewById(com.android.internal.R.id.resolver_list); recyclerView.setAccessibilityDelegateCompat( new ChooserRecyclerViewAccessibilityDelegate(recyclerView));
diff --git a/java/src/com/android/intentresolver/widget/ChooserNestedScrollView.kt b/java/src/com/android/intentresolver/widget/ChooserNestedScrollView.kt index a9577cf..55a46ff 100644 --- a/java/src/com/android/intentresolver/widget/ChooserNestedScrollView.kt +++ b/java/src/com/android/intentresolver/widget/ChooserNestedScrollView.kt
@@ -25,7 +25,6 @@ import androidx.core.view.marginLeft import androidx.core.view.marginRight import androidx.core.view.marginTop -import com.android.intentresolver.Flags.keyboardNavigationFix /** * A narrowly tailored [NestedScrollView] to be used inside [ResolverDrawerLayout] and help to @@ -109,11 +108,7 @@ } override fun onRequestChildFocus(child: View?, focused: View?) { - if (keyboardNavigationFix()) { - if (requestChildFocusPredicate(child, focused)) { - super.onRequestChildFocus(child, focused) - } - } else { + if (requestChildFocusPredicate(child, focused)) { super.onRequestChildFocus(child, focused) } }