Back to project page DoomPlay.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...
If you think the Android project DoomPlay listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.perm.DoomPlay; /* w ww . ja v a 2s .co m*/ import android.content.Context; import android.util.Log; /* My device doesn't log without that; */ public class ExceptionLog implements Thread.UncaughtExceptionHandler { private Thread.UncaughtExceptionHandler defaultHandler; private Context context; private static ExceptionLog exceptionLog; private ExceptionLog(Context context) { defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); this.context = context; } public static void init(Context context) { if(exceptionLog == null) exceptionLog = new ExceptionLog(context); Thread.setDefaultUncaughtExceptionHandler(exceptionLog); } @Override public void uncaughtException(Thread thread, Throwable ex) { Log.i("EXCEPTION",ex.toString()); ex.printStackTrace(); defaultHandler.uncaughtException(thread,ex); } }