Skip to content

Commit

Permalink
Merge pull request #1435 from shellhub/master
Browse files Browse the repository at this point in the history
can't auto refresh list
  • Loading branch information
EmmanuelMess committed Sep 20, 2018
1 parent 68eadff commit 2479f9b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
if (requestCode == STORAGE_PERMISSION) {
if (isGranted(grantResults)) {
permissionCallbacks[STORAGE_PERMISSION].onPermissionGranted();
permissionCallbacks[STORAGE_PERMISSION] = null;
} else {
Toast.makeText(this, R.string.grantfailed, Toast.LENGTH_SHORT).show();
requestStoragePermission(permissionCallbacks[STORAGE_PERMISSION]);
}

permissionCallbacks[STORAGE_PERMISSION] = null;
} else if (requestCode == INSTALL_APK_PERMISSION) {
if (isGranted(grantResults)) {
permissionCallbacks[INSTALL_APK_PERMISSION].onPermissionGranted();
permissionCallbacks[INSTALL_APK_PERMISSION] = null;
}

permissionCallbacks[INSTALL_APK_PERMISSION] = null;
}

}
Expand Down Expand Up @@ -85,7 +85,7 @@ public void requestPermission(final String permission, final int code, @NonNull

if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {
rationale.getActionButton(DialogAction.POSITIVE).setOnClickListener(v -> {
ActivityCompat.requestPermissions(PermissionsActivity.this, new String[]{permission}, 77);
ActivityCompat.requestPermissions(PermissionsActivity.this, new String[]{permission}, code);
rationale.dismiss();
});
rationale.show();
Expand Down

0 comments on commit 2479f9b

Please sign in to comment.