AppRTCDemo(android): don't initialize process-globals more than once.
BUG=3257 R=braveyao@webrtc.org Review URL: https://webrtc-codereview.appspot.com/19369004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6001 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
		| @@ -73,6 +73,7 @@ import java.util.regex.Pattern; | ||||
| public class AppRTCDemoActivity extends Activity | ||||
|     implements AppRTCClient.IceServersObserver { | ||||
|   private static final String TAG = "AppRTCDemoActivity"; | ||||
|   private static boolean factoryStaticInitialized; | ||||
|   private PeerConnectionFactory factory; | ||||
|   private VideoSource videoSource; | ||||
|   private boolean videoSourceStopped; | ||||
| @@ -104,8 +105,11 @@ public class AppRTCDemoActivity extends Activity | ||||
|     vsv = new VideoStreamsView(this, displaySize); | ||||
|     setContentView(vsv); | ||||
|  | ||||
|     abortUnless(PeerConnectionFactory.initializeAndroidGlobals(this), | ||||
|     if (!factoryStaticInitialized) { | ||||
|       abortUnless(PeerConnectionFactory.initializeAndroidGlobals(this), | ||||
|         "Failed to initializeAndroidGlobals"); | ||||
|       factoryStaticInitialized = true; | ||||
|     } | ||||
|  | ||||
|     AudioManager audioManager = | ||||
|         ((AudioManager) getSystemService(AUDIO_SERVICE)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 fischman@webrtc.org
					fischman@webrtc.org