int getThreadDefaultConnectionFlags ( boolean readOnly ) { int flags = readOnly ? SQLiteConnectionPool . CONNECTION_FLAG_READ_ONLY : SQLiteConnectionPool . CONNECTION_FLAG_PRIMARY_CONNECTION_AFFINITY ; if ( isMainThread ( ) ) { flags |= SQLiteConnectionPool . CONNECTION_FLAG_INTERACTIVE ; } return flags ; }
Gets default connection flags that are appropriate for this thread taking into account whether the thread is acting on behalf of the UI .