Skip to content

Instantly share code, notes, and snippets.

@talosdev
Created May 29, 2018 08:32
Show Gist options
  • Select an option

  • Save talosdev/a703fffaccb4ce1cab3b50cd7c4d9aaa to your computer and use it in GitHub Desktop.

Select an option

Save talosdev/a703fffaccb4ce1cab3b50cd7c4d9aaa to your computer and use it in GitHub Desktop.
@Override
public boolean checkHasPermission() {
if (activityWeakReference.get() != null) {
Activity activity = activityWeakReference.get();
return ContextCompat.checkSelfPermission(activity, permission)
== PackageManager.PERMISSION_GRANTED;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment