/*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2021 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
String sql;
String[] params;
if (profileSpecific) {
- MobileLedgerProfile p = (profile == null) ? Data.profile.getValue() : profile;
- if (p == null)
- throw new AssertionError();
+ MobileLedgerProfile p = (profile == null) ? Data.getProfile() : profile;
sql = String.format(
"SELECT rowid as _id, %s, CASE WHEN %s_upper LIKE ?||'%%' THEN 1 " +
"WHEN %s_upper LIKE '%%:'||?||'%%' then 2 " +
(parent, itemView, position, id) -> callback.descriptionSelected(
String.valueOf(view.getText())));
}
- public static void queryInBackground(@NonNull String statement, @NonNull String[] params,
- @NonNull CallbackHelper callbackHelper) {
+ public static void queryInBackground(@NonNull String statement, String[] params,
+ @NonNull final CallbackHelper callbackHelper) {
/* All callbacks are called in the new (asynchronous) thread! */
Thread t = new Thread(() -> {
callbackHelper.onStart();