From 664a181fb9fb0ad2888e6f25f7b24eabf15dc9db Mon Sep 17 00:00:00 2001 From: Stefan Silviu Date: Sun, 6 Sep 2020 09:58:26 +0300 Subject: [PATCH] Revert "#876 - Logs and comments" This reverts commit 453252e95844bb0a830f59292b215a6ee5e8e025. --- .../org/gnucash/android/db/adapter/DatabaseAdapter.java | 8 +------- .../org/gnucash/android/ui/account/AccountsActivity.java | 6 ------ .../android/ui/transaction/TransactionsActivity.java | 4 +--- app/src/main/java/org/gnucash/android/util/BookUtils.java | 2 -- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java b/app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java index aef689821..60d16ced2 100644 --- a/app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java +++ b/app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java @@ -544,13 +544,7 @@ public long getID(@NonNull String uid){ if (cursor.moveToFirst()) { result = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseSchema.CommonColumns._ID)); } else { - throw new IllegalArgumentException("UID (" - + uid - + ") does not exist in Table (" - + mTableName - + ") of db (" - + mDb.getPath() - + ")"); + throw new IllegalArgumentException(mTableName + " with GUID " + uid + " does not exist in the db"); } } finally { cursor.close(); diff --git a/app/src/main/java/org/gnucash/android/ui/account/AccountsActivity.java b/app/src/main/java/org/gnucash/android/ui/account/AccountsActivity.java index 70aa7f6c5..0431dbe30 100644 --- a/app/src/main/java/org/gnucash/android/ui/account/AccountsActivity.java +++ b/app/src/main/java/org/gnucash/android/ui/account/AccountsActivity.java @@ -328,7 +328,6 @@ protected void onResume() { @Override protected void onStart() { - super.onStart(); if (BuildConfig.CAN_REQUEST_RATING) { @@ -336,11 +335,6 @@ protected void onStart() { RateThisApp.onStart(this); RateThisApp.showRateDialogIfNeeded(this); } - - Log.i(LOG_TAG, - "New active db (" + GnuCashApplication.getActiveDb() - .getPath() + ")"); - } /** diff --git a/app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java b/app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java index 1ca74dfe8..e2e07d245 100644 --- a/app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java +++ b/app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java @@ -397,9 +397,7 @@ protected void onResume() { */ private void setTitleIndicatorColor() { - final String currentAccountUID = getCurrentAccountUID(); - - int iColor = AccountsDbAdapter.getActiveAccountColorResource(currentAccountUID); + int iColor = AccountsDbAdapter.getActiveAccountColorResource(getCurrentAccountUID()); mTabLayout.setBackgroundColor(iColor); diff --git a/app/src/main/java/org/gnucash/android/util/BookUtils.java b/app/src/main/java/org/gnucash/android/util/BookUtils.java index f0e6de4f3..dbd308d7e 100644 --- a/app/src/main/java/org/gnucash/android/util/BookUtils.java +++ b/app/src/main/java/org/gnucash/android/util/BookUtils.java @@ -25,9 +25,7 @@ public static void activateBook(@NonNull String bookUID){ * @param bookUID GUID of the book to be loaded */ public static void loadBook(@NonNull String bookUID){ - activateBook(bookUID); - AccountsActivity.start(GnuCashApplication.getAppContext()); } }