Use new API for getting media encryption state.
This commit is contained in:
parent
47ba198c78
commit
9973c2d40a
1 changed files with 20 additions and 18 deletions
|
@ -677,14 +677,14 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
removeFromConfButton.setOnClickListener(l);
|
removeFromConfButton.setOnClickListener(l);
|
||||||
addVideoButton.setOnClickListener(l);
|
addVideoButton.setOnClickListener(l);
|
||||||
|
|
||||||
if (Version.hasZrtp()) {
|
String mediaEncryption = call.getCurrentParamsCopy().getMediaEncryption();
|
||||||
if (call.areStreamsEncrypted()) {
|
if ("none".equals(mediaEncryption)) {
|
||||||
setVisibility(v, R.id.callee_status_secured, true);
|
boolean showUnencrypted = Version.hasZrtp();
|
||||||
setVisibility(v, R.id.callee_status_not_secured, false);
|
setVisibility(v, R.id.callee_status_secured, false);
|
||||||
} else {
|
setVisibility(v, R.id.callee_status_not_secured, showUnencrypted);
|
||||||
setVisibility(v, R.id.callee_status_secured, false);
|
} else {
|
||||||
setVisibility(v, R.id.callee_status_not_secured, true);
|
setVisibility(v, R.id.callee_status_secured, true);
|
||||||
}
|
setVisibility(v, R.id.callee_status_not_secured, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
v.setOnClickListener(new OnClickListener() {
|
v.setOnClickListener(new OnClickListener() {
|
||||||
|
@ -703,16 +703,18 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
enableView(content, R.id.resume, l, !isInConference && showResume);
|
enableView(content, R.id.resume, l, !isInConference && showResume);
|
||||||
enableView(content, R.id.terminate_call, l, true);
|
enableView(content, R.id.terminate_call, l, true);
|
||||||
|
|
||||||
if (Version.hasZrtp()) {
|
String mediaEncryption = call.getCurrentParamsCopy().getMediaEncryption();
|
||||||
if (call.areStreamsEncrypted()) {
|
if ("none".equals(mediaEncryption)) {
|
||||||
setVisibility(content, R.id.encrypted, true);
|
boolean showUnencrypted = Version.hasZrtp();
|
||||||
setVisibility(content, R.id.unencrypted, false);
|
setVisibility(content, R.id.encrypted, false);
|
||||||
|
setVisibility(content, R.id.unencrypted, showUnencrypted);
|
||||||
|
} else {
|
||||||
|
setVisibility(content, R.id.encrypted, true);
|
||||||
|
setVisibility(content, R.id.unencrypted, false);
|
||||||
|
if ("zrtp".equals(mediaEncryption)) {
|
||||||
TextView token = (TextView) content.findViewById(R.id.authentication_token);
|
TextView token = (TextView) content.findViewById(R.id.authentication_token);
|
||||||
String fmt = getString(R.string.authenticationTokenFormat);
|
String fmt = getString(R.string.authenticationTokenFormat);
|
||||||
token.setText(String.format(fmt, call.getAuthenticationToken()));
|
token.setText(String.format(fmt, call.getAuthenticationToken()));
|
||||||
} else {
|
|
||||||
setVisibility(content, R.id.encrypted, false);
|
|
||||||
setVisibility(content, R.id.unencrypted, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue