Skip to content

SqliteDatabase.java #142

Closed
Closed
@otiasj

Description

@otiasj

I think there is a bug in sqlcipher/.../SQLiteDatabase.java

around line 950 : the 2 openDatabase methods are overriding the parameter flags with CREATE_IF_NECESSARY

public static SQLiteDatabase openDatabase(String path, String password, CursorFactory factory, int flags) {
  return openDatabase(path, password.toCharArray(), factory, CREATE_IF_NECESSARY, null);
}

public static SQLiteDatabase openDatabase(String path, char[] password, CursorFactory factory, int flags) {
  return openDatabase(path, password, factory, CREATE_IF_NECESSARY, null);
}

this is bad if you are using your own database and want to use the flags for example :
SQLiteDatabase.OPEN_READONLY | SQLiteDatabase.NO_LOCALIZED_COLLATORS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions