diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-05 11:14:19 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-03-05 11:14:19 +0100 |
commit | 7ccdd7d38ed1c7d2152b914be5d08323ebf434e4 (patch) | |
tree | 88cbd98fdc2741da867751677ed4002369ba4371 /OpenKeychain | |
parent | 18a827eeed042ffb43338e06f408b78b0a6a3394 (diff) | |
download | open-keychain-7ccdd7d38ed1c7d2152b914be5d08323ebf434e4.tar.gz open-keychain-7ccdd7d38ed1c7d2152b914be5d08323ebf434e4.tar.bz2 open-keychain-7ccdd7d38ed1c7d2152b914be5d08323ebf434e4.zip |
Debug options
Diffstat (limited to 'OpenKeychain')
3 files changed, 6 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java index 9f8226c05..574f16c27 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java @@ -28,6 +28,8 @@ import java.io.File; public final class Constants { public static final boolean DEBUG = BuildConfig.DEBUG; + public static final boolean DEBUG_LOG_DB_QUERIES = false; + public static final boolean DEBUG_SYNC_REMOVE_CONTACTS = false; public static final String TAG = "Keychain"; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java index 2601c1f69..4ccfc3cd9 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java @@ -650,7 +650,7 @@ public class KeychainProvider extends ContentProvider { cursor.setNotificationUri(getContext().getContentResolver(), uri); } - if (Constants.DEBUG) { + if (Constants.DEBUG && Constants.DEBUG_LOG_DB_QUERIES) { Log.d(Constants.TAG, "Query: " + qb.buildQuery(projection, selection, selectionArgs, null, null, diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java index 44bcc52a5..c66dc04d0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java @@ -296,7 +296,9 @@ public class ContactHelper { ContentResolver resolver = context.getContentResolver(); Set<Long> deletedKeys = getRawContactMasterKeyIds(resolver); -// debugDeleteRawContacts(resolver); + if (Constants.DEBUG_SYNC_REMOVE_CONTACTS) { + debugDeleteRawContacts(resolver); + } // ContentProviderClient client = resolver.acquireContentProviderClient(ContactsContract.AUTHORITY_URI); // ContentValues values = new ContentValues(); |