Fix TabGroupModelFilter casting exception
TabUiFeatureUtilities.isTabGroupsAndroidEnabled() does not guarantee TabModelFilterProvider().getTabModelFilter() returns TabGroupModelFilter. It can return null before TabModelSelectorBase#initialize() is called. This CL early returns when TabModelFilterProvider().getTabModelFilter() is not a TabGroupModelFilter to avoid the casting exception. This CL is gated by Finch parameter "enable_launch_polish" under flag "enable-tab-grid-layout", with gate function TabUiFeatureUtilities#isLaunchPolishEnabled. Bug: 1133922 Change-Id: I9766d4f0f54c954f8205866aa0c514b508d7a5a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442479 Commit-Queue: Mei Liang <meiliang@chromium.org> Reviewed-by:Wei-Yin Chen (陳威尹) <wychen@chromium.org> Cr-Commit-Position: refs/heads/master@{#812865}
Showing
Please register or sign in to comment