Author: jerome
Date: 2009-02-12 00:31:54 +0100 (Thu, 12 Feb 2009)
New Revision: 3612

Modified:
   
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/ServicesLauncher.java
Log:
* Cleanup ServicesLauncher class.
* Typo.

Modified: 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/ServicesLauncher.java
===================================================================
--- 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/ServicesLauncher.java
  2009-02-11 23:18:00 UTC (rev 3611)
+++ 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/ServicesLauncher.java
  2009-02-11 23:31:54 UTC (rev 3612)
@@ -30,8 +30,15 @@
 
 public class ServicesLauncher extends Thread implements Runnable{
        
-       public void run(){
-               
+       /**
+        * Run part of the thread.
+        * This thread start all control center services:
+        * -> Attitunes watcher.
+        * -> Restore alerts.
+        * -> Initialize fifo.
+        */
+       public void run()
+       {
                CcCommons.logger.append("Starting control center services ", 
true);
                
                //Automatic incomming attitune updater. (into /MyTuxAttitunes 
folder).
@@ -40,27 +47,33 @@
                
                try 
                {
+                       //Waiting for starting alerts.
                        Thread.sleep(80000);
                } 
                catch (InterruptedException e) 
                {
                        CcCommons.logger.appendError(e.getStackTrace());
-                       e.printStackTrace();
                }
                
+               //Creating the alerts fifo.
                CcCommons.alertsFifo = new FiFo();
                
-               if(CcCommons.settings.haveAlertList()){
+               //Restoring alerts.
+               if(CcCommons.settings.haveAlertList())
+               {
                        //Restore all scheduled alerts.
                        Vector<Object[]> alertsDatas = 
CcCommons.settings.getAlertsDatas();
-                       for(Object[] alert : alertsDatas){
-                               if(alert[3].equals("every")){
+                       for(Object[] alert : alertsDatas)
+                       {
+                               if(alert[3].equals("every"))
+                               {
                                        String uid = alert[0].toString();
                                        int mins = 
Integer.valueOf(alert[2].toString()).intValue();
                                        
                                        new AlertRestoreThread(true, 
mins,uid).run();
                                }
-                               else if(alert[3].equals("fixed")){
+                               else if(alert[3].equals("fixed"))
+                               {
                                        String uid = alert[0].toString();
                                        int mins = 
Integer.valueOf(alert[2].toString()).intValue();
                                        int hour = 
Integer.valueOf(alert[1].toString()).intValue();
@@ -69,8 +82,5 @@
                                }
                        }
                }
-               
-               CcCommons.logger.appendDone();
-               
        }
 }


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to