mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-11 19:55:03 -05:00
use 'phone' or 'tablet' as default resource
This commit is contained in:
parent
908aa19a36
commit
7113e21a43
@ -851,7 +851,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
||||
|
||||
public XmppConnection createConnection(final Account account) {
|
||||
final SharedPreferences sharedPref = getPreferences();
|
||||
account.setResource(sharedPref.getString("resource", "mobile")
|
||||
account.setResource(sharedPref.getString("resource", getString(R.string.default_resource))
|
||||
.toLowerCase(Locale.getDefault()));
|
||||
final XmppConnection connection = new XmppConnection(account, this);
|
||||
connection.setOnMessagePacketReceivedListener(this.mMessageParser);
|
||||
|
4
src/main/res/values-sw600dp/defaults.xml
Normal file
4
src/main/res/values-sw600dp/defaults.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="default_resource">Tablet</string>
|
||||
</resources>
|
4
src/main/res/values/defaults.xml
Normal file
4
src/main/res/values/defaults.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="default_resource">Phone</string>
|
||||
</resources>
|
@ -9,7 +9,7 @@
|
||||
android:title="@string/pref_grant_presence_updates"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="Mobile"
|
||||
android:defaultValue="@string/default_resource"
|
||||
android:entries="@array/resources"
|
||||
android:entryValues="@array/resources"
|
||||
android:key="resource"
|
||||
|
Loading…
Reference in New Issue
Block a user