As noticeable in the FragmentManager
documentation, getFragments()
is not a public method available to apps, but an internal implementation detail of the Support Library, hence the use of the RestrictTo
annotation that was added to prevent usage of private APIs.
You’ll want to change your code to not use getFragments
and only use the public APIs.