code: private boolean isAnyPackageFromListInstalled(List<String> packages){
          boolean result = false;
  
          PackageManager pm = mContext.getPackageManager();
  
          for (String packageName : packages) {
              try {
                  // Root app detected
                  pm.getPackageInfo(packageName, 0);
                  QLog.e(packageName + " ROOT management app detected!");
                  result = true;
              } catch (PackageManager.NameNotFoundException e) {
                  // Exception thrown, package is not installed into the system
              }
          }
  
          return result;
      }
docs: Check if any package in the list is installed
  @param packages - list of packages to search for
  @return true if any of the packages are installed