aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/AbstractConnectionManager.java
blob: a06be826e2fe818633a58513202798d5d715ffea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package eu.siacs.conversations.services;


public class AbstractConnectionManager {
	protected XmppConnectionService mXmppConnectionService;

	public AbstractConnectionManager(XmppConnectionService service) {
		this.mXmppConnectionService = service;
	}
	
	public XmppConnectionService getXmppConnectionService() {
		return this.mXmppConnectionService;
	}
	
	public long getAutoAcceptFileSize() {
		String config = this.mXmppConnectionService.getPreferences().getString(
				"auto_accept_file_size", "524288");
		try {
			return Long.parseLong(config);
		} catch (NumberFormatException e) {
			return 524288;
		}
	}
}