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

Commit 589e7e42 authored by Lee Shombert's avatar Lee Shombert
Browse files

Do not disclose the database name in sqlite logs

This only affects informational logs.

Test: presubmit

Bug: 325789335
Change-Id: I6c04fd8abbe8a66b8485a6151da7504b47c22f16
parent c264cd5c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -379,8 +379,6 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
            return;
        }

        Log.i(TAG, walFile.getAbsolutePath() + " " + size + " bytes: Bigger than "
                + threshold + "; truncating");
        try {
            executeForString("PRAGMA wal_checkpoint(TRUNCATE)", null, null);
            mConfiguration.shouldTruncateWalFile = false;
+1 −7
Original line number Diff line number Diff line
@@ -377,8 +377,7 @@ public abstract class SQLiteOpenHelper implements AutoCloseable {
                    if (writable) {
                        throw ex;
                    }
                    Log.e(TAG, "Couldn't open " + mName
                            + " for writing (will try read-only):", ex);
                    Log.e(TAG, "Couldn't open database for writing (will try read-only):", ex);
                    params = params.toBuilder().addOpenFlags(SQLiteDatabase.OPEN_READONLY).build();
                    db = SQLiteDatabase.openDatabase(filePath, params);
                }
@@ -425,11 +424,6 @@ public abstract class SQLiteOpenHelper implements AutoCloseable {
            }

            onOpen(db);

            if (db.isReadOnly()) {
                Log.w(TAG, "Opened " + mName + " in read-only mode");
            }

            mDatabase = db;
            return db;
        } finally {