docs: public boolean isDatabaseIntegrityOk() {
          acquireReference();
          try {
              List<Pair<String, String>> attachedDbs = null;
              try {
                  attachedDbs = getAttachedDbs();
                  if (attachedDbs == null) {
                      throw new IllegalStateException("databaselist for: " + getPath() + " couldn't " +
                              "be retrieved. probably because the database is closed");
                  }
              } catch (SQLiteException e) {
                  // can't get attachedDb list. do integrity check on the main database
                  attachedDbs = new ArrayList<Pair<String, String>>();
                  attachedDbs.add(new Pair<String, String>("main", getPath()));
              }
  
              for (int i = 0; i < attachedDbs.size(); i++) {
                  Pair<String, String> p = attachedDbs.get(i);
                  SQLiteStatement prog = null;
                  try {
                      prog = compileStatement("PRAGMA " + p.first + ".integrity_check(1);");
                      String rslt = prog.simpleQueryForString();
                      if (!rslt.equalsIgnoreCase("ok")) {
                          // integrity_checker failed on main or attached databases
                          Log.e(TAG, "PRAGMA integrity_check on " + p.second + " returned: " + rslt);
                          return false;
                      }
                  } finally {
                      if (prog != null) prog.close();
                  }
              }
          } finally {
              releaseReference();
          }
          return true;
      }