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) {
965965 }
966966
967967 private Boolean hasPermissions () {
968- Activity currentActivity = this .getCurrentReactActivity ();
969-
970- if (currentActivity == null ) {
971- return false ;
972- }
968+ ReactApplicationContext context = getContext ();
973969
974970 boolean hasPermissions = true ;
975971 for (String permission : permissions ) {
976- int permissionCheck = ContextCompat .checkSelfPermission (currentActivity , permission );
972+ int permissionCheck = ContextCompat .checkSelfPermission (context , permission );
977973 if (permissionCheck != PackageManager .PERMISSION_GRANTED ) {
978974 hasPermissions = false ;
979975 }
You can’t perform that action at this time.
0 commit comments