Home | History | Annotate | Download | only in transaction

Lines Matching refs:transaction

18 package com.android.mms.transaction;
79 * the MMS transaction until the connection is established.</li>
87 * TransactionService when a Transaction is completed.
100 * when a Transaction is completed (TRANSACTION_COMPLETED_ACTION intents).
108 * when a Transaction is completed (TRANSACTION_COMPLETED_ACTION intents).
123 // How often to extend the use of the MMS APN while a transaction
129 private final ArrayList<Transaction> mProcessing = new ArrayList<Transaction>();
130 private final ArrayList<Transaction> mPending = new ArrayList<Transaction>();
155 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
181 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
194 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
199 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
213 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
230 case Transaction.RETRIEVE_TRANSACTION:
231 // If it's a transiently failed transaction,
256 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
263 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
264 Log.v(TAG, "onStart: launch transaction...");
276 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
280 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
302 return Transaction.RETRIEVE_TRANSACTION;
304 return Transaction.READREC_TRANSACTION;
306 return Transaction.SEND_TRANSACTION;
323 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
330 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
335 if (transactionType == Transaction.RETRIEVE_TRANSACTION) {
337 } else if (transactionType == Transaction.SEND_TRANSACTION) {
348 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
352 Log.w(TAG, "TransactionService exiting with transaction still pending");
370 * Handle status change of Transaction (The Observable).
373 Transaction transaction = (Transaction) observable;
374 int serviceId = transaction.getServiceId();
376 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
377 Log.v(TAG, "update transaction " + serviceId);
382 mProcessing.remove(transaction);
384 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
385 Log.v(TAG, "update: handle next pending transaction...");
389 transaction.getConnectionSettings());
393 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
401 TransactionState state = transaction.getState();
407 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
408 Log.v(TAG, "Transaction complete: " + serviceId);
414 switch (transaction.getType()) {
415 case Transaction.NOTIFICATION_TRANSACTION:
416 case Transaction.RETRIEVE_TRANSACTION:
423 case Transaction.SEND_TRANSACTION:
429 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
430 Log.v(TAG, "Transaction failed: " + serviceId);
434 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
435 Log.v(TAG, "Transaction state unknown: " +
441 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
442 Log.v(TAG, "update: broadcast transaction result " + result);
444 // Broadcast the result of the transaction.
447 transaction.detach(this);
482 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
498 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
520 * Handle incoming transaction requests.
526 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
530 Transaction transaction = null;
544 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
571 * transaction, if any.
578 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
585 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
592 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
603 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
612 processPendingTransaction(transaction, settings);
621 // Set the connection settings for this transaction.
634 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
639 // Create appropriate transaction
641 case Transaction.NOTIFICATION_TRANSACTION:
644 transaction = new NotificationTransaction(
655 transaction = new NotificationTransaction(
660 transaction = null;
665 case Transaction.RETRIEVE_TRANSACTION:
666 transaction = new RetrieveTransaction(
670 case Transaction.SEND_TRANSACTION:
671 transaction = new SendTransaction(
675 case Transaction.READREC_TRANSACTION:
676 transaction = new ReadRecTransaction(
681 Log.w(TAG, "Invalid transaction type: " + serviceId);
682 transaction = null;
686 if (!processTransaction(transaction)) {
687 transaction = null;
691 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
697 if (transaction != null) {
699 transaction.detach(TransactionService.this);
700 if (mProcessing.contains(transaction)) {
702 mProcessing.remove(transaction);
708 // Set transaction to null to allow stopping the
709 // transaction service.
710 transaction = null;
714 if (transaction == null) {
715 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
716 Log.v(TAG, "Transaction was null. Stopping self: " + serviceId);
724 processPendingTransaction(transaction, (TransactionSettings) msg.obj);
732 private void processPendingTransaction(Transaction transaction,
735 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
736 Log.v(TAG, "processPendingTxn: transaction=" + transaction);
742 transaction = mPending.remove(0);
747 if (transaction != null) {
749 transaction.setConnectionSettings(settings);
753 * Process deferred transaction
756 int serviceId = transaction.getServiceId();
758 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
762 if (processTransaction(transaction
763 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
764 Log.v(TAG, "Started deferred processing of transaction "
765 + transaction);
768 transaction = null;
776 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
777 Log.v(TAG, "processPendingTxn: no more transaction, endMmsConnectivity");
785 * Internal method to begin processing a transaction.
786 * @param transaction the transaction. Must not be {@code null}.
788 * if the transaction should be discarded.
792 private boolean processTransaction(Transaction transaction) throws IOException {
793 // Check if transaction already processing
795 for (Transaction t : mPending) {
796 if (t.isEquivalent(transaction)) {
797 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
798 Log.v(TAG, "Transaction already pending: " +
799 transaction.getServiceId());
804 for (Transaction t : mProcessing) {
805 if (t.isEquivalent(transaction)) {
806 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
807 Log.v(TAG, "Duplicated transaction: " + transaction.getServiceId());
816 * to defer processing the transaction until
819 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
824 mPending.add(transaction);
825 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
827 "defer transaction pending MMS connectivity");
832 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
833 Log.v(TAG, "Adding transaction to 'mProcessing' list: " + transaction);
835 mProcessing.add(transaction);
842 if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
843 Log.v(TAG, "processTransaction: starting transaction " + transaction);
846 // Attach to transaction and process it
847 transaction.attach(TransactionService.this);
848 transaction.process();