*/
=======
}
/**
* Asynchronously executes a task while blocking the UI with a progress spinner.
*
private void addAudio(Uri uri) {
int result = mWorkingMessage.setAttachment(WorkingMessage.AUDIO, uri, false);
handleAddAttachmentError(result, R.string.type_audio);
<<<<<<< HEAD
}
/**
* Asynchronously executes a task while blocking the UI with a progress spinner.
*
* Must be invoked by the UI thread. No exceptions!
*
* @param task the work to be done wrapped in a Runnable
* @param dialogStringId the id of the string to be shown in the dialog
*/
private void runAsyncWithDialog(final Runnable task, final int dialogStringId) {
new ModalDialogAsyncTask(dialogStringId).execute(new Runnable[] {task});
}
/**
* Asynchronously performs tasks specified by Runnables.
* Displays a progress spinner while the tasks are running. The progress spinner
* will only show if tasks have not finished after a certain amount of time.
*
* This AsyncTask must be instantiated and invoked on the UI thread.
* Must be invoked by the UI thread. No exceptions!
*
* @param task the work to be done wrapped in a Runnable
* @param dialogStringId the id of the string to be shown in the dialog
*/
private void runAsyncWithDialog(final Runnable task, final int dialogStringId) {
new ModalDialogAsyncTask(dialogStringId).execute(new Runnable[] {task});
}
/**
* Asynchronously performs tasks specified by Runnables.
* Displays a progress spinner while the tasks are running. The progress spinner
* will only show if tasks have not finished after a certain amount of time.
*
* This AsyncTask must be instantiated and invoked on the UI thread.
*/
>>>>>>> 2dd16597ea77c4db218202d29646066eccf12ae9
private class ModalDialogAsyncTask extends AsyncTask {
final int mDialogStringId;
|