Skip to content

Commit 3048e9e

Browse files
author
Antonis Tsakiridis
committed
Fixed #405: When an incoming video call is answered as audio the local screen goes black
1 parent eca15ce commit 3048e9e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#Fri Sep 23 11:55:37 EEST 2016
2-
VERSION_CODE=1495
1+
#Fri Sep 23 14:26:47 EEST 2016
2+
VERSION_CODE=1500
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#Fri Sep 23 11:55:37 EEST 2016
2-
VERSION_CODE=1518
1+
#Fri Sep 23 14:26:47 EEST 2016
2+
VERSION_CODE=1523

restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/RCConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ else if (state == VideoViewState.REMOTE_VIEW_RECEIVED) {
12121212
//remoteRender.setVisibility(View.VISIBLE);
12131213
}
12141214
else if (state == VideoViewState.ICE_CONNECTED) {
1215-
if (remoteVideoReceived) {
1215+
if (remoteVideoReceived && localMediaType == ConnectionMediaType.AUDIO_VIDEO) {
12161216
remoteRender.setVisibility(View.VISIBLE);
12171217

12181218
remoteRenderLayout.setPosition(REMOTE_X, REMOTE_Y, REMOTE_WIDTH, REMOTE_HEIGHT);

restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/RCDevice.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,13 +1183,13 @@ void onNotificationCall(RCConnection connection, HashMap<String, String> customH
11831183
// Need this to show up as Heads-up Notification
11841184
.setPriority(NotificationCompat.PRIORITY_HIGH)
11851185
.setAutoCancel(true) // cancel notification when user acts on it (Important: only applies to default notification area, not additional actions)
1186-
.addAction(R.drawable.ic_videocam_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentVideo, PendingIntent.FLAG_ONE_SHOT))
1187-
.addAction(R.drawable.ic_call_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentAudio, PendingIntent.FLAG_ONE_SHOT))
1188-
.addAction(R.drawable.ic_call_end_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentDecline, PendingIntent.FLAG_ONE_SHOT))
1186+
.addAction(R.drawable.ic_videocam_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentVideo, PendingIntent.FLAG_UPDATE_CURRENT))
1187+
.addAction(R.drawable.ic_call_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentAudio, PendingIntent.FLAG_UPDATE_CURRENT))
1188+
.addAction(R.drawable.ic_call_end_24dp, "", PendingIntent.getService(getApplicationContext(), 0, serviceIntentDecline, PendingIntent.FLAG_UPDATE_CURRENT))
11891189
.setVibrate(notificationVibrationPattern)
11901190
.setLights(notificationColor, notificationColorPattern[0], notificationColorPattern[1])
1191-
.setContentIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDefault, PendingIntent.FLAG_ONE_SHOT))
1192-
.setDeleteIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDelete, PendingIntent.FLAG_ONE_SHOT));
1191+
.setContentIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDefault, PendingIntent.FLAG_UPDATE_CURRENT))
1192+
.setDeleteIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDelete, PendingIntent.FLAG_UPDATE_CURRENT));
11931193

11941194
Notification notification = builder.build();
11951195
// Add FLAG_INSISTENT so that the notification rings repeatedly (FLAG_INSISTENT is not exposed via builder, let's add manually)

0 commit comments

Comments
 (0)