Closed hotchemi closed 6 years ago
Some additional context:
We allow our users to exclude the support for "Native Fragments" (i.e. android.app.Fragment
) included in PermissionsDispatcher. To do this, the Gradle dependency needs to have an exclude
clause that skips the transitive dependency on support-v13
.
If a user accidentally removes this transitive dependency, but still tries to use PermissionsDispatcher with an android.app.Fragment
, their app will crash. To prevent this behavior, this Lint check was proposed. It should:
android.app.Fragment
annotated with @RuntimePermissions
Class.forName
lookup of any class in the support-v13
library (preferably FragmentCompat
) - this lookup should be performed only once, to keep reflection penalties lowsupport-v13
class, everything is OK - if not, the issue is triggeredI'd say the severity of this Lint issue would be pretty high (at least an 8). In terms of the naming, how about something like MissingFragmentPermissionsDependency
?
Happy closing 😇 ref: https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/445
https://github.com/hotchemi/PermissionsDispatcher/pull/306#issuecomment-298237438