From fe4ce8843911f697f82df4542e1aa77d17d40f3f Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Mon, 18 Jun 2018 16:24:35 -0700 Subject: [PATCH] Revert "Upgrade SQLCipher to respect a max window size." This reverts commit dace93abb3cd5bf5cf7bd722d688b0ae302a4722. --- build.gradle | 4 ++-- .../database/helpers/SQLCipherOpenHelper.java | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 39e9d18c7c..59eace5235 100644 --- a/build.gradle +++ b/build.gradle @@ -125,7 +125,7 @@ dependencies { } compile 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2' - compile 'org.signal:android-database-sqlcipher:3.5.9-S2' + compile 'org.signal:android-database-sqlcipher:3.5.9-S1' compile ('com.googlecode.ez-vcard:ez-vcard:0.9.11') { exclude group: 'com.fasterxml.jackson.core' exclude group: 'org.freemarker' @@ -198,7 +198,7 @@ dependencyVerification { 'com.annimon:stream:5da6e2e3e0551d61a3ea7014f04312276549e3dd739cf637996e4cf43c5535b9', 'com.takisoft.fix:colorpicker:f5d0dbabe406a1800498ca9c1faf34db36e021d8488bf10360f29961fe3ab0d1', 'com.github.dmytrodanylyk.circular-progress-button:library:8dc6a29a5a8db7b2ad5a9a7fda1dc9ae0893f4c8f0545732b2c63854ea693e8e', - 'org.signal:android-database-sqlcipher:4d682fccefb21cdeb10f856a55c86ede381f91137eae8a7a5746c9df415a6aed', + 'org.signal:android-database-sqlcipher:4302551df258883cc5dc5d62ddb141a6b5b8f113d77d70322dc2648c0856ccef', 'com.googlecode.ez-vcard:ez-vcard:7e24ad50b222d2f70ac91bdccfa3c0f6200b078d797cb784837f75e77bb4210f', 'com.google.android.gms:play-services-iid:54e919f9957b8b7820da7ee9b83471d00d0cac1cf08ddea8b5b41aea80bb1a70', 'com.google.android.gms:play-services-base:0ca636a8fc9a5af45e607cdcd61783bf5d561cbbb0f862021ce69606eee5ad49', diff --git a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java index a776e758cd..4338952e4c 100644 --- a/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java +++ b/src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java @@ -8,9 +8,6 @@ import android.os.SystemClock; import android.support.annotation.NonNull; import android.util.Log; -import net.sqlcipher.CursorWindow; -import net.sqlcipher.CursorWindowAllocation; -import net.sqlcipher.CustomCursorWindowAllocation; import net.sqlcipher.database.SQLiteDatabase; import net.sqlcipher.database.SQLiteDatabaseHook; import net.sqlcipher.database.SQLiteOpenHelper; @@ -55,14 +52,6 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 9; private static final String DATABASE_NAME = "signal.db"; - private static final int MEMORY_INITIAL = 128 * 1024; - private static final int MEMORY_GROW = 1024 * 1024; - private static final int MEMORY_MAX = 4 * 1024 * 1024; - private static final CursorWindowAllocation CURSOR_ALLOCATION = new CustomCursorWindowAllocation(MEMORY_INITIAL, MEMORY_GROW, MEMORY_MAX); - static { - CursorWindow.setCursorWindowAllocation(CURSOR_ALLOCATION); - } - private final Context context; private final DatabaseSecret databaseSecret;