2014-10-14 10:02:48 +00:00
|
|
|
package eu.siacs.conversations.services;
|
2014-10-13 23:06:45 +00:00
|
|
|
|
|
|
|
public class AbstractConnectionManager {
|
|
|
|
protected XmppConnectionService mXmppConnectionService;
|
|
|
|
|
|
|
|
public AbstractConnectionManager(XmppConnectionService service) {
|
|
|
|
this.mXmppConnectionService = service;
|
|
|
|
}
|
2014-10-15 17:32:12 +00:00
|
|
|
|
2014-10-13 23:06:45 +00:00
|
|
|
public XmppConnectionService getXmppConnectionService() {
|
|
|
|
return this.mXmppConnectionService;
|
|
|
|
}
|
2014-10-15 17:32:12 +00:00
|
|
|
|
2014-10-13 23:06:45 +00:00
|
|
|
public long getAutoAcceptFileSize() {
|
|
|
|
String config = this.mXmppConnectionService.getPreferences().getString(
|
|
|
|
"auto_accept_file_size", "524288");
|
|
|
|
try {
|
|
|
|
return Long.parseLong(config);
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
return 524288;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|