package com.wake_e;

import com.wake_e.tools.TokenRequester;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.FragmentActivity;

public class SplashScreenActivity extends FragmentActivity {
    // Splash screen timer
    private static int SPLASH_TIME_OUT = 3000;
    
    private static SplashScreenActivity that;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_splash);
	that = this;
	new Handler().postDelayed(new Runnable() {

	    /*
	     * Showing splash screen with a timer. This will be useful when you
	     * want to show case your app logo / company
	     */

	    @Override
	    public void run() {
		// This method will be executed once the timer is over
		// Start your app main activity
		TokenRequester.initiateRequest(SplashScreenActivity.that,
			Controller.getInstance(getApplicationContext()).getCredentials("gmail").getUser());
		Intent i = new Intent(SplashScreenActivity.this, MainActivity.class);
		startActivity(i);

		// close this activity
		finish();
	    }
	}, SPLASH_TIME_OUT);
    }
}
@@ -14,16 +14,97 @@
 ake_e;%0A%0A
+import com.wake_e.constants.WakeEConstants;%0Aimport com.wake_e.model.Credentials;%0A
 import c
@@ -330,20 +330,17 @@
 ivity %7B%0A
-    
+%09
 // Splas
@@ -354,20 +354,17 @@
 n timer%0A
-    
+%09
 private 
@@ -396,23 +396,16 @@
 T = 
-3
+2
 000;%0A
-    %0A    
+%0A%09
 priv
@@ -443,20 +443,17 @@
  that;%0A%0A
-    
+%09
 @Overrid
@@ -454,20 +454,17 @@
 verride%0A
-    
+%09
 protecte
@@ -508,16 +508,17 @@
 tate) %7B%0A
+%09
 %09super.o
@@ -546,16 +546,17 @@
 State);%0A
+%09
 %09setCont
@@ -590,16 +590,17 @@
 plash);%0A
+%09
 %09that = 
@@ -605,16 +605,17 @@
 = this;%0A
+%09
 %09new Han
@@ -656,20 +656,16 @@
 %7B%0A%0A%09
-    /*%0A%09    
+%09%09/*%0A%09%09%09
  * S
@@ -729,20 +729,18 @@
 en you%0A%09
-    
+%09%09
  * want 
@@ -781,22 +781,18 @@
 ny%0A%09
-    
+%09%09
  */%0A%0A%09
-    
+%09%09
 @Ove
@@ -798,20 +798,18 @@
 erride%0A%09
-    
+%09%09
 public v
@@ -820,16 +820,18 @@
 run() %7B%0A
+%09%09
 %09%09// Thi
@@ -881,16 +881,18 @@
  over%0A%09%09
+%09
+%09
 // Start
@@ -921,69 +921,26 @@
 y%0A%09%09
-TokenRequester.initiateRequest(SplashScreenActivity.that,%0A%09%09%09
+%09%09Credentials c = 
 Cont
@@ -1002,16 +1002,147 @@
 als(
-%22gmail%22)
+%0A%09%09%09%09%09%09WakeEConstants.Credentials.GMAIL);%0A%0A%09%09%09%09if(c != null)%7B%0A%09%09%09%09%09TokenRequester%0A%09%09%09%09%09.initiateRequest(%0A%09%09%09%09%09%09%09SplashScreenActivity.that,c
 .get
@@ -1150,16 +1150,24 @@
 ser());%0A
+%09%09%09%09%7D%0A%09%09
 %09%09Intent
@@ -1208,17 +1208,23 @@
 ty.this,
- 
+%0A%09%09%09%09%09%09
 MainActi
@@ -1236,16 +1236,18 @@
 class);%0A
+%09%09
 %09%09startA
@@ -1259,16 +1259,18 @@
 ty(i);%0A%0A
+%09%09
 %09%09// clo
@@ -1286,16 +1286,18 @@
 ctivity%0A
+%09%09
 %09%09finish
@@ -1301,22 +1301,21 @@
 ish();%0A%09
-    
+%09%09
 %7D%0A
+%09
 %09%7D, SPLA
@@ -1332,11 +1332,8 @@
 T);%0A
-    
+%09
 %7D%0A%7D

Fix splashScreen error