- public synchronized static void scheduleTransactionListRetrieval() {
- if (retrieveTransactionsTask != null) {
- Logger.debug("db", "Ignoring request for transaction retrieval - already active");
- return;
- }
- MobileLedgerProfile pr = profile.getValue();
- if (pr == null) {
- Logger.debug("ui", "Ignoring refresh -- no current profile");
- return;
- }
-
- retrieveTransactionsTask = new RetrieveTransactionsTask(profile.getValue());
- Logger.debug("db", "Created a background transaction retrieval task");
-
- retrieveTransactionsTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
- }
- public static synchronized void stopTransactionsRetrieval() {
- if (retrieveTransactionsTask != null)
- retrieveTransactionsTask.cancel(false);
- }
- public static void transactionRetrievalDone() {
- retrieveTransactionsTask = null;
- }