es.cesar.quitesleep.operations
Class DialogOperations

java.lang.Object
  extended by es.cesar.quitesleep.operations.DialogOperations

public class DialogOperations
extends java.lang.Object

Author:
Cesar Valiente Gordo

Constructor Summary
DialogOperations()
           
 
Method Summary
static void addAllContacts(Context context,  arrayAdapter, Handler handler)
          Function that add all contacts to the banned list in one separated thread, and show a progressDialog fow wait for it, and an handler for clear the arrayAdapter one habe been finished.
static void checkMailService(Context context, boolean isChecked)
          Function that does the operations about start and stop the mail service
static void checkSmsService(Context context, boolean isChecked)
          Function that does the operations about start and stop the sms service
static void refreshAllCallLogs(Context context,  arrayAdapter, Handler handler)
           
static void removeAllCallLogs(Context context,  arrayAdapter, Handler handler)
          Remove all call log objects from the ddbb for clean the call log information list.
static void removeAllContacts(Context context,  arrayAdapter, Handler handler)
          Function that start the remove banned contacts from the banned list in a separated thread and use a progressDialog for wait for it, and handler for clear the arrayAdapter once have finished.
static void syncContactsRefresh(Context context)
          Sync the contacts data between SQLite and DB4O databases the first time if the db4o database is empty.
static void synchronizeFirstTime(Context context, Handler handler)
          This function prepare the synchronization process and the objects creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogOperations

public DialogOperations()
Method Detail

syncContactsRefresh

public static void syncContactsRefresh(Context context)
Sync the contacts data between SQLite and DB4O databases the first time if the db4o database is empty. It is done using a thread for it.


addAllContacts

public static void addAllContacts(Context context,
                                   arrayAdapter,
                                  Handler handler)
Function that add all contacts to the banned list in one separated thread, and show a progressDialog fow wait for it, and an handler for clear the arrayAdapter one habe been finished.


removeAllContacts

public static void removeAllContacts(Context context,
                                      arrayAdapter,
                                     Handler handler)
Function that start the remove banned contacts from the banned list in a separated thread and use a progressDialog for wait for it, and handler for clear the arrayAdapter once have finished.


checkSmsService

public static void checkSmsService(Context context,
                                   boolean isChecked)
Function that does the operations about start and stop the sms service


checkMailService

public static void checkMailService(Context context,
                                    boolean isChecked)
Function that does the operations about start and stop the mail service


removeAllCallLogs

public static void removeAllCallLogs(Context context,
                                      arrayAdapter,
                                     Handler handler)
Remove all call log objects from the ddbb for clean the call log information list.

Parameters:
context -
arrayAdapter -
handler -

refreshAllCallLogs

public static void refreshAllCallLogs(Context context,
                                       arrayAdapter,
                                      Handler handler)

synchronizeFirstTime

public static void synchronizeFirstTime(Context context,
                                        Handler handler)
This function prepare the synchronization process and the objects creation.

Parameters:
context -
handler -