File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
android/src/main/java/io/wazo/callkeep Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -965,15 +965,11 @@ private String getApplicationName(Context appContext) {
965
965
}
966
966
967
967
private Boolean hasPermissions () {
968
- Activity currentActivity = this .getCurrentReactActivity ();
969
-
970
- if (currentActivity == null ) {
971
- return false ;
972
- }
968
+ ReactApplicationContext context = getContext ();
973
969
974
970
boolean hasPermissions = true ;
975
971
for (String permission : permissions ) {
976
- int permissionCheck = ContextCompat .checkSelfPermission (currentActivity , permission );
972
+ int permissionCheck = ContextCompat .checkSelfPermission (context , permission );
977
973
if (permissionCheck != PackageManager .PERMISSION_GRANTED ) {
978
974
hasPermissions = false ;
979
975
}
You can’t perform that action at this time.
0 commit comments