Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 492457e9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "New behavior of setSynchronousMode" into pi-dev

parents 64896541 8ba20891
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -296,7 +296,9 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
            final boolean useCompatibilityWal = mConfiguration.useCompatibilityWal();
            if (walEnabled || useCompatibilityWal) {
                setJournalMode("WAL");
                if (useCompatibilityWal && SQLiteCompatibilityWalFlags.areFlagsSet()) {
                if (mConfiguration.syncMode != null) {
                    setSyncMode(mConfiguration.syncMode);
                } else if (useCompatibilityWal && SQLiteCompatibilityWalFlags.areFlagsSet()) {
                    setSyncMode(SQLiteCompatibilityWalFlags.getWALSyncMode());
                } else {
                    setSyncMode(SQLiteGlobal.getWALSyncMode());
+2 −3
Original line number Diff line number Diff line
@@ -2413,8 +2413,7 @@ public final class SQLiteDatabase extends SQLiteClosable {

        /**
         * Returns <a href="https://sqlite.org/pragma.html#pragma_synchronous">synchronous mode</a>.
         * This value will only be used when {@link SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING} flag
         * is not set, otherwise a system wide default will be used.
         * If not set, a system wide default will be used.
         * @see Builder#setSynchronousMode(String)
         */
        @Nullable
@@ -2601,7 +2600,7 @@ public final class SQLiteDatabase extends SQLiteClosable {

            /**
             * Sets <a href="https://sqlite.org/pragma.html#pragma_synchronous">synchronous mode</a>
             * to use when {@link SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING} flag is not set.
             * .
             * @return
             */
            @NonNull
+2 −1
Original line number Diff line number Diff line
@@ -117,8 +117,9 @@ public final class SQLiteDatabaseConfiguration {
    public String journalMode;

    /**
     * Synchronous mode to use when {@link SQLiteDatabase#ENABLE_WRITE_AHEAD_LOGGING} is not set.
     * Synchronous mode to use.
     * <p>Default is returned by {@link SQLiteGlobal#getDefaultSyncMode()}
     * or {@link SQLiteGlobal#getWALSyncMode()} depending on journal mode
     */
    public String syncMode;