diff options
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | res/layout/dialog_verify_otr.xml | 3 | ||||
-rw-r--r-- | res/layout/edit_account_dialog.xml | 2 | ||||
-rw-r--r-- | res/menu/attachment_choices.xml | 4 | ||||
-rw-r--r-- | res/values-de/strings.xml | 3 | ||||
-rw-r--r-- | res/values/strings.xml | 1 | ||||
-rw-r--r-- | src/eu/siacs/conversations/ui/ContactsActivity.java | 7 | ||||
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationActivity.java | 8 | ||||
-rw-r--r-- | src/eu/siacs/conversations/utils/Validator.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 4 |
10 files changed, 28 insertions, 15 deletions
@@ -42,11 +42,14 @@ These XEPs are - as of now: (In order of appearance) ###Code -* Rene Treffer @rtreffer -* Andreas Straub @strb +* [Rene Treffer](https://github.com/rtreffer) +* [Andreas Straub](https://github.com/strb) ###Translations -* @beriain (Spanish and Basque) +* [Sergio Cárdenas](https://github.com/kruks23) (Spanish) +* [Benoit Bouvarel](https://github.com/BenoitBouvarel) (French) +* [Daniel Gultsch](https://github.com/iNPUTmice) (German) + ##FAQ ###General diff --git a/res/layout/dialog_verify_otr.xml b/res/layout/dialog_verify_otr.xml index 41ce3b07..6dfe149d 100644 --- a/res/layout/dialog_verify_otr.xml +++ b/res/layout/dialog_verify_otr.xml @@ -20,7 +20,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" - android:text="julia@jabber.example.com" android:textSize="14sp" /> <TextView android:layout_width="wrap_content" @@ -35,7 +34,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" - android:text="2674D6A0 0B1421B1 BFC42AEC C56F3719 672437D8" android:textSize="14sp" android:typeface="monospace"/> <TextView @@ -51,7 +49,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" - android:text="2674D6A0 0B1421B1 BFC42AEC C56F3719 672437D8" android:textSize="14sp" android:typeface="monospace"/> </LinearLayout> diff --git a/res/layout/edit_account_dialog.xml b/res/layout/edit_account_dialog.xml index 0a86039d..a5733cfe 100644 --- a/res/layout/edit_account_dialog.xml +++ b/res/layout/edit_account_dialog.xml @@ -19,7 +19,7 @@ android:layout_height="wrap_content" android:ems="10" android:inputType="textEmailAddress" - android:hint="username@jabber.example.com"> + android:hint="username@example.com"> </EditText> diff --git a/res/menu/attachment_choices.xml b/res/menu/attachment_choices.xml index 84e777b6..7e3ebbea 100644 --- a/res/menu/attachment_choices.xml +++ b/res/menu/attachment_choices.xml @@ -7,5 +7,7 @@ <item android:id="@+id/attach_take_picture" android:title="@string/attach_take_picture"/> - + <item + android:id="@+id/attach_record_voice" + android:title="@string/attach_record_voice" /> </menu>
\ No newline at end of file diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 221e747d..88376842 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -4,7 +4,7 @@ <string name="app_name">Conversations</string> <string name="action_settings">Einstellungen</string> <string name="action_add">Neue Unterhaltung</string> - <string name="action_accounts">Kontos verwalten</string> + <string name="action_accounts">Konten verwalten</string> <string name="action_refresh">Kontaktliste neu laden</string> <string name="action_end_conversation">Unterhaltung beenden</string> <string name="action_contact_details">Kontaktdetails</string> @@ -163,5 +163,6 @@ <string name="mgmt_account_delete">Löschen</string> <string name="mgmt_account_disable">Vorübergehend abschalten</string> <string name="mgmt_account_enable">Anschalten</string> + <string name="attach_record_voice">Sprache aufzeichnen</string> </resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 040382f8..9841aa60 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -163,5 +163,6 @@ <string name="mgmt_account_delete">Delete</string> <string name="mgmt_account_disable">Temporarily disable</string> <string name="mgmt_account_enable">Enable</string> + <string name="attach_record_voice">Record voice</string> </resources>
\ No newline at end of file diff --git a/src/eu/siacs/conversations/ui/ContactsActivity.java b/src/eu/siacs/conversations/ui/ContactsActivity.java index e403450a..6e15b678 100644 --- a/src/eu/siacs/conversations/ui/ContactsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactsActivity.java @@ -515,9 +515,10 @@ public class ContactsActivity extends XmppActivity { getActionBar().setHomeButtonEnabled(false); } this.rosterContacts.clear(); - for (int i = 0; i < accounts.size(); ++i) { - rosterContacts.addAll(xmppConnectionService.getRoster(accounts - .get(i))); + for(Account account : accounts) { + if (account.getStatus() != Account.STATUS_DISABLED) { + rosterContacts.addAll(xmppConnectionService.getRoster(account)); + } } updateAggregatedContacts(); } diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index ac9328ca..59c47fcf 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -66,11 +66,13 @@ public class ConversationActivity extends XmppActivity { public static final int REQUEST_DECRYPT_PGP = 0x76783; private static final int REQUEST_ATTACH_FILE_DIALOG = 0x48502; private static final int REQUEST_IMAGE_CAPTURE = 0x33788; + private static final int REQUEST_RECORD_AUDIO = 0x46189; private static final int REQUEST_SEND_PGP_IMAGE = 0x53883; public static final int REQUEST_ENCRYPT_MESSAGE = 0x378018; private static final int ATTACHMENT_CHOICE_CHOOSE_IMAGE = 0x92734; private static final int ATTACHMENT_CHOICE_TAKE_PHOTO = 0x84123; + private static final int ATTACHMENT_CHOICE_RECORD_VOICE = 0x75291; protected SlidingPaneLayout spl; @@ -352,6 +354,9 @@ public class ConversationActivity extends XmppActivity { attachFileIntent.setAction(Intent.ACTION_GET_CONTENT); Intent chooser = Intent.createChooser(attachFileIntent, getString(R.string.attach_file)); startActivityForResult(chooser, REQUEST_ATTACH_FILE_DIALOG); + } else if (attachmentChoice==ATTACHMENT_CHOICE_RECORD_VOICE) { + Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); + startActivityForResult(intent, REQUEST_RECORD_AUDIO); } } } @@ -452,6 +457,9 @@ public class ConversationActivity extends XmppActivity { case R.id.attach_take_picture: attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO); break; + case R.id.attach_record_voice: + attachFile(ATTACHMENT_CHOICE_RECORD_VOICE); + break; } return false; } diff --git a/src/eu/siacs/conversations/utils/Validator.java b/src/eu/siacs/conversations/utils/Validator.java index fce953ae..51d8b25c 100644 --- a/src/eu/siacs/conversations/utils/Validator.java +++ b/src/eu/siacs/conversations/utils/Validator.java @@ -5,7 +5,7 @@ import java.util.regex.Pattern; public class Validator { public static final Pattern VALID_JID = - Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); + Pattern.compile("\\b^[A-Z0-9._%+-]+@([A-Z0-9.-]+\\.)?\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}\\b$|^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); public static boolean isValidJid(String jid) { Matcher matcher = VALID_JID.matcher(jid); diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index 3fc6385a..a04105a8 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -21,7 +21,6 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.Map.Entry; import javax.net.ssl.SSLContext; @@ -547,7 +546,8 @@ public class XmppConnection implements Runnable { Log.d(LOGTAG,account.getJid()+": sending deprecated session"); IqPacket startSession = new IqPacket(IqPacket.TYPE_SET); startSession.addChild("session","urn:ietf:params:xml:ns:xmpp-session"); //setContent("") - this.sendIqPacket(startSession, null); + startSession.setId(nextRandomId()); + this.sendPacket(startSession, null); } } } |