List of usage examples for android.database.sqlite SQLiteConnection setOnlyAllowReadOnlyOperations
void setOnlyAllowReadOnlyOperations(boolean readOnly)
From source file:io.requery.android.database.sqlite.SQLiteConnectionPool.java
private void finishAcquireConnectionLocked(SQLiteConnection connection, int connectionFlags) { try {/* w ww . j a v a 2s . c o m*/ final boolean readOnly = (connectionFlags & CONNECTION_FLAG_READ_ONLY) != 0; connection.setOnlyAllowReadOnlyOperations(readOnly); mAcquiredConnections.put(connection, AcquiredConnectionStatus.NORMAL); } catch (RuntimeException ex) { Log.e(TAG, "Failed to prepare acquired connection for session, closing it: " + connection + ", connectionFlags=" + connectionFlags); closeConnectionAndLogExceptionsLocked(connection); throw ex; // rethrow! } }