com.drismo.gui
Class ViewArchive.DeleteAllTrips

java.lang.Object
  extended by android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Boolean>
      extended by com.drismo.gui.ViewArchive.DeleteAllTrips
Enclosing class:
ViewArchive

private class ViewArchive.DeleteAllTrips
extends android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Boolean>

Delete all trip files, while progressbar runs in the foreground.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.os.AsyncTask
android.os.AsyncTask.Status
 
Field Summary
(package private)  android.app.ProgressDialog deleteProgressDialog
           
 
Constructor Summary
private ViewArchive.DeleteAllTrips()
           
 
Method Summary
protected  java.lang.Boolean doInBackground(java.lang.Void... params)
          Loop through all trip-files, and delete them.
protected  void onPostExecute(java.lang.Boolean deletedAll)
          If all files successfully was deleted, the activity will restart, to show an empty archive.
protected  void onPreExecute()
          Create the progressbar before starting the delete-process.
 
Methods inherited from class android.os.AsyncTask
cancel, execute, get, get, getStatus, isCancelled, onCancelled, onProgressUpdate, publishProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deleteProgressDialog

android.app.ProgressDialog deleteProgressDialog
Constructor Detail

ViewArchive.DeleteAllTrips

private ViewArchive.DeleteAllTrips()
Method Detail

onPreExecute

protected void onPreExecute()
Create the progressbar before starting the delete-process.

Overrides:
onPreExecute in class android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Boolean>

doInBackground

protected java.lang.Boolean doInBackground(java.lang.Void... params)
Loop through all trip-files, and delete them.

Specified by:
doInBackground in class android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Boolean>
Parameters:
params - Void
Returns:
True if ALL files were deleted. False otherwise.

onPostExecute

protected void onPostExecute(java.lang.Boolean deletedAll)
If all files successfully was deleted, the activity will restart, to show an empty archive.
If something went wrong, the user will be notified by a Toast, before the activity restarts and shows the remaining files.

Overrides:
onPostExecute in class android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Boolean>
Parameters:
deletedAll - True if ALL files has been deleted. False otherwise.