Skip to content

Commit 453252e

Browse files
committed
codinguser#876 - Logs and comments
1 parent 5db92fb commit 453252e

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,13 @@ public long getID(@NonNull String uid){
541541
if (cursor.moveToFirst()) {
542542
result = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseSchema.CommonColumns._ID));
543543
} else {
544-
throw new IllegalArgumentException(mTableName + " with GUID " + uid + " does not exist in the db");
544+
throw new IllegalArgumentException("UID ("
545+
+ uid
546+
+ ") does not exist in Table ("
547+
+ mTableName
548+
+ ") of db ("
549+
+ mDb.getPath()
550+
+ ")");
545551
}
546552
} finally {
547553
cursor.close();

app/src/main/java/org/gnucash/android/ui/account/AccountsActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,19 @@ protected void onResume() {
281281

282282
@Override
283283
protected void onStart() {
284+
284285
super.onStart();
285286

286287
if (BuildConfig.CAN_REQUEST_RATING) {
287288
RateThisApp.init(rateAppConfig);
288289
RateThisApp.onStart(this);
289290
RateThisApp.showRateDialogIfNeeded(this);
290291
}
292+
293+
Log.i(LOG_TAG,
294+
"New active db (" + GnuCashApplication.getActiveDb()
295+
.getPath() + ")");
296+
291297
}
292298

293299
/**

app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ protected void onResume() {
382382
*/
383383
private void setTitleIndicatorColor() {
384384

385-
int iColor = AccountsDbAdapter.getActiveAccountColorResource(getCurrentAccountUID());
385+
final String currentAccountUID = getCurrentAccountUID();
386+
387+
int iColor = AccountsDbAdapter.getActiveAccountColorResource(currentAccountUID);
386388

387389
mTabLayout.setBackgroundColor(iColor);
388390

app/src/main/java/org/gnucash/android/util/BookUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ public static void activateBook(@NonNull String bookUID){
2525
* @param bookUID GUID of the book to be loaded
2626
*/
2727
public static void loadBook(@NonNull String bookUID){
28+
2829
activateBook(bookUID);
30+
2931
AccountsActivity.start(GnuCashApplication.getAppContext());
3032
}
3133
}

0 commit comments

Comments
 (0)