package net.nightweb;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
import android.util.Log;

import clojure.lang.Symbol;
import clojure.lang.Var;
import clojure.lang.RT;

import net.nightweb.R;

public class SplashActivity extends Activity {

    private static boolean firstLaunch = true;
    private static String TAG = "Splash";

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);

        if (firstLaunch) {
            firstLaunch = false;
            setupSplash();
            loadClojure();
        } else {
            proceed();
        }
    }

    public void setupSplash() {
        setContentView(R.layout.splashscreen);
    }

    public void proceed() {
        startActivity(new Intent("net.nightweb.MAIN"));
        finish();
    }

    public void loadClojure() {
        new Thread(new Runnable(){
                @Override
                public void run() {
                    Symbol CLOJURE_MAIN = Symbol.intern("neko.init");
                    Var REQUIRE = RT.var("clojure.core", "require");
                    REQUIRE.invoke(CLOJURE_MAIN);

                    Var INIT = RT.var("neko.init", "init");
                    INIT.invoke(SplashActivity.this.getApplication());

                    try {
                    	Class.forName("net.nightweb.MainPage");
                   	} catch (ClassNotFoundException e) {
                   		Log.e(TAG, "Failed loading MainPage", e);
                   	}

                    proceed();
                }
            }).start();
    }
}

@@ -299,33 +299,8 @@
 iew;
-%0Aimport android.util.Log;
 %0A%0Aim
@@ -497,50 +497,8 @@
 rue;
-%0A    private static String TAG = %22Splash%22;
 %0A%0A  
@@ -1405,238 +1405,8 @@
 );%0A%0A
-                    try %7B%0A                    %09Class.forName(%22net.nightweb.MainPage%22);%0A                   %09%7D catch (ClassNotFoundException e) %7B%0A                   %09%09Log.e(TAG, %22Failed loading MainPage%22, e);%0A                   %09%7D%0A%0A
     

Remove changes to SplashActivity