Skip to content

Commit

Permalink
Merge pull request #17 from NeverMorer/master
Browse files Browse the repository at this point in the history
修复检查权限bug
  • Loading branch information
sw926 authored Oct 10, 2017
2 parents 1e82bb9 + 1248bfa commit e951887
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface Callback {
@SuppressWarnings("WeakerAccess")
public void checkAndRequestPermission(@NonNull Activity activity, int requestCode, @NonNull Callback callback, @NonNull String... permissions) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (isHavePermissions(activity)) {
if (isHavePermissions(activity, permissions)) {
callback.onRequestPermissionsCallback(true);
setCurrentRequest(null, null, -1);
} else {
Expand All @@ -47,7 +47,7 @@ public void checkAndRequestPermission(@NonNull Activity activity, int requestCod
@SuppressWarnings("WeakerAccess")
public void checkAndRequestPermission(@NonNull Fragment fragment, int requestCode, @NonNull Callback callback, @NonNull String... permissions) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (isHavePermissions(fragment.getContext())) {
if (isHavePermissions(fragment.getContext(), permissions)) {
callback.onRequestPermissionsCallback(true);
setCurrentRequest(null, null, -1);
} else {
Expand Down

0 comments on commit e951887

Please sign in to comment.