From 8e26d9c31cd01d22ea6128028445e5cc89ec4fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 27 Apr 2015 13:53:53 +0300 Subject: [PATCH] Astyle the android unittest java file --- .../cisco/codec/unittest/MainActivity.java | 97 +++++++++---------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/test/build/android/src/com/cisco/codec/unittest/MainActivity.java b/test/build/android/src/com/cisco/codec/unittest/MainActivity.java index eaf6b67d..a7fb6f20 100644 --- 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 @@ import android.os.Process; 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); }