Astyle the android unittest java file

This commit is contained in:
Martin Storsjö 2015-04-27 13:53:53 +03:00
parent 31a9fb6913
commit 8e26d9c31c

View File

@ -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);
}