org.android.activityminer.app.util
Class AppUncaughtExceptionHandler

Package class diagram package AppUncaughtExceptionHandler
java.lang.Object
  extended by org.android.activityminer.app.util.AppUncaughtExceptionHandler
All Implemented Interfaces:
Thread.UncaughtExceptionHandler

public class AppUncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler

Handler for uncaught exceptions in the application threads.


Field Summary
private  Application app
          The application.
private  Thread.UncaughtExceptionHandler orgHandler
          The original Handler.
 
Constructor Summary
AppUncaughtExceptionHandler(Thread.UncaughtExceptionHandler orgHandler, Application app)
          Constructor
 
Method Summary
private  void onUncaughtException(Thread thread, Throwable ex)
          Handler for uncaught exceptions.
private  File reportToExternalStorage()
          Does log all relevant information to a crash report file on the external storage.
 void uncaughtException(Thread thread, Throwable ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orgHandler

private final Thread.UncaughtExceptionHandler orgHandler
The original Handler.


app

private final Application app
The application.

Constructor Detail

AppUncaughtExceptionHandler

public AppUncaughtExceptionHandler(Thread.UncaughtExceptionHandler orgHandler,
                                   Application app)
Constructor

Parameters:
orgHandler - the original Handler
app - the application
Method Detail

uncaughtException

public void uncaughtException(Thread thread,
                              Throwable ex)
Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler

onUncaughtException

private void onUncaughtException(Thread thread,
                                 Throwable ex)
Handler for uncaught exceptions.

Parameters:
thread - the thread
ex - the exception

reportToExternalStorage

private File reportToExternalStorage()
Does log all relevant information to a crash report file on the external storage.

Returns:
the file name