Restores some of removed/changed methods for backward compatibility with old OTR bundle used on Android.

cusax-fix
paweldomas 13 years ago
parent c05f5e672c
commit b5999f5f59

@ -125,6 +125,14 @@ public Message createMessageWithUID(
return createMessage(messageText);
}
/**
* {@inheritDoc}
*/
public Message createMessageWithUID(String messageText, String messageUID)
{
return createMessage(messageText);
}
public abstract Message createMessage(
String content, String contentType, String encoding, String subject);

@ -68,6 +68,22 @@ public Message createMessage(String content, String contentType,
public Message createMessageWithUID(
String messageText, String contentType, String messageUID);
/**
* Create a Message instance with the specified UID and a default
* (text/plain) content type and encoding.
* This method can be useful when message correction is required. One can
* construct the corrected message to have the same UID as the message
* before correction.
*
* @param messageText the string content of the message.
* @param messageUID the unique identifier of this message.
* @return Message the newly created message
*
* @deprecated Method will be removed once OTR bundle is updated on Android.
*/
@Deprecated
public Message createMessageWithUID(String messageText, String messageUID);
/**
* Sends the <tt>message</tt> to the destination indicated by the
* <tt>to</tt> contact.

@ -14,6 +14,7 @@
import javax.net.ssl.*;
import net.java.sip.communicator.service.msghistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.*;
@ -1098,8 +1099,34 @@ public static void setLeaveChatRoomOnWindowClose(boolean isLeave)
Boolean.toString(isLeaveChatRoomOnWindowCloseEnabled));
}
/**
* Returns <code>true</code> if the "IS_MESSAGE_HISTORY_ENABLED"
* property is true, otherwise - returns <code>false</code>.
* Indicates to the user interface whether the history logging is enabled.
* @return <code>true</code> if the "IS_MESSAGE_HISTORY_ENABLED"
* property is true, otherwise - returns <code>false</code>.
*
* @deprecated Method will be removed once OTR bundle is updated on Android.
*/
@Deprecated
public static boolean isHistoryLoggingEnabled()
{
return configService.getBoolean(
MessageHistoryService.PNAME_IS_MESSAGE_HISTORY_ENABLED, true);
}
/**
* Returns <code>true</code> if messages history is enabled.
* Parameter <tt>id</tt> is ignored as it's an adapter for Android version
* that has to work with old OTR bundle.
*
* @deprecated Method will be removed once OTR bundle is updated on Android.
*/
@Deprecated
public static boolean isHistoryLoggingEnabled(String id)
{
return isHistoryLoggingEnabled();
}
/**
* Returns <code>true</code> if the "isHistoryShown" property is

Loading…
Cancel
Save