Skip to content

Commit

Permalink
Merge pull request #576 from mluksha/master
Browse files Browse the repository at this point in the history
[Android] Fix permission checking in the Quit state
  • Loading branch information
manuquentin authored May 19, 2022
2 parents e96cecb + 5e465fa commit 8fef467
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -965,15 +965,11 @@ private String getApplicationName(Context appContext) {
}

private Boolean hasPermissions() {
Activity currentActivity = this.getCurrentReactActivity();

if (currentActivity == null) {
return false;
}
ReactApplicationContext context = getContext();

boolean hasPermissions = true;
for (String permission : permissions) {
int permissionCheck = ContextCompat.checkSelfPermission(currentActivity, permission);
int permissionCheck = ContextCompat.checkSelfPermission(context, permission);
if (permissionCheck != PackageManager.PERMISSION_GRANTED) {
hasPermissions = false;
}
Expand Down

0 comments on commit 8fef467

Please sign in to comment.