code: private static boolean isWifiStatePermissionGranted(@NonNull Context context) {
          int res = context.checkCallingOrSelfPermission(Manifest.permission.ACCESS_WIFI_STATE);
          return (res == PackageManager.PERMISSION_GRANTED);
      }
docs: Checks if the {@link Manifest.permission#ACCESS_WIFI_STATE} permission has been granted.
  
  @return True if wifi access permission has been granted.