Reland "[WebLayer] Fix FragmentActivityReplacer with SupportLifecycleFragmentImpl"
This is a fixed reland of a3349311 In the original CL, I removed the code that made Fragment.getActivity() non-final, as our approach no longer relied on overriding it. However, the PromptDialogDelegate interface in the hats20 library, which other Fragment subclasses in that library implement, defines an `Activity getActivity()` method. Fragment.getActivity() is considered the implementation of this method from a typechecking perspective, but javac still generates a getActivity implementation that calls the parent class's. This didn't cause issues before because the two methods returned different types, but now that Fragment.getActivity() returns an Activity, the bytecode verifier thinks the javac-generated getActivity from PromptDialogDelegate is extending Fragment's implementation, which it can't do because it's final. Making Fragment.getActivity() non-final again fixes the issue. Original change's description: > [WebLayer] Fix FragmentActivityReplacer with SupportLifecycleFragmentImpl > > This fixes a comilation error due to FragmentActivityReplacer's > interaction with SupportLifecycleFragmentImpl. > > Bug: 1152898, 1123216 > Change-Id: I81de8100f7ddd08310f8a36c8f1c9c62e82c0469 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566455 > Reviewed-by: Andrew Grieve <agrieve@chromium.org> > Reviewed-by: Sam Maier <smaier@chromium.org> > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> > Cr-Commit-Position: refs/heads/master@{#832426} Bug: 1152898 Bug: 1123216 Change-Id: Ibf923570bbb27d5ffb0a337775aac449b59d5986 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2569950 Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Reviewed-by:
Sam Maier <smaier@chromium.org> Cr-Commit-Position: refs/heads/master@{#833457}
Showing
Please register or sign in to comment