Back to project page BluetoothHidEmu.
The source code is released under:
Apache License
If you think the Android project BluetoothHidEmu 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 andraus.bluetoothhidemu.spoof; /*from w ww . ja v a2 s.c o m*/ public class CleanupExceptionHandler implements Thread.UncaughtExceptionHandler { private BluetoothAdapterSpoofer mSpoofer = null; private Thread.UncaughtExceptionHandler mDefaultExceptionHandler = null ; public CleanupExceptionHandler(BluetoothAdapterSpoofer connHelper) { mDefaultExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); mSpoofer = connHelper; } @Override public void uncaughtException(Thread thread, Throwable ex) { if (mSpoofer != null && mSpoofer.isSpoofed()) { mSpoofer.tearDownSpoofing(); } mDefaultExceptionHandler.uncaughtException(thread, ex); } }