shithub: openh264

Download patch

ref: 8e26d9c31cd01d22ea6128028445e5cc89ec4fb5
parent: 31a9fb69136f26399b26658e6649e5c20a0c9e66
author: Martin Storsjö <martin@martin.st>
date: Mon Apr 27 09:53:53 EDT 2015

Astyle the android unittest java file

--- a/test/build/android/src/com/cisco/codec/unittest/MainActivity.java
+++ b/test/build/android/src/com/cisco/codec/unittest/MainActivity.java
@@ -12,71 +12,68 @@
 
 public class MainActivity extends Activity {
 
-	private TextView mStatusView;
+  private TextView mStatusView;
 
-	@Override
-	protected void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-		setContentView(R.layout.activity_main);
+  @Override
+  protected void onCreate (Bundle savedInstanceState) {
+    super.onCreate (savedInstanceState);
+    setContentView (R.layout.activity_main);
 
-		mStatusView = (TextView)findViewById(R.id.status_view);
+    mStatusView = (TextView)findViewById (R.id.status_view);
 
-        runUnitTest();
+    runUnitTest();
 
-	}
+  }
 
-	@Override
-	public void onDestroy()
-	{
-        super.onDestroy();
-        Log.i("codec_unittest","OnDestroy");
-		Process.killProcess(Process.myPid());
-	}
+  @Override
+  public void onDestroy() {
+    super.onDestroy();
+    Log.i ("codec_unittest", "OnDestroy");
+    Process.killProcess (Process.myPid());
+  }
 
 
 
-	public void runUnitTest()
-	{
-		Thread thread = new Thread() {
+  public void runUnitTest() {
+    Thread thread = new Thread() {
 
-			public void run()
-			{
-				Log.i("codec_unittest","codec unittest begin");
-				CharSequence text = "Running...";
-				if(mStatusView !=null)
-				{
-					mStatusView.setText(text);
-				}
+      public void run() {
+        Log.i ("codec_unittest", "codec unittest begin");
+        CharSequence text = "Running...";
+        if (mStatusView != null) {
+          mStatusView.setText (text);
+        }
 
-//				String path = getIntent().getStringExtra("path");
-//				if (path.length() <=0)
-//				{
-//					path = "/sdcard/codec_unittest.xml";
-//				}
-				String path = "/sdcard/codec_unittest.xml";
-				Log.i("codec_unittest","codec unittest runing @"+path);
-				DoUnittest("/sdcard", path);
-				Log.i("codec_unittest","codec unittest end");
-				finish();
-			}
+//        String path = getIntent().getStringExtra("path");
+//        if (path.length() <=0)
+//        {
+//          path = "/sdcard/codec_unittest.xml";
+//        }
+        String path = "/sdcard/codec_unittest.xml";
+        Log.i ("codec_unittest", "codec unittest runing @" + path);
+        DoUnittest ("/sdcard", path);
+        Log.i ("codec_unittest", "codec unittest end");
+        finish();
+      }
 
-		};
-		thread.start();
-	}
+    };
+    thread.start();
+  }
 
-	static{
-		try{
-			System.loadLibrary("stlport_shared");
-			//System.loadLibrary("openh264");
-			System.loadLibrary("ut");
-			System.loadLibrary("utDemo");
+  static {
+    try {
+      System.loadLibrary ("stlport_shared");
+      //System.loadLibrary("openh264");
+      System.loadLibrary ("ut");
+      System.loadLibrary ("utDemo");
 
 
-		}
-		catch(Exception e){Log.v("codec_unittest","Load library failed");}
+    } catch (Exception e) {
+      Log.v ("codec_unittest", "Load library failed");
+    }
 
-	}
+  }
 
-	public native void DoUnittest(String directory, String path);
+  public native void DoUnittest (String directory, String path);
 
 }