Commit df37a36b authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

remove dead code about ZRTP

ZRTP is not longer supported since long now.
Many code and API are deprecated and public API is stubbed.
This patch removes all this dead code.

Change-Id: Ie33f0c055b28b50f7183d04def2002c51ed94dfc
Tuleap: #889
parent d4cd9965
......@@ -170,11 +170,6 @@ public class CallFragment extends Fragment implements CallInterface {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(CallManagerCallBack.RECORD_STATE_CHANGED);
intentFilter.addAction(CallManagerCallBack.ZRTP_OFF);
intentFilter.addAction(CallManagerCallBack.ZRTP_ON);
intentFilter.addAction(CallManagerCallBack.DISPLAY_SAS);
intentFilter.addAction(CallManagerCallBack.ZRTP_NEGOTIATION_FAILED);
intentFilter.addAction(CallManagerCallBack.ZRTP_NOT_SUPPORTED);
intentFilter.addAction(CallManagerCallBack.RTCP_REPORT_RECEIVED);
intentFilter.addAction(DRingService.VIDEO_EVENT);
......@@ -336,16 +331,6 @@ public class CallFragment extends Fragment implements CallInterface {
resetVideoSizes();
} else if (action.contentEquals(CallManagerCallBack.RECORD_STATE_CHANGED)) {
recordingChanged((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"), intent.getStringExtra("file"));
} else if (action.contentEquals(CallManagerCallBack.ZRTP_OFF)) {
secureZrtpOff((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"));
} else if (action.contentEquals(CallManagerCallBack.ZRTP_ON)) {
secureZrtpOn((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"));
} else if (action.contentEquals(CallManagerCallBack.DISPLAY_SAS)) {
displaySAS((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"));
} else if (action.contentEquals(CallManagerCallBack.ZRTP_NEGOTIATION_FAILED)) {
zrtpNegotiationFailed((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"));
} else if (action.contentEquals(CallManagerCallBack.ZRTP_NOT_SUPPORTED)) {
zrtpNotSupported((Conference) intent.getParcelableExtra("conference"), intent.getStringExtra("call"));
} else if (action.contentEquals(CallManagerCallBack.RTCP_REPORT_RECEIVED)) {
rtcpReportReceived(null, null); // FIXME
} else {
......@@ -583,39 +568,6 @@ public class CallFragment extends Fragment implements CallInterface {
}
@Override
public void secureZrtpOn(Conference updated, String id) {
Log.i(TAG, "secureZrtpOn");
mCallbacks.updateDisplayedConference(updated);
updateSecurityDisplay();
}
@Override
public void secureZrtpOff(Conference updated, String id) {
Log.i(TAG, "secureZrtpOff");
mCallbacks.updateDisplayedConference(updated);
updateSecurityDisplay();
}
@Override
public void displaySAS(Conference updated, final String securedCallID) {
Log.i(TAG, "displaySAS");
mCallbacks.updateDisplayedConference(updated);
updateSecurityDisplay();
}
@Override
public void zrtpNegotiationFailed(Conference c, String securedCallID) {
mCallbacks.updateDisplayedConference(c);
updateSecurityDisplay();
}
@Override
public void zrtpNotSupported(Conference c, String securedCallID) {
mCallbacks.updateDisplayedConference(c);
updateSecurityDisplay();
}
@Override
public void rtcpReportReceived(Conference c, HashMap<String, Integer> stats) {
// No implementation yet
......@@ -898,22 +850,6 @@ public class CallFragment extends Fragment implements CallInterface {
Log.i(TAG, "DISPLAY_RED_LOCK");
showLock(R.drawable.red_lock);
break;
case SecureSipCall.DISPLAY_CONFIRM_SAS:
final Button sas = (Button) mSecuritySwitch.findViewById(R.id.confirm_sas);
sas.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
mCallbacks.getRemoteService().confirmSAS(secured.getCallId());
showLock(R.drawable.green_lock);
} catch (RemoteException e) {
e.printStackTrace();
}
}
});
mSecuritySwitch.setDisplayedChild(0);
mSecuritySwitch.setVisibility(View.VISIBLE);
break;
case SecureSipCall.DISPLAY_NONE:
break;
}
......
......@@ -30,15 +30,5 @@ public interface CallInterface {
void recordingChanged(Conference c, String callID, String filename);
void secureZrtpOn(Conference c, String id);
void secureZrtpOff(Conference c, String id);
void displaySAS(Conference c, String securedCallID);
void zrtpNegotiationFailed(Conference c, String securedCallID);
void zrtpNotSupported(Conference c, String securedCallID);
void rtcpReportReceived(Conference c, HashMap<String, Integer> stats);
}
......@@ -27,13 +27,11 @@ public class SecureSipCall extends SipCall {
private static final String TAG = SecureSipCall.class.getSimpleName();
public interface SecureLayer {
//int ZRTP_LAYER = 0;
int SDES_LAYER = 1;
}
public final static int DISPLAY_GREEN_LOCK = 0;
public final static int DISPLAY_RED_LOCK = 1;
public final static int DISPLAY_CONFIRM_SAS = 2;
public final static int DISPLAY_NONE = 3;
int mSecureLayerUsed;
......@@ -72,7 +70,6 @@ public class SecureSipCall extends SipCall {
public void useSecureSDES(boolean use) {
mSdesModule.sdesIsOn = use;
//mZrtpModule.needSASConfirmation = false;
}
private class SdesModule {
......
......@@ -25,12 +25,6 @@ public class CallManagerCallBack extends Callback {
static public final String CONF_CHANGED = "conf_changed";
static public final String RECORD_STATE_CHANGED = "record_state";
static public final String ZRTP_ON = "secure_zrtp_on";
static public final String ZRTP_OFF = "secure_zrtp_off";
static public final String DISPLAY_SAS = "display_sas";
static public final String ZRTP_NEGOTIATION_FAILED = "zrtp_nego_failed";
static public final String ZRTP_NOT_SUPPORTED = "zrtp_not_supported";
static public final String RTCP_REPORT_RECEIVED = "on_rtcp_report_received";
......@@ -150,65 +144,6 @@ public class CallManagerCallBack extends Callback {
mService.sendBroadcast(intent);
}
@Override
public void secureSdesOn(String callID) {
Log.i(TAG, "on_secure_sdes_on");
/*SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
call.setInitialized();
call.useSecureSDES(true);*/
}
@Override
public void secureSdesOff(String callID) {
Log.i(TAG, "on_secure_sdes_off");
/*SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
call.setInitialized();
call.useSecureSDES(false);*/
}
@Override
public void secureZrtpOn(String callID, String cipher) {
Log.i(TAG, "on_secure_zrtp_on");
Intent intent = new Intent(ZRTP_ON);
intent.putExtra("call", callID);
intent.putExtra("cipher", cipher);
mService.sendBroadcast(intent);
}
@Override
public void secureZrtpOff(String callID) {
Log.i(TAG, "on_secure_zrtp_off");
Intent intent = new Intent(ZRTP_OFF);
intent.putExtra("call", callID);
mService.sendBroadcast(intent);
}
@Override
public void showSAS(String callID, String sas, int verified) {
Log.i(TAG, "on_show_sas:" + sas);
Intent intent = new Intent(DISPLAY_SAS);
intent.putExtra("call", callID);
intent.putExtra("sas", sas);
intent.putExtra("verified", verified);
mService.sendBroadcast(intent);
}
@Override
public void zrtpNotSuppOther(String callID) {
Log.i(TAG, "on_zrtp_not_supported");
Intent intent = new Intent(ZRTP_NOT_SUPPORTED);
intent.putExtra("call", callID);
mService.sendBroadcast(intent);
}
@Override
public void zrtpNegotiationFailed(String callID, String reason, String severity) {
Log.i(TAG, "on_zrtp_negociation_failed");
Intent intent = new Intent(ZRTP_NEGOTIATION_FAILED);
intent.putExtra("call", callID);
mService.sendBroadcast(intent);
}
@Override
public void onRtcpReportReceived(String callID, IntegerMap stats) {
Log.i(TAG, "on_rtcp_report_received");
......
......@@ -1369,18 +1369,6 @@ public class DRingService extends Service {
});
}
@Override
public void confirmSAS(final String callID) throws RemoteException {
getExecutor().execute(new SipRunnable() {
@Override
protected void doRun() throws SameThreadException, RemoteException {
Log.i(TAG, "DRingService.confirmSAS() thread running...");
Ringservice.setSASVerified(callID);
}
});
}
@Override
public List<String> getTlsSupportedMethods(){
Log.i(TAG, "DRingService.getTlsSupportedMethods()");
......
......@@ -67,7 +67,6 @@ interface IDRingService {
boolean isCaptureMuted();
/* Security */
void confirmSAS(in String callID);
List getTlsSupportedMethods();
/* DTMF */
......
......@@ -46,13 +46,6 @@ public:
virtual void sipCallStateChange(const std::string& call_id, const std::string& state, int code){}
virtual void recordingStateChanged(const std::string& call_id, int code){}
virtual void recordStateChange(const std::string& call_id, int state){}
virtual void secureSdesOn(const std::string& call_id){}
virtual void secureSdesOff(const std::string& call_id){}
virtual void secureZrtpOn(const std::string& call_id, const std::string& cipher){}
virtual void secureZrtpOff(const std::string& call_id){}
virtual void showSAS(const std::string& call_id, const std::string& sas, int verified){}
virtual void zrtpNotSuppOther(const std::string& call_id){}
virtual void zrtpNegotiationFailed(const std::string& call_id, const std::string& reason, const std::string& severity){}
virtual void onRtcpReportReceived(const std::string& call_id, const std::map<std::string, int>& stats){}
virtual void peerHold(const std::string& call_id, bool holding){}
};
......@@ -113,13 +106,6 @@ void startTone(int32_t start, int32_t type);
bool switchInput(const std::string& callID, const std::string& resource);
/* Security related methods */
void setSASVerified(const std::string& callID);
void resetSASVerified(const std::string& callID);
void setConfirmGoClear(const std::string& callID);
void requestGoClear(const std::string& callID);
void acceptEnrollment(const std::string& callID, bool accepted);
/* Instant messaging */
void sendTextMessage(const std::string& callID, const std::map<std::string, std::string>& messages, const std::string& from, const bool& isMixed);
......@@ -146,13 +132,6 @@ public:
virtual void sipCallStateChange(const std::string& call_id, const std::string& state, int code){}
virtual void recordingStateChanged(const std::string& call_id, int code){}
virtual void recordStateChange(const std::string& call_id, int state){}
virtual void secureSdesOn(const std::string& call_id){}
virtual void secureSdesOff(const std::string& call_id){}
virtual void secureZrtpOn(const std::string& call_id, const std::string& cipher){}
virtual void secureZrtpOff(const std::string& call_id){}
virtual void showSAS(const std::string& call_id, const std::string& sas, int verified){}
virtual void zrtpNotSuppOther(const std::string& call_id){}
virtual void zrtpNegotiationFailed(const std::string& call_id, const std::string& reason, const std::string& severity){}
virtual void onRtcpReportReceived(const std::string& call_id, const std::map<std::string, int>& stats){}
virtual void peerHold(const std::string& call_id, bool holding){}
};
......@@ -207,13 +207,6 @@ void init(ConfigurationCallback* confM, Callback* callM, VideoCallback* videoM)
exportable_callback<CallSignal::ConferenceRemoved>(bind(&Callback::conferenceRemoved, callM, _1)),
exportable_callback<CallSignal::NewCallCreated>(bind(&Callback::newCallCreated, callM, _1, _2, _3)),
exportable_callback<CallSignal::RecordingStateChanged>(bind(&Callback::recordingStateChanged, callM, _1, _2)),
exportable_callback<CallSignal::SecureSdesOn>(bind(&Callback::secureSdesOn, callM, _1)),
exportable_callback<CallSignal::SecureSdesOff>(bind(&Callback::secureSdesOff, callM, _1)),
exportable_callback<CallSignal::SecureZrtpOn>(bind(&Callback::secureZrtpOn, callM, _1, _2)),
exportable_callback<CallSignal::SecureZrtpOff>(bind(&Callback::secureZrtpOff, callM, _1)),
exportable_callback<CallSignal::ShowSAS>(bind(&Callback::showSAS, callM, _1, _2, _3)),
exportable_callback<CallSignal::ZrtpNotSuppOther>(bind(&Callback::zrtpNotSuppOther, callM, _1)),
exportable_callback<CallSignal::ZrtpNegotiationFailed>(bind(&Callback::zrtpNegotiationFailed, callM, _1, _2, _3)),
exportable_callback<CallSignal::RtcpReportReceived>(bind(&Callback::onRtcpReportReceived, callM, _1, _2)),
exportable_callback<CallSignal::PeerHold>(bind(&Callback::peerHold, callM, _1, _2))
};
......
......@@ -165,14 +165,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_centerVertical="true"
android:visibility="gone">
<Button
android:id="@+id/confirm_sas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@android:color/white"
android:textSize="12sp" />
<ImageView
android:id="@+id/lock_image"
android:layout_width="wrap_content"
......@@ -215,4 +207,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:visibility="visible" />
</FrameLayout>
</FrameLayout>
\ No newline at end of file
</FrameLayout>
......@@ -173,14 +173,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_centerVertical="true"
android:visibility="gone">
<Button
android:id="@+id/confirm_sas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@android:color/white"
android:textSize="12sp" />
<ImageView
android:id="@+id/lock_image"
android:layout_width="wrap_content"
......@@ -211,4 +203,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:visibility="visible" />
</FrameLayout>
</FrameLayout>
\ No newline at end of file
</FrameLayout>
......@@ -32,12 +32,10 @@ along with this program; if not, write to the Free Software
<string-array name="srtp_entry_values" translatable="false">
<item>NONE</item>
<item>ZRTP</item>
<item>SDES</item>
</string-array>
<string-array name="srtp_entry" translatable="false">
<item>@string/account_srtp_deactivated</item>
<item>ZRTP</item>
<item>SDES</item>
</string-array>
......@@ -55,4 +53,4 @@ along with this program; if not, write to the Free Software
<item>@string/conversation_action_delete_this</item>
</string-array>
</resources>
\ No newline at end of file
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment