package net.ktnx.mobileledger.ui.account_summary;
-import androidx.lifecycle.ViewModel;
import android.content.Context;
+import android.os.AsyncTask;
import android.util.Log;
import net.ktnx.mobileledger.async.CommitAccountsTask;
import java.util.ArrayList;
+import androidx.lifecycle.ViewModel;
+
class AccountSummaryViewModel extends ViewModel {
static void commitSelections(Context context) {
CAT task = new CAT();
- task.execute(
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
new CommitAccountsTaskParams(Data.accounts.get(), Data.optShowOnlyStarred.get()));
}
static void scheduleAccountListReload() {
if (Data.profile.get() == null) return;
UAT task = new UAT();
- task.execute();
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
import android.content.pm.PackageInfo;
import android.content.res.ColorStateList;
import android.graphics.Color;
+import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
if (error == null) {
updateLastUpdateTextFromDB();
- new RefreshDescriptionsTask().execute();
+ new RefreshDescriptionsTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
else Toast.makeText(this, error, Toast.LENGTH_LONG).show();
}
package net.ktnx.mobileledger.ui.transaction_list;
-import androidx.lifecycle.ViewModel;
import android.os.AsyncTask;
import net.ktnx.mobileledger.async.UpdateTransactionsTask;
import java.util.List;
+import androidx.lifecycle.ViewModel;
+
public class TransactionListViewModel extends ViewModel {
public static ObservableValue<Boolean> updating = new ObservableValue<>();
public static ObservableValue<String> updateError = new ObservableValue<>();
String filter = TransactionListFragment.accountFilter.get();
AsyncTask<String, Void, String> task = new UTT();
- task.execute(filter);
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, filter);
}
public static TransactionListItem getTransactionListItem(int position) {
List<TransactionListItem> transactions = Data.transactions.get();