Fix TabSelectionEditor no show issue after using the system back button
crrev.com/c/2399314 uses a focusable PopupWindow for accessibility support. The focusable PopupWindow catches the system back button event and dismisses the PopupWindow directly without going through the TabSelectionEditorMediator#hide, where it updates the TabSelectionEditorProperties#IS_VISIBLE property from true to false. The TabSelectionEditorProperties#IS_VISIBLE remains to be true. Then TabSelectionEditorMediator#show is called again to show the TabSelectionEditor has no effects. Since there is no property change, the binder will not get triggered. This CL fixes the issue by setting the TabSelectionEditorMediator#hide as a Runnable to the TabSelectionEditorProperties, then binding it to the TabSelectionEditorLayout and triggering the Runnable when the PopupWindow is dismissed. Everything introduced in this CL is gated by by Finch parameter "enable_launch_polish" under flag "enable-tab-grid-layout". Most of the code is verified to be behind the gating function TabUiFeatureUtilities#isLaunchPolishEnabled by formal equivalence checking tool here: http://crrev.com/c/1934235. The changes in following files can't be verified by the tool, but it is expected and no-op without the flags: * The new property in TabSelectionEditorProperties Bug: 1132478 Change-Id: I774d13714445e76da9c9ef4573412b62bf042039 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432969 Commit-Queue: Mei Liang <meiliang@chromium.org> Reviewed-by:Wei-Yin Chen (陳威尹) <wychen@chromium.org> Cr-Commit-Position: refs/heads/master@{#811025}
Showing
Please register or sign in to comment