code: protected boolean doesAppHasInternetPermission(Context context) {
          int result = context.checkCallingOrSelfPermission(Manifest.permission.INTERNET);
          boolean permissionGranted = (result == PackageManager.PERMISSION_GRANTED);
  
          if (!permissionGranted) {
              PrefHelper.Debug("Trouble executing your request. Please add 'android.permission.INTERNET' in your applications manifest file");
          }
  
          return result == PackageManager.PERMISSION_GRANTED;
      }
docs: /*
  Checks if this Application has internet permissions.
  
  @param context Application context.
  
  @return True if application has internet permission.