package go;

import android.content.Context;
import android.os.Looper;
import android.util.Log;

// Go is an entry point for libraries compiled in Go.
// In an app's Application.onCreate, call:
//
// 	Go.init(getApplicationContext());
//
// When the function returns, it is safe to start calling
// Go code.
public final class Go {
	// init loads libgojni.so and starts the runtime.
	public static void init(final Context ctx) {
		if (Looper.myLooper() != Looper.getMainLooper()) {
			Log.wtf("Go", "Go.init must be called from main thread (looper="+Looper.myLooper().toString()+")");
		}
		if (running) {
			return;
		}
		running = true;

		// TODO(crawshaw): context.registerComponentCallbacks for runtime.GC

		System.loadLibrary("gojni");

		new Thread("GoMain") {
			public void run() {
				Go.run(ctx);
			}
		}.start();

		Go.waitForRun();

        new Thread("GoReceive") {
            public void run() { Seq.receive(); }
        }.start();
	}

	private static boolean running = false;

	private static native void run(Context ctx);
	private static native void waitForRun();
}

@@ -841,24 +841,18 @@
 Run();%0A%0A
-        
+%09%09
 new Thre
@@ -873,20 +873,11 @@
 ) %7B%0A
-            
+%09%09%09
 publ
@@ -913,16 +913,10 @@
 ; %7D%0A
-        
+%09%09
 %7D.st

fix tabs vs spaces.