private TransportOptions initializeTransportOptions(boolean media) { TransportOptions transportOptions = new TransportOptions(getContext(), media); transportOptions.addOnTransportChangedListener(this); setOnLongClickListener(this); return transportOptions; }
@Override public boolean onLongClick(View v) { if (transportOptions.getEnabledTransports().size() > 1) { getTransportOptionsPopup().display(transportOptions.getEnabledTransports()); return true; } return false; }
@Override public void onSelected(TransportOption option) { transportOptions.setSelectedTransport(option.getType()); getTransportOptionsPopup().dismiss(); }
public void setDefaultTransport(TransportOption.Type type) { transportOptions.setDefaultTransport(type); }
public void disableTransport(TransportOption.Type type) { transportOptions.disableTransport(type); }
public void resetAvailableTransports(boolean isMediaMessage) { transportOptions.reset(isMediaMessage); }
public TransportOption getSelectedTransport() { return transportOptions.getSelectedTransport(); }
public void addOnTransportChangedListener(OnTransportChangedListener listener) { transportOptions.addOnTransportChangedListener(listener); }
public boolean isManualSelection() { return transportOptions.isManualSelection(); }