isAccessGranted

@MinApiLevel(value = 4)
public boolean isAccessGranted(@NonNull() String packageName)

Returns the grant status of USB access permission for the given app. If this method returns true for a package, then the app does not need to request for permission via requestPermission.

Return

true if access is granted, false otherwise

Parameters

packageName

package name for the target app