Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ficat committed Jun 19, 2018
1 parent 1ec855a commit fb7175f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public void onCreate(Bundle savedInstanceState) {
void requestPermissions(@NonNull String[] permissions, @NonNull RequestPublisher publisher) {
List<String> needRequestPermissions = new ArrayList<>();
for (String permission : permissions) {
if (isGranted(permission) || sdkVersionLowerThan23()) {
if (sdkVersionLowerThan23() || isGranted(permission)) {
publisher.onRequestPermissionsResult(new Permission(permission, true, false));
continue;
}
if (isRevoked(permission) && !sdkVersionLowerThan23()) {
if (!sdkVersionLowerThan23() && isRevoked(permission)) {
publisher.onRequestPermissionsResult(new Permission(permission, false, false));
continue;
}
Expand Down

0 comments on commit fb7175f

Please sign in to comment.