Skip to content
Snippets Groups Projects
Commit c190a446 authored by Aline Bonnet's avatar Aline Bonnet Committed by gerrit2
Browse files

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
parent e3de5091
Branches
Tags
No related merge requests found
......@@ -670,12 +670,16 @@ public class CallFragment extends Fragment implements CallInterface, ContactDeta
@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 @@ public class CallFragment extends Fragment implements CallInterface, ContactDeta
contactBubbleLayout.setVisibility(haveVideo ? View.GONE : View.VISIBLE);
updateSecurityDisplay();
updatePreview();
}
private void updateSecurityDisplay() {
......@@ -951,8 +957,7 @@ public class CallFragment extends Fragment implements CallInterface, ContactDeta
Photo tmp = vcard.getPhotos().get(0);
if (tmp.getData() != null) {
contactBubbleView.setImageBitmap(CropImageUtils.cropImageToCircle(tmp.getData()));
}
else{
} else {
setDefaultPhoto();
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment