From 5bbdeb014640d219c2173b1e967d41087ef7cc7b Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 23 Jun 2018 23:30:11 -0400 Subject: [PATCH 1/2] Remove unused and duplicate dependencies This fixes the size regression introduced by version 2.0. Version 1.9 release size: 2003695 bytes Version 2.0 release size: 9168767 bytes Size before this commit: 9136230 bytes Size after this commit: 2085608 bytes --- app/build.gradle | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8b57fb6..2c8d2b7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -40,7 +40,6 @@ allprojects { } dependencies { - implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3' compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { @@ -49,16 +48,8 @@ dependencies { compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.android.support:design:26.1.0' compile 'com.android.support:support-v4:26.1.0' - compile 'org.greenrobot:greendao:3.2.2' - compile 'net.zetetic:android-database-sqlcipher:3.5.7' - - compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:26.1.0' - compile 'com.android.support:design:26.1.0' - compile 'com.android.support:support-v4:26.1.0' compile 'com.android.support:cardview-v7:26.1.0' - compile 'com.android.support:recyclerview-v7:26.1.0' - compile 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1' + compile 'org.greenrobot:greendao:3.2.2' testCompile 'junit:junit:4.12' testCompile 'org.json:json:20171018' From 4abcc1d55498f0785356f4e5127b183768fd8cfb Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 23 Jun 2018 23:42:58 -0400 Subject: [PATCH 2/2] Remove database encryption support The previous commit removed the SQLCipher dependency due to its size increase. The database encryption was never turned on in any release builds. Encryption of the database with a hardcoded password is quite useless. The user should instead utilize Android's full disk encryption or file based encryption feature. --- .../privacyfriendlynetmonitor/DatabaseUtil/DBApp.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/secuso/privacyfriendlynetmonitor/DatabaseUtil/DBApp.java b/app/src/main/java/org/secuso/privacyfriendlynetmonitor/DatabaseUtil/DBApp.java index 985f748..cbd9e90 100644 --- a/app/src/main/java/org/secuso/privacyfriendlynetmonitor/DatabaseUtil/DBApp.java +++ b/app/src/main/java/org/secuso/privacyfriendlynetmonitor/DatabaseUtil/DBApp.java @@ -64,8 +64,6 @@ Beckmann and Markus Hau (https://github.com/SecUSo/privacy-friendly-app-example) public class DBApp extends Application { - public static final boolean ENCRYPTED = false; - private static DaoSession daoSession; private static DBApp mContext; @@ -93,8 +91,8 @@ static class DBAppAsyncTask extends AsyncTask { @Override protected Object doInBackground(Object[] objects) { System.out.println("Starting Database Async Task"); - DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(mContext, ENCRYPTED ? "reports-db-encrypted" : "reports-db"); - Database db = ENCRYPTED ? helper.getEncryptedWritableDb("super-secret") : helper.getWritableDb(); + DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(mContext, "reports-db"); + Database db = helper.getWritableDb(); Map map = selectedAppsPreferences.getAll(); if (!map.isEmpty() && map.get("Version") != null && !map.get("Version").equals("")) {