package se.z_app.zmote.gui;


import se.z_app.stb.api.RemoteControl;
import se.z_app.zmote.epg.EPGContentHandler;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.ImageView;


/**
 * First screen loaded with the current STB logo and loading animation
 * @author Francisco Valladares
 *
 */
public class SplashActivity extends Activity {
	/* TODO
	 * Right now we're using some established time
	 * We should figure out when to leave the screen
	 *  (modules load finish, for example.)
	 * Set the display time, in milliseconds (or extract it out as a configurable parameter) */
	
    private final int SPLASH_DISPLAY_LENGTH = 1000;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        new Bootstrap(this.getApplicationContext(), (WifiManager) getSystemService(WIFI_SERVICE));
        
        setContentView(R.layout.activity_splash);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_splash, menu);
        return true;
    }
 
    @Override
    protected void onResume() {
        super.onResume();

        /* TODO here:
         	1- Access the BD
        	2- Get the operator logo
         	3- Set @id/opLogo to the image we get    */
        
        ImageView iView = (ImageView) findViewById(R.id.opLogo);
        iView.setImageResource(R.drawable.tele2);
        
        new Handler().postDelayed(new Runnable() {
        	
            
            public void run() {
				
            	
               
				//Finish the splash activity so it can't be returned to.
                SplashActivity.this.finish(); 		
              
                // Create an Intent that will start the main activity.
                Intent mainIntent = new Intent(SplashActivity.this, 
                								SelectSTBActivity.class); 
                
                SplashActivity.this.startActivity(mainIntent);
                
            }
            
        }, SPLASH_DISPLAY_LENGTH);
        
    }
    
    
    
}

@@ -27,92 +27,8 @@
 ;%0A%0A%0A
-import se.z_app.stb.api.RemoteControl;%0Aimport se.z_app.zmote.epg.EPGContentHandler;%0A
 impo
@@ -56,24 +56,24 @@
 ifiManager;%0A
+
 import andro
@@ -399,249 +399,8 @@
 y %7B%0A
-%09/* TODO%0A%09 * Right now we're using some established time%0A%09 * We should figure out when to leave the screen%0A%09 *  (modules load finish, for example.)%0A%09 * Set the display time, in milliseconds (or extract it out as a configurable parameter) */%0A
 %09%0A  
@@ -942,24 +942,24 @@
 nResume() %7B%0A
+
         supe
@@ -975,146 +975,8 @@
 e();
-%0A%0A        /* TODO here:%0A         %091- Access the BD%0A        %092- Get the operator logo%0A         %093- Set @id/opLogo to the image we get    */
 %0A   

Remove unused imports