Make AppRTCDemoTest pass without Internet connection.
The AppRTCDemoTest is failing if the Android device lacks an Internet connection (e.g. is in flight mode). This change makes it benefit from the work done in https://review.webrtc.org/36769004/ to work around that limitation for loopback tests. R=phoglund@webrtc.org TBR=glaznev@webrtc.org BUG=4421 TESTED=Successful run on Nexus 7 (2013) in flight mode using: ninja -C out/Release . build/android/envsetup.sh adb install -r out/Release/apks/AppRTCDemo.apk webrtc/build/android/test_runner.py instrumentation --test-apk AppRTCDemoTest --verbose --release Review URL: https://webrtc-codereview.appspot.com/45649004 Cr-Commit-Position: refs/heads/master@{#8714} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8714 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -330,9 +330,16 @@ public class PeerConnectionClient {
|
||||
events.onPeerConnectionError("Failed to initializeAndroidGlobals");
|
||||
}
|
||||
factory = new PeerConnectionFactory();
|
||||
configureFactory(factory);
|
||||
Log.d(TAG, "Peer connection factory created.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook where tests can provide additional configuration for the factory.
|
||||
*/
|
||||
protected void configureFactory(PeerConnectionFactory factory) {
|
||||
}
|
||||
|
||||
private void createPeerConnectionInternal() {
|
||||
if (factory == null || isError) {
|
||||
Log.e(TAG, "Peerconnection factory is not created");
|
||||
|
||||
Reference in New Issue
Block a user