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

Commit 9b9a4ed5 authored by Lee Shombert's avatar Lee Shombert Committed by Android (Google) Code Review
Browse files

Merge "Close idle database connections in the background" into main

parents a0b7a030 15ea401f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.util.Printer;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.BackgroundThread;

import dalvik.annotation.optimization.NeverCompile;
import dalvik.system.CloseGuard;
@@ -187,7 +188,8 @@ public final class SQLiteConnectionPool implements Closeable {
        // In case of MAX_VALUE - idle connections are never closed
        if (mConfiguration.idleConnectionTimeoutMs != Long.MAX_VALUE) {
            setupIdleConnectionHandler(
                    Looper.getMainLooper(), mConfiguration.idleConnectionTimeoutMs, null);
                BackgroundThread.getHandler().getLooper(),
                mConfiguration.idleConnectionTimeoutMs, null);
        }
    }