video: fix the video display

When accepting a video call from the notification bar, sometimes the video
is not displayed. startCapture was called before the initialization of
CallActivity and CallFragment.
This commit forces the addition of a videoSurface.

Change-Id: I9a7a370ca95bb8f87a66c7941bc88c180fc676b5
Tuleap: #774
diff --git a/ring-android/app/src/main/java/cx/ring/fragments/CallFragment.java b/ring-android/app/src/main/java/cx/ring/fragments/CallFragment.java
index 7f4ee62..d9791aa 100644
--- a/ring-android/app/src/main/java/cx/ring/fragments/CallFragment.java
+++ b/ring-android/app/src/main/java/cx/ring/fragments/CallFragment.java
@@ -670,12 +670,16 @@
 
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
+        updatePreview();
+    }
+
+    private void updatePreview() {
         if (videoPreview.getVisibility() == View.VISIBLE) {
             try {
                 mCallbacks.getRemoteService().setPreviewSettings();
                 mCallbacks.getRemoteService().videoPreviewSurfaceAdded();
             } catch (RemoteException e) {
-                e.printStackTrace();
+                Log.e(TAG, "service not found ", e);
             }
         }
     }
@@ -843,6 +847,8 @@
 
         contactBubbleLayout.setVisibility(haveVideo ? View.GONE : View.VISIBLE);
         updateSecurityDisplay();
+
+        updatePreview();
     }
 
     private void updateSecurityDisplay() {
@@ -949,10 +955,9 @@
 
         if (!vcard.getPhotos().isEmpty()) {
             Photo tmp = vcard.getPhotos().get(0);
-            if(tmp.getData() != null) {
+            if (tmp.getData() != null) {
                 contactBubbleView.setImageBitmap(CropImageUtils.cropImageToCircle(tmp.getData()));
-            }
-            else{
+            } else {
                 setDefaultPhoto();
             }
         } else {