[Android] Componentize and dedupe getSpecializedHandlersWithFilter
This CL dedupes the //chrome and //weblayer implementations of getSpecializedHandlersWithFilter() into a static function in ExternalNavigationHandler.java. There is a slight difference between the two impls: //chrome's does not consider the InstantApp launcher as a specialized handler because it handles launching of Instant Apps internally. WebLayer, however, does not handle launching of Instant Apps itself and instead lets the system do so as appropriate. We handle this by adding a parameter to the new //components-level version of the function. We also move the tests of this function to ExternalNavigationHandlerTest.java, including testing the behavior in response to the value of this new parameter. A followup CL will dedupe and eliminate the ExternalNavigationDelegate methods that can be implemented within ExternalNavigationHandler following this change. Bug: 1071390 Change-Id: I701c4aa8c46260de3357b3d52e536a237d8c7b60 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184277Reviewed-by:Michael Thiessen <mthiesse@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#766447}
Showing
Please register or sign in to comment