@VisibleForTesting
  static Collection<String> listTableColumnNamesLowerCase(
      SQLiteDatabase database, String tableName) {
    Cursor cursor =
        database.rawQuery(String.format("PRAGMA table_info(%s)", tableName), new String[0]);
    Collection<String> result = Lists.newArrayList();
    try {
      if (cursor != null) {
        int nameColumnIndex = cursor.getColumnIndexOrThrow(TABLE_INFO_COLUMN_NAME_COLUMN);
        while (cursor.moveToNext()) {
          result.add(cursor.getString(nameColumnIndex).toLowerCase(Locale.US));
        }
      }
      return result;
    } finally {
      tryCloseCursor(cursor);
    }
  }
Lists the names of all the columns in the specified table.
java/com/google/android/apps/authenticator/otp/AccountDb.java