AppRTCDemo(android): uncaught exceptions now display a modal dialog box before killing the app.
BUG=2458 R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2348004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4914 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
		| @@ -93,16 +93,8 @@ public class AppRTCDemoActivity extends Activity | ||||
|   public void onCreate(Bundle savedInstanceState) { | ||||
|     super.onCreate(savedInstanceState); | ||||
|  | ||||
|     // Since the error-handling of this demo consists of throwing | ||||
|     // RuntimeExceptions and we assume that'll terminate the app, we install | ||||
|     // this default handler so it's applied to background threads as well. | ||||
|     Thread.setDefaultUncaughtExceptionHandler( | ||||
|         new Thread.UncaughtExceptionHandler() { | ||||
|           public void uncaughtException(Thread t, Throwable e) { | ||||
|             e.printStackTrace(); | ||||
|             System.exit(-1); | ||||
|           } | ||||
|         }); | ||||
|         new UnhandledExceptionHandler(this)); | ||||
|  | ||||
|     PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE); | ||||
|     wakeLock = powerManager.newWakeLock( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 fischman@webrtc.org
					fischman@webrtc.org