Skip to content

Commit

Permalink
respect configs.isCheckPermission
Browse files Browse the repository at this point in the history
  • Loading branch information
LoxiaLiSA committed Aug 10, 2023
1 parent 62db7fb commit cb2b1df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ public boolean onCameraClick(boolean forVideo) {

public boolean requestPermission(String[] permissions, int requestCode) {
int checkResult = PackageManager.PERMISSION_GRANTED;
for (String permission : permissions) {
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
checkResult = PackageManager.PERMISSION_DENIED;
break;
if (configs.isCheckPermission()) {
for (String permission : permissions) {
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
checkResult = PackageManager.PERMISSION_DENIED;
break;
}
}
}
if (checkResult != PackageManager.PERMISSION_GRANTED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,12 @@ public boolean onCameraClick(boolean forVideo) {

public boolean requestPermission(String[] permissions, int requestCode) {
int checkResult = PackageManager.PERMISSION_GRANTED;
for (String permission : permissions) {
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
checkResult = PackageManager.PERMISSION_DENIED;
break;
if (configs.isCheckPermission()) {
for (String permission : permissions) {
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
checkResult = PackageManager.PERMISSION_DENIED;
break;
}
}
}
if (checkResult != PackageManager.PERMISSION_GRANTED) {
Expand Down

0 comments on commit cb2b1df

Please sign in to comment.