From 9f63be65bc28234950ccd7615bf16e00a860b0e6 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Sun, 2 Mar 2014 12:42:50 +0100 Subject: [PATCH] Enable SQLite secure_delete pragma. --- .../src/main/java/org/telegram/messenger/MessagesStorage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index d34b204f6..13ffbd2aa 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -69,6 +69,7 @@ public class MessagesStorage { } try { database = new SQLiteDatabase(cacheFile.getPath()); + database.execute("PRAGMA secure_delete = ON"); if (createTable) { database.executeFast("CREATE TABLE users(uid INTEGER PRIMARY KEY, name TEXT, status INTEGER, data BLOB)").stepThis().dispose(); database.executeFast("CREATE TABLE messages(mid INTEGER PRIMARY KEY, uid INTEGER, read_state INTEGER, send_state INTEGER, date INTEGER, data BLOB, out INTEGER, ttl INTEGER)").stepThis().dispose();