From 0578fb38503b0cb9ec96e6244323d838033da410 Mon Sep 17 00:00:00 2001 From: kruks23 Date: Tue, 6 May 2014 20:34:51 +0200 Subject: #79 First translation into spanish. --- res/values-es/arrays.xml | 22 ++++++++++++ res/values-es/strings.xml | 86 +++++++++++++++++++++++++++++++++++++++++++++++ res/values-es/styles.xml | 19 +++++++++++ 3 files changed, 127 insertions(+) create mode 100644 res/values-es/arrays.xml create mode 100644 res/values-es/strings.xml create mode 100644 res/values-es/styles.xml diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml new file mode 100644 index 00000000..a26fbfa4 --- /dev/null +++ b/res/values-es/arrays.xml @@ -0,0 +1,22 @@ + + + + Móvil + Teléfono + Tablet + Conversaciones + Android + + + Nunca + 256 KB + 512 KB + 1 MB + + + 0 + 262144 + 524288 + 1048576 + + diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml new file mode 100644 index 00000000..f8729d3c --- /dev/null +++ b/res/values-es/strings.xml @@ -0,0 +1,86 @@ + + + + Conversaciones + Ajustes + Nueva conversación + Gestionar cuentas + Terminar conversación + Información del contacto + Información de conferencia + Conversación privada + Añadir cuenta + Contactos + Ahora + enviando… + Renovar comunicación PGP + Desencriptando mensaje. Por favor espere… + Información de conferencia + El alias ya está en uso + Moderador + Participante + Visitante + Introduce nuevo nombre: + ¿Deseas eliminar %s de tu lista? La conversación asociada a este contacto no se eliminará. + El servidor %s presenta un certificado no confiable, posiblemente autofirmado. + Información del servidor + Registrar nueva cuenta en servidor + Compartir con + Pulse para preguntar de nuevo + Huella digital OTR + Huella digital OTR no generada. Continúa y comienza una conversación encriptada + Comenzar conversación + Invitar contactos + Invitar a conferencia exsitente + Crear nueva conferencia + Cancelar + Crear \u0026 Invitar + ¿Deseas crear una nueva conferencia con una dirección aleatoria e invitar los contactos seleccionados a ella? + Conferencia no existente + Invitación enviada + Cuenta desconectada + Tienes que estar conectado para invitar a contactos a la conferencia + Conversaciones ha fallado + Enviando registros de actividad estás ayudando al desarrollo de Conversaciones\nAdvertencia: Esto usarará tu cuenta XMPP para enviar registros de actividad al desarrollador. + Enviar ahora + Nunca preguntar de nuevo + No se ha podido conectar a la cuenta + No se ha podido conectar a las cuentas + Pulsa aquí para gestionar tus cuentas + Enviar fichero + El contacto no está en tu lista. ¿Desea añadirlo? + Añadir contacto + Error al enviar + rechazado + Recibiendo archivo de imagen. Por favor espere… + Preparando imagen para enviar. Por favor espere… + Limpiar historial + Limpiar historial de conversación + ¿Deseas eliminar todos los mensajes de esta conversación?\n\nAdvertencia: Esto no afectará a los mensajes almacenados en otros dispositivos o servidor. + Eliminar mensajes + Terminar esta conversación después + Seleccionar recurso + Enviar mensaje a conferencia + Enviar mensaje de texto + Enviar mensaje encriptado OTR + Enviar mensaje encriptado openPGP + Tu alias ha sido modificado + Descargar imagen + Error cargando imagen (Archivo no encontrado) + Archivo de imagen ofrecido para descarga + No conectado + Debes estar conectado para enviar %s pero tu cuenta asociada con esta conversación está actualmente desconectada. + No puedes realizar esta operación mientras estás desconectado + archivos + Mensajes encriptados OTR + Gestionar cuentas + El contacto está desconectado + Desafortunadamente no está soportado enviar mensajes encriptados OTR a contactos desconectados.\n¿Te gustaría enviar un mensaje de texto plano? + Desafortunadamente no está soportado enviar archivos a contactos desconectados. + Enviado sin encriptar + Fallo al desencriptar. Es posible que no tengas una clave privada apropiada. + OpenKeychain + Conversaciones utiliza una aplicación de terceros llamada OpenKeychain para encriptar y desencriptar mensajes y gestionar tus claves públicas.\n\nOpenKeychain está publicado bajo licencia GPLv3 y disponible on F-Droid y Google Play.\n\n(Por favor, reinicie Conversaciones después.) + Reiniciar + Instalar + diff --git a/res/values-es/styles.xml b/res/values-es/styles.xml new file mode 100644 index 00000000..1468283e --- /dev/null +++ b/res/values-es/styles.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 7fa61564b83b4a9e3403974b291750286a32d451 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 8 May 2014 16:52:19 +0200 Subject: better flow after returning from openkeychain for various actions --- .../conversations/ui/ConversationActivity.java | 66 +++++++++++++--------- .../conversations/ui/ManageAccountActivity.java | 6 +- src/eu/siacs/conversations/ui/XmppActivity.java | 6 +- 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 99af97e2..a6d1be4e 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -16,6 +16,7 @@ import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.UIHelper; +import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; @@ -63,8 +64,9 @@ public class ConversationActivity extends XmppActivity { public static final int REQUEST_SEND_MESSAGE = 0x75441; public static final int REQUEST_DECRYPT_PGP = 0x76783; - private static final int ATTACH_FILE = 0x48502; + private static final int REQUEST_ATTACH_FILE_DIALOG = 0x48502; private static final int REQUEST_SEND_PGP_IMAGE = 0x53883; + private static final int REQUEST_ATTACH_FILE = 0x73824; protected SlidingPaneLayout spl; @@ -329,7 +331,7 @@ public class ConversationActivity extends XmppActivity { attachFileIntent.setType("image/*"); attachFileIntent.setAction(Intent.ACTION_GET_CONTENT); Intent chooser = Intent.createChooser(attachFileIntent, getString(R.string.attach_file)); - startActivityForResult(chooser, ATTACH_FILE); + startActivityForResult(chooser, REQUEST_ATTACH_FILE_DIALOG); } } @@ -349,7 +351,7 @@ public class ConversationActivity extends XmppActivity { @Override public void userInputRequried(PendingIntent pi) { - ConversationActivity.this.runIntent(pi, REQUEST_SEND_PGP_IMAGE); + ConversationActivity.this.runIntent(pi, REQUEST_ATTACH_FILE); } @Override @@ -448,7 +450,7 @@ public class ConversationActivity extends XmppActivity { conversation.setNextEncryption(Message.ENCRYPTION_PGP); item.setChecked(true); } else { - announcePgp(conversation.getAccount()); + announcePgp(conversation.getAccount(),conversation); } } break; @@ -634,40 +636,50 @@ public class ConversationActivity extends XmppActivity { if (selectedFragment != null) { selectedFragment.hidePgpPassphraseBox(); } - } else if (requestCode == ATTACH_FILE) { + } else if (requestCode == REQUEST_ATTACH_FILE_DIALOG) { final Conversation conversation = getSelectedConversation(); String presence = conversation.getNextPresence(); if (conversation.getNextEncryption() == Message.ENCRYPTION_NONE) { xmppConnectionService.attachImageToConversation(conversation, presence, data.getData()); } else if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { - pendingMessage = xmppConnectionService.attachEncryptedImageToConversation(conversation, presence, data.getData(), new OnPgpEngineResult() { - - @Override - public void userInputRequried(PendingIntent pi) { - ConversationActivity.this.runIntent(pi, ConversationActivity.REQUEST_SEND_PGP_IMAGE); - } - - @Override - public void success() { - conversation.getMessages().add(pendingMessage); - pendingMessage.setStatus(Message.STATUS_OFFERED); - xmppConnectionService.databaseBackend.createMessage(pendingMessage); - xmppConnectionService.sendMessage(pendingMessage, null); - xmppConnectionService.updateUi(conversation, false); - pendingMessage = null; - } - - @Override - public void error(OpenPgpError openPgpError) { - Log.d(LOGTAG,"pgp error"+openPgpError.getMessage()); - } - }); + attachPgpFile(conversation,data.getData()); } else { Log.d(LOGTAG,"unknown next message encryption: "+conversation.getNextEncryption()); } + } else if (requestCode == REQUEST_SEND_PGP_IMAGE) { + + } else if (requestCode == REQUEST_ATTACH_FILE) { + attachFile(); + } else if (requestCode == REQUEST_ANNOUNCE_PGP) { + announcePgp(getSelectedConversation().getAccount(),getSelectedConversation()); } } } + + private void attachPgpFile(Conversation conversation, Uri uri) { + String presence = conversation.getNextPresence(); + pendingMessage = xmppConnectionService.attachEncryptedImageToConversation(conversation, presence, uri, new OnPgpEngineResult() { + + @Override + public void userInputRequried(PendingIntent pi) { + ConversationActivity.this.runIntent(pi, ConversationActivity.REQUEST_SEND_PGP_IMAGE); + } + + @Override + public void success() { + pendingMessage.getConversation().getMessages().add(pendingMessage); + xmppConnectionService.databaseBackend.createMessage(pendingMessage); + xmppConnectionService.sendMessage(pendingMessage, null); + xmppConnectionService.updateUi(pendingMessage.getConversation(), false); + pendingMessage = null; + } + + @Override + public void error(OpenPgpError openPgpError) { + Log.d(LOGTAG,"pgp error"+openPgpError.getMessage()); + } + }); + } public void updateConversationList() { conversationList.clear(); diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 8f4d9b9f..8fefa272 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -279,7 +279,7 @@ public class ManageAccountActivity extends XmppActivity { } else if (item.getItemId()==R.id.mgmt_account_announce_pgp) { if (activity.hasPgp()) { mode.finish(); - announcePgp(selectedAccountForActionMode); + announcePgp(selectedAccountForActionMode,null); } } else if (item.getItemId() == R.id.mgmt_otr_key) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); @@ -458,8 +458,8 @@ public class ManageAccountActivity extends XmppActivity { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { if (requestCode == REQUEST_ANNOUNCE_PGP) { - announcePgp(selectedAccountForActionMode); - } + announcePgp(selectedAccountForActionMode,null); + } } } } diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 70b2e24e..55dcecc9 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -6,6 +6,7 @@ import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import eu.siacs.conversations.utils.ExceptionHelper; @@ -162,7 +163,7 @@ public abstract class XmppActivity extends Activity { startActivity(viewConversationIntent); } - protected void announcePgp(final Account account) { + protected void announcePgp(final Account account, final Conversation conversation) { xmppConnectionService.getPgpEngine().generateSignature(account, "online", new OnPgpEngineResult() { @Override @@ -178,6 +179,9 @@ public abstract class XmppActivity extends Activity { public void success() { xmppConnectionService.databaseBackend.updateAccount(account); xmppConnectionService.sendPgpPresence(account, account.getPgpSignature()); + if (conversation!=null) { + conversation.setNextEncryption(Message.ENCRYPTION_PGP); + } } @Override -- cgit v1.2.3 From c555a9d03c25407be43b114d74edd6f2c1587300 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 8 May 2014 17:31:53 +0200 Subject: sending text message after returing from pending intent --- src/eu/siacs/conversations/crypto/PgpEngine.java | 97 ++++++++++------------ .../conversations/ui/ConversationActivity.java | 38 +++++++++ .../conversations/ui/ConversationFragment.java | 35 ++------ 3 files changed, 90 insertions(+), 80 deletions(-) diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java index 5a51a1e8..0e0b33d1 100644 --- a/src/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/eu/siacs/conversations/crypto/PgpEngine.java @@ -114,59 +114,18 @@ public class PgpEngine { } } - public void encrypt(Account account, final Message message, - final OnPgpEngineResult callback) { + public void encrypt(final Message message,final OnPgpEngineResult callback) { long[] keys = { message.getConversation().getContact().getPgpKeyId() }; Intent params = new Intent(); params.setAction(OpenPgpApi.ACTION_ENCRYPT); params.putExtra(OpenPgpApi.EXTRA_KEY_IDS, keys); - params.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); - params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, account.getJid()); - - InputStream is = new ByteArrayInputStream(message.getBody().getBytes()); - final OutputStream os = new ByteArrayOutputStream(); - api.executeApiAsync(params, is, os, new IOpenPgpCallback() { - - @Override - public void onReturn(Intent result) { - switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, - OpenPgpApi.RESULT_CODE_ERROR)) { - case OpenPgpApi.RESULT_CODE_SUCCESS: - StringBuilder encryptedMessageBody = new StringBuilder(); - String[] lines = os.toString().split("\n"); - for (int i = 3; i < lines.length - 1; ++i) { - encryptedMessageBody.append(lines[i].trim()); - } - message.setEncryptedBody(encryptedMessageBody.toString()); - callback.success(); - break; - case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: - callback.userInputRequried((PendingIntent) result - .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); - break; - case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); - break; - } - } - }); + params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, message.getConversation().getAccount().getJid()); - } + if (message.getType() == Message.TYPE_TEXT) { + params.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); - public void encrypt(final Message message, final OnPgpEngineResult callback) { - try { - Log.d("xmppService","calling to encrypt file"); - JingleFile inputFile = this.mXmppConnectionService.getFileBackend().getJingleFile(message, true); - JingleFile outputFile = this.mXmppConnectionService.getFileBackend().getJingleFile(message, false); - outputFile.createNewFile(); - long[] keys = { message.getConversation().getContact().getPgpKeyId() }; - Intent params = new Intent(); - params.setAction(OpenPgpApi.ACTION_ENCRYPT); - params.putExtra(OpenPgpApi.EXTRA_KEY_IDS, keys); - params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, message.getConversation().getAccount().getJid()); - InputStream is = new FileInputStream(inputFile); - OutputStream os = new FileOutputStream(outputFile); + InputStream is = new ByteArrayInputStream(message.getBody().getBytes()); + final OutputStream os = new ByteArrayOutputStream(); api.executeApiAsync(params, is, os, new IOpenPgpCallback() { @Override @@ -174,6 +133,12 @@ public class PgpEngine { switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) { case OpenPgpApi.RESULT_CODE_SUCCESS: + StringBuilder encryptedMessageBody = new StringBuilder(); + String[] lines = os.toString().split("\n"); + for (int i = 3; i < lines.length - 1; ++i) { + encryptedMessageBody.append(lines[i].trim()); + } + message.setEncryptedBody(encryptedMessageBody.toString()); callback.success(); break; case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: @@ -187,13 +152,41 @@ public class PgpEngine { } } }); - } catch (FileNotFoundException e) { - Log.d("xmppService","file not found: "+e.getMessage()); - } catch (IOException e) { - Log.d("xmppService","io exception during file encrypt"); + } else if (message.getType() == Message.TYPE_IMAGE) { + try { + JingleFile inputFile = this.mXmppConnectionService.getFileBackend().getJingleFile(message, true); + JingleFile outputFile = this.mXmppConnectionService.getFileBackend().getJingleFile(message, false); + outputFile.createNewFile(); + InputStream is = new FileInputStream(inputFile); + OutputStream os = new FileOutputStream(outputFile); + api.executeApiAsync(params, is, os, new IOpenPgpCallback() { + + @Override + public void onReturn(Intent result) { + switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, + OpenPgpApi.RESULT_CODE_ERROR)) { + case OpenPgpApi.RESULT_CODE_SUCCESS: + callback.success(); + break; + case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED: + callback.userInputRequried((PendingIntent) result + .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); + break; + case OpenPgpApi.RESULT_CODE_ERROR: + callback.error((OpenPgpError) result + .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + break; + } + } + }); + } catch (FileNotFoundException e) { + Log.d("xmppService","file not found: "+e.getMessage()); + } catch (IOException e) { + Log.d("xmppService","io exception during file encrypt"); + } } } - + public long fetchKeyId(Account account, String status, String signature) { if ((signature == null) || (api == null)) { return 0; diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index a6d1be4e..646eb3c0 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -2,6 +2,7 @@ package eu.siacs.conversations.ui; import java.io.FileNotFoundException; import java.lang.ref.WeakReference; +import java.math.BigInteger; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; @@ -67,6 +68,7 @@ public class ConversationActivity extends XmppActivity { private static final int REQUEST_ATTACH_FILE_DIALOG = 0x48502; private static final int REQUEST_SEND_PGP_IMAGE = 0x53883; private static final int REQUEST_ATTACH_FILE = 0x73824; + public static final int REQUEST_ENCRYPT_MESSAGE = 0x378018; protected SlidingPaneLayout spl; @@ -652,6 +654,10 @@ public class ConversationActivity extends XmppActivity { attachFile(); } else if (requestCode == REQUEST_ANNOUNCE_PGP) { announcePgp(getSelectedConversation().getAccount(),getSelectedConversation()); + } else if (requestCode == REQUEST_ENCRYPT_MESSAGE) { + encryptTextMessage(); + } else { + Log.d(LOGTAG,"unknown result code:"+requestCode); } } } @@ -884,4 +890,36 @@ public class ConversationActivity extends XmppActivity { return bitmapWorkerTaskReference.get(); } } + + public void encryptTextMessage() { + xmppConnectionService.getPgpEngine().encrypt(this.pendingMessage, new OnPgpEngineResult() { + + @Override + public void userInputRequried( + PendingIntent pi) { + activity.runIntent( + pi, + ConversationActivity.REQUEST_SEND_MESSAGE); + } + + @Override + public void success() { + xmppConnectionService.sendMessage(pendingMessage, null); + pendingMessage = null; + ConversationFragment selectedFragment = (ConversationFragment) getFragmentManager() + .findFragmentByTag("conversation"); + if (selectedFragment != null) { + selectedFragment.clearInputField(); + } + } + + @Override + public void error( + OpenPgpError openPgpError) { + // TODO Auto-generated method + // stub + + } + }); + } } diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index e370deb0..e06c9eeb 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -664,10 +664,10 @@ public class ConversationFragment extends Fragment { } protected void sendPgpMessage(final Message message) { + activity.pendingMessage = message; final ConversationActivity activity = (ConversationActivity) getActivity(); final XmppConnectionService xmppService = activity.xmppConnectionService; final Contact contact = message.getConversation().getContact(); - final Account account = message.getConversation().getAccount(); if (activity.hasPgp()) { if (contact.getPgpKeyId() != 0) { xmppService.getPgpEngine().hasKey(contact, @@ -677,37 +677,12 @@ public class ConversationFragment extends Fragment { public void userInputRequried(PendingIntent pi) { activity.runIntent( pi, - ConversationActivity.REQUEST_SEND_MESSAGE); + ConversationActivity.REQUEST_ENCRYPT_MESSAGE); } @Override public void success() { - xmppService.getPgpEngine().encrypt(account, - message, new OnPgpEngineResult() { - - @Override - public void userInputRequried( - PendingIntent pi) { - activity.runIntent( - pi, - ConversationActivity.REQUEST_SEND_MESSAGE); - } - - @Override - public void success() { - xmppService.sendMessage( - message, null); - chatMsg.setText(""); - } - - @Override - public void error( - OpenPgpError openPgpError) { - // TODO Auto-generated method - // stub - - } - }); + activity.encryptTextMessage(); } @Override @@ -809,4 +784,8 @@ public class ConversationFragment extends Fragment { public void setText(String text) { this.pastedText = text; } + + public void clearInputField() { + this.chatMsg.setText(""); + } } -- cgit v1.2.3 From 8a2da100d5fd673e2f5160920f15ac2fffaa8e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Thu, 8 May 2014 19:03:32 +0200 Subject: Improve OTR fingerprint dialog and fix german sentence --- res/layout/otr_fingerprint.xml | 10 +++++++++- res/values-de/strings.xml | 2 +- src/eu/siacs/conversations/ui/ManageAccountActivity.java | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/res/layout/otr_fingerprint.xml b/res/layout/otr_fingerprint.xml index 666dadcd..b9eafca4 100644 --- a/res/layout/otr_fingerprint.xml +++ b/res/layout/otr_fingerprint.xml @@ -5,12 +5,20 @@ android:orientation="vertical" android:padding="8dp"> + + + android:visibility="gone"/> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index ac33ac3b..c6209625 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -28,7 +28,7 @@ Teile mit… Klick um noch einmal zu fragen OTR Fingerabdruck - Es wurde noch kein OTR Fingerabdruck erzeugt. Beginne einfach eine verschlüsselte Unterhaltung an. + Es wurde noch kein OTR-Fingerabdruck erzeugt. Beginne einfach eine verschlüsselte Unterhaltung um einen Fingerabdruck zu erzeugen. Beginne Unterhaltung Kontakte einladen Lade zu bestehender Konferenz ein diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 8fefa272..0a1cb5cd 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -288,7 +288,10 @@ public class ManageAccountActivity extends XmppActivity { View view = (View) getLayoutInflater().inflate(R.layout.otr_fingerprint, null); if (fingerprintTxt!=null) { TextView fingerprint = (TextView) view.findViewById(R.id.otr_fingerprint); + TextView noFingerprintView = (TextView) view.findViewById(R.id.otr_no_fingerprint); fingerprint.setText(fingerprintTxt); + fingerprint.setVisibility(View.VISIBLE); + noFingerprintView.setVisibility(View.GONE); } builder.setView(view); builder.setPositiveButton("Done", null); -- cgit v1.2.3 From 536d4cca6d0441bc420b55c32e6f8838804b8c7d Mon Sep 17 00:00:00 2001 From: the-solipsist Date: Fri, 9 May 2014 01:23:13 +0200 Subject: Corrected spelling of "formerly" in README.me --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d937ded5..07b15d4e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ #Conversations -Conversations is an open source XMPP (formally known as Jabber) client for +Conversations is an open source XMPP (formerly known as Jabber) client for Android 4.0+ smart phones. [![Google Play](http://developer.android.com/images/brand/en_generic_rgb_wo_45.png)](https://play.google.com/store/apps/details?id=eu.siacs.conversations) -- cgit v1.2.3 From a14a28973ada020234c60680a51cdff2f9129de9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 9 May 2014 20:46:43 +0200 Subject: nicer descriptions in notificaton for images and encrypted messages --- res/values/strings.xml | 5 ++++- src/eu/siacs/conversations/entities/Message.java | 16 ++++++++++++++++ src/eu/siacs/conversations/ui/ConversationActivity.java | 11 ++++++++++- src/eu/siacs/conversations/ui/ConversationFragment.java | 4 +++- src/eu/siacs/conversations/utils/UIHelper.java | 8 ++++---- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 61134d29..43ef5069 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -53,7 +53,7 @@ unsuccessful delivery rejected Receiving image file. Please wait… - Preparing image for transmission. Please wait… + Preparing image for transmission Clear history Clear Conversation History Do you want to delete all messages within this Conversation?\n\nWarning: This will not influence messages stored on other devices or servers. @@ -86,4 +86,7 @@ offering… No openPGP Key found Conversations is unable to encrypt your messages because your contact is not announcing his or hers public key.\n\nPlease ask your contact to setup openPGP. + Encrypted message received. Touch to view and decrypt. + Encrypted image received. Touch to view and decrypt. + Image received. Touch to view diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index a17d552f..33f7a8d4 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -1,7 +1,9 @@ package eu.siacs.conversations.entities; +import eu.siacs.conversations.R; import eu.siacs.conversations.xmpp.jingle.JingleConnection; import android.content.ContentValues; +import android.content.Context; import android.database.Cursor; public class Message extends AbstractEntity { @@ -103,6 +105,20 @@ public class Message extends AbstractEntity { public String getBody() { return body; } + + public String getReadableBody(Context context) { + if ((encryption == ENCRYPTION_PGP)&&(type == TYPE_TEXT)) { + return ""+context.getText(R.string.encrypted_message_received); + } else if ((encryption == ENCRYPTION_OTR)&&(type == TYPE_IMAGE)) { + return ""+context.getText(R.string.encrypted_image_received); + } else if (encryption == ENCRYPTION_DECRYPTION_FAILED) { + return ""+context.getText(R.string.decryption_failed); + } else if (type == TYPE_IMAGE) { + return ""+context.getText(R.string.image_file); + } else { + return body.trim(); + } + } public long getTimeSent() { return timeSent; diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 646eb3c0..d3e3737f 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -55,6 +55,7 @@ import android.widget.PopupMenu; import android.widget.PopupMenu.OnMenuItemClickListener; import android.widget.TextView; import android.widget.ImageView; +import android.widget.Toast; public class ConversationActivity extends XmppActivity { @@ -112,6 +113,7 @@ public class ConversationActivity extends XmppActivity { protected ConversationActivity activity = this; private DisplayMetrics metrics; + private Toast prepareImageToast; public List getConversationList() { return this.conversationList; @@ -178,7 +180,11 @@ public class ConversationActivity extends XmppActivity { Message latestMessage = conv.getLatestMessage(); if (latestMessage.getType() == Message.TYPE_TEXT) { - convLastMsg.setText(conv.getLatestMessage().getBody()); + if ((latestMessage.getEncryption() != Message.ENCRYPTION_PGP)&&(latestMessage.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED)) { + convLastMsg.setText(conv.getLatestMessage().getBody()); + } else { + convLastMsg.setText(getText(R.string.encrypted_message_received)); + } convLastMsg.setVisibility(View.VISIBLE); imagePreview.setVisibility(View.GONE); } else if (latestMessage.getType() == Message.TYPE_IMAGE) { @@ -639,11 +645,14 @@ public class ConversationActivity extends XmppActivity { selectedFragment.hidePgpPassphraseBox(); } } else if (requestCode == REQUEST_ATTACH_FILE_DIALOG) { + prepareImageToast = Toast.makeText(getApplicationContext(), getText(R.string.preparing_image), Toast.LENGTH_LONG); final Conversation conversation = getSelectedConversation(); String presence = conversation.getNextPresence(); if (conversation.getNextEncryption() == Message.ENCRYPTION_NONE) { + prepareImageToast.show(); xmppConnectionService.attachImageToConversation(conversation, presence, data.getData()); } else if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { + prepareImageToast.show(); attachPgpFile(conversation,data.getData()); } else { Log.d(LOGTAG,"unknown next message encryption: "+conversation.getNextEncryption()); diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index e06c9eeb..6850ac54 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -492,7 +492,9 @@ public class ConversationFragment extends Fragment { @Override public void onStop() { super.onStop(); - this.conversation.setNextMessage(chatMsg.getText().toString()); + if (this.conversation!=null) { + this.conversation.setNextMessage(chatMsg.getText().toString()); + } } public void onBackendConnected() { diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 1c52ff0b..8baa3c25 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -389,7 +389,7 @@ public class UIHelper { context, true)); mBuilder.setContentTitle(conversation.getName(useSubject)); if (notify) { - mBuilder.setTicker(conversation.getLatestMessage().getBody().trim()); + mBuilder.setTicker(conversation.getLatestMessage().getReadableBody(context)); } StringBuilder bigText = new StringBuilder(); List messages = conversation.getMessages(); @@ -397,10 +397,10 @@ public class UIHelper { for (int i = messages.size() - 1; i >= 0; --i) { if (!messages.get(i).isRead()) { if (i == messages.size() - 1) { - firstLine = messages.get(i).getBody().trim(); + firstLine = messages.get(i).getReadableBody(context); bigText.append(firstLine); } else { - firstLine = messages.get(i).getBody().trim(); + firstLine = messages.get(i).getReadableBody(context); bigText.insert(0, firstLine + "\n"); } } else { @@ -422,7 +422,7 @@ public class UIHelper { names.append(unread.get(i).getName(useSubject)); } style.addLine(Html.fromHtml("" + unread.get(i).getName(useSubject) - + " " + unread.get(i).getLatestMessage().getBody().trim())); + + " " + unread.get(i).getLatestMessage().getReadableBody(context))); } mBuilder.setContentTitle(unread.size() + " unread Conversations"); mBuilder.setContentText(names.toString()); -- cgit v1.2.3 From 3b8446e6d519d09d6e116faf661470d2e95abfb3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 9 May 2014 20:47:03 +0200 Subject: link to openkeychain from contact details --- src/eu/siacs/conversations/crypto/PgpEngine.java | 13 +++++++--- .../conversations/ui/ContactDetailsActivity.java | 29 +++++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java index 0e0b33d1..229b4300 100644 --- a/src/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/eu/siacs/conversations/crypto/PgpEngine.java @@ -274,9 +274,7 @@ public class PgpEngine { params.setAction(OpenPgpApi.ACTION_GET_KEY); params.putExtra(OpenPgpApi.EXTRA_KEY_ID, contact.getPgpKeyId()); params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, contact.getAccount().getJid()); - InputStream is = new ByteArrayInputStream(new byte[0]); - OutputStream os = new ByteArrayOutputStream(); - api.executeApiAsync(params, is, os, new IOpenPgpCallback() { + api.executeApiAsync(params, null, null, new IOpenPgpCallback() { @Override public void onReturn(Intent result) { @@ -296,4 +294,13 @@ public class PgpEngine { } }); } + + public PendingIntent getIntentForKey(Contact contact) { + Intent params = new Intent(); + params.setAction(OpenPgpApi.ACTION_GET_KEY); + params.putExtra(OpenPgpApi.EXTRA_KEY_ID, contact.getPgpKeyId()); + params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, contact.getAccount().getJid()); + Intent result = api.executeApi(params, null, null); + return (PendingIntent) result.getParcelableExtra(OpenPgpApi.RESULT_INTENT); + } } diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index 1ed3fa13..eaa9b8ee 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -4,10 +4,14 @@ import java.math.BigInteger; import java.util.Iterator; import java.util.Locale; +import org.openintents.openpgp.util.OpenPgpUtils; + import android.app.AlertDialog; +import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.content.IntentSender.SendIntentException; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract.CommonDataKinds; @@ -26,6 +30,7 @@ import android.widget.QuickContactBadge; import android.widget.TextView; import android.widget.Toast; import eu.siacs.conversations.R; +import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Presences; import eu.siacs.conversations.utils.UIHelper; @@ -252,17 +257,29 @@ public class ContactDetailsActivity extends XmppActivity { key.setText(otrFingerprint); keys.addView(view); } - Log.d("gultsch", "pgp key id " + contact.getPgpKeyId()); if (contact.getPgpKeyId() != 0) { View view = (View) inflater.inflate(R.layout.contact_key, null); TextView key = (TextView) view.findViewById(R.id.key); TextView keyType = (TextView) view.findViewById(R.id.key_type); keyType.setText("PGP Key ID"); - BigInteger bi = new BigInteger("" + contact.getPgpKeyId()); - StringBuilder builder = new StringBuilder(bi.toString(16) - .toUpperCase(Locale.US)); - builder.insert(8, " "); - key.setText(builder.toString()); + key.setText(OpenPgpUtils.convertKeyIdToHex(contact.getPgpKeyId())); + view.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + PgpEngine pgp = activity.xmppConnectionService.getPgpEngine(); + if (pgp!=null) { + PendingIntent intent = pgp.getIntentForKey(contact); + if (intent!=null) { + try { + startIntentSenderForResult(intent.getIntentSender(), 0, null, 0, 0, 0); + } catch (SendIntentException e) { + + } + } + } + } + }); keys.addView(view); } } -- cgit v1.2.3 From b6fa18a5952d4eb9c1764165ffa4091e7c57aa32 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 9 May 2014 20:56:51 +0200 Subject: version 0.2 alpha and changelog --- AndroidManifest.xml | 4 ++-- CHANGELOG.md | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index c7f564bc..ce0bd52f 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="10" + android:versionName="0.2-alpha" > Date: Fri, 9 May 2014 21:20:34 +0200 Subject: added dialog for otr file transfer --- res/menu/conversations.xml | 4 ++-- res/values/strings.xml | 3 +++ .../conversations/ui/ConversationActivity.java | 26 +++++++++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/res/menu/conversations.xml b/res/menu/conversations.xml index 58fd3bfa..68bcc957 100644 --- a/res/menu/conversations.xml +++ b/res/menu/conversations.xml @@ -4,13 +4,13 @@ android:id="@+id/action_add" android:orderInCategory="10" android:icon="@drawable/ic_action_add" - android:showAsAction="always" + android:showAsAction="ifRoom" android:title="@string/action_add" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index 43ef5069..5c844964 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -89,4 +89,7 @@ Encrypted message received. Touch to view and decrypt. Encrypted image received. Touch to view and decrypt. Image received. Touch to view + OTR encryption not available + Unfortunaly OTR encryption is not available for file transfer. You can choose either openPGP or no encryption. + Use openPGP encryption diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index d3e3737f..234730fc 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -2,7 +2,6 @@ package eu.siacs.conversations.ui; import java.io.FileNotFoundException; import java.lang.ref.WeakReference; -import java.math.BigInteger; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; @@ -390,6 +389,31 @@ public class ConversationActivity extends XmppActivity { } } else if (getSelectedConversation().getNextEncryption() == Message.ENCRYPTION_NONE) { attachFileDialog(); + } else { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(getString(R.string.otr_file_transfer)); + builder.setMessage(getString(R.string.otr_file_transfer_msg)); + builder.setNegativeButton(getString(R.string.cancel), null); + if (conversation.getContact().getPgpKeyId()==0) { + builder.setPositiveButton(getString(R.string.send_unencrypted), new OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + conversation.setNextEncryption(Message.ENCRYPTION_NONE); + attachFile(); + } + }); + } else { + builder.setPositiveButton(getString(R.string.use_pgp_encryption), new OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + conversation.setNextEncryption(Message.ENCRYPTION_PGP); + attachFile(); + } + }); + } + builder.create().show(); } } -- cgit v1.2.3 From 38d3da6c2b81c3adc1b75b24499ae356ce5f3b4f Mon Sep 17 00:00:00 2001 From: kruks23 Date: Tue, 6 May 2014 20:34:51 +0200 Subject: #79 First translation into spanish. --- res/values-es/styles.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 res/values-es/styles.xml diff --git a/res/values-es/styles.xml b/res/values-es/styles.xml new file mode 100644 index 00000000..1468283e --- /dev/null +++ b/res/values-es/styles.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 8632954e61c11bfa32cc192f0dcd4d3b2a72c7f0 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 10 May 2014 11:03:32 +0200 Subject: fixed possible npe and possible exception --- src/eu/siacs/conversations/ui/ConversationFragment.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 6850ac54..06bbc3a5 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -198,8 +198,12 @@ public class ConversationFragment extends Fragment { boolean error = false; if (message.getType() == Message.TYPE_IMAGE) { String[] fileParams = message.getBody().split(","); - long size = Long.parseLong(fileParams[0]); - filesize = size / 1024 + " KB"; + try { + long size = Long.parseLong(fileParams[0]); + filesize = size / 1024 + " KB"; + } catch (NumberFormatException e) { + filesize = "0 KB"; + } } switch (message.getStatus()) { case Message.STATUS_UNSEND: @@ -585,6 +589,9 @@ public class ConversationFragment extends Fragment { } public void updateMessages() { + if (getView()==null) { + return; + } ConversationActivity activity = (ConversationActivity) getActivity(); if (this.conversation != null) { for (Message message : this.conversation.getMessages()) { -- cgit v1.2.3 From 3d913c2e0eeb81dc59a7e49229d660b124cee600 Mon Sep 17 00:00:00 2001 From: kruks23 Date: Sat, 10 May 2014 11:23:04 +0200 Subject: Translation into spanish. --- res/values-es/strings.xml | 75 ++++++++++++++++++++++++++--------------------- res/values-es/styles.xml | 19 ------------ 2 files changed, 42 insertions(+), 52 deletions(-) delete mode 100644 res/values-es/styles.xml diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 021247fa..2c569187 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -2,10 +2,10 @@ Conversations - Configuración + Ajustes Nueva conversación Gestionar cuentas - Terminar esta conversación + Terminar conversación Detalles del contacto Detalles de la conferencia Conversación segura @@ -21,66 +21,75 @@ Participante Visitante Introduce un nuevo nombre: - Quieres eliminar a %s de tu lista. La conversación asociada a esta cuenta no se eliminará. - El servidor %s te presentó con un certificado no confiable, posiblemente auto firmado. - Info del servidor - Registrar nueva cuenta en el servidor + ¿Quieres eliminar a %s de tu lista?. La conversación asociada a esta cuenta no se eliminará. + El servidor %s presenta un certificado no confiable, posiblemente auto firmado. + Información del servidor + Registrar nueva cuenta en servidor Compartir con Pulsa para preguntar otra vez Huella dactilar OTR - No se ha generado una huella dactilar OTR Fingerprint. Simplemente continúa y comienza una conversación encriptada + No se ha generado una huella dactilar OTR. Simplemente continúa y comienza una conversación encriptada Comenzar conversación Invitar contactos Invitar a conferencia existente Crear nueva conferencia Cancelar Crear \u0026 Invitar - ¿Quieres crear una nueva conferencia con una dirección generada aleatoriamente e invitar a los contactos seleccionados a ella? + ¿Quieres crear una nueva conferencia con una dirección generada aleatoriamente e invitar a los contactos seleccionados a ella? No hay conferencias existentes Invitación enviada - Cuenta fuera de línea - Tienes que estar en línea para invitar a gente a las conferencias + Cuenta desconectada + Debes estar conectado para invitar a contactos a la conferencia Conversations se ha detenido. - Enviando volcados de pilas ayudas al continuo desarrollo de Conversations\nAviso: Esto usará tu cuenta XMPP para enviar el volcado de pila al desarrollador. + Enviando volcados de pilas ayudas al desarrollo de Conversations\nAviso: Esto usará tu cuenta XMPP para enviar el volcado de pila al desarrollador. Enviar ahora No preguntar de nuevo No se ha podido conectar a la cuenta No se ha podido conectar a múltiples cuentas - Toca aquí para gestionar tus cuentas - Adjuntar archivo + Pulsa aquí para gestionar tus cuentas + Enviar archivo El contacto no está en tu lista. ¿Quieres añadirlo? Añadir contacto - entrega infructuosa + Error al enviar rechazado Recibiendo archivo de imagen. Espera por favor… - Preparando imagen para transmisión. Espera por favor… - Limpiar historia - Limpiar historia de conversación - ¿Quieres borrar todos los mensajes de esta conversación?\n\nAviso: Esto no tendrá influencia en los mensajes guardados en otros dispositivos o servidores. + Preparando imagen para enviar + Limpiar historial + Limpiar historial de conversación + ¿Quieres borrar todos los mensajes de esta conversación?\n\nAviso: Esto no afectará a los mensajes guardados en otros dispositivos o servidores. Borrar mensajes Terminar esta conversación más tarde - Elegir presencia para contacto + Selecciona recurso del contacto Enviar mensaje a conferencia - Enviar mensaje en texto plano + Enviar mensaje de texto Enviar mensaje encriptado con OTR Enviar mensaje encriptado con openPGP - Tu apodo se ha cambiado + Tu apodo se ha modificado Descargar imagen Error cargando imagen (Archivo no encontrado) - Archivo de imagen ofrecida para descarga + Archivo de imagen ofrecido para descarga No conectado - Tienes que estar en línea para enviar %s pero tu cuenta asociada a esta conversación está fuera de línea. - No puede ejecutar esta acción estando fuera de línea + Debes estar conectado para enviar %s pero tu cuenta asociada a esta conversación está desconectada. + No puedes ejecutar esta acción estando desconectado archivos Mensajes encriptados con OTR Gestionar cuenta - Tu contacto está fuera de línea - Desgraciadamente no es posible enviar mensajes encriptados con OTR a un contacto fuera de línea.\n¿Quieres enviar el mensaje en texto plano? - Desgraciadamente no es posible enviar archivos a un contacto fuera de línea. + Tu contacto está desconectado + Desgraciadamente no es posible enviar mensajes encriptados con OTR a un contacto desconectado.\n¿Quieres enviar el mensaje en texto plano? + Desgraciadamente no es posible enviar archivos a un contacto desconectado. Enviar sin encriptar - Falló la desencriptación. Tal vez no tengas la clave privada apropiada. - OpenKeychain - Conversations utiliza una tercera app llamada OpenKeychain para encriptar y desencriptar mensajes y para gestionar tus claves publicas.\n\nOpenKeychain está licenciado bajo GPLv3 y disponible en F-Droid y Google Play.\n\n(Por favor reinicia Conversations después) - Reiniciar - Instalar - + Falló la desencriptación. Tal vez no tengas la clave privada apropiada. + OpenKeychain + Conversations utiliza una aplicación de terceros llamada OpenKeychain para encriptar y desencriptar mensajes y gestionar tus claves públicas.\n\nOpenKeychain está publicado bajo licencia GPLv3 y disponible on F-Droid y Google Play.\n\n(Por favor, reinicie Conversations después.) + Reiniciar + Instalar + ofreciendo… + Clave openPGP no encontrada + Conversations no ha podido encriptar tus mensajes porque tu contacto no está anunciando su clave publica.\n\nPor favor, pide a tu contacto que configure openPGP. + Mensaje encriptado recibido. Pulsa para desencriptar y ver. + Imagen encriptada recibida. Pulsa para desencriptar y ver. + Imagen recibida. Pulsa para ver + Encriptación con OTR no disponible + Desafortunadamente la encriptación con OTR no está disponible para transferencia de archivos. Puedes selecionar encriptación con openPGP o no usar encriptación. + Usa encriptación con openPGP + \ No newline at end of file diff --git a/res/values-es/styles.xml b/res/values-es/styles.xml deleted file mode 100644 index 1468283e..00000000 --- a/res/values-es/styles.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file -- cgit v1.2.3 From fcc021aa94cab219e3f7a5a09d58191482dc9627 Mon Sep 17 00:00:00 2001 From: kruks23 Date: Sat, 10 May 2014 11:26:53 +0200 Subject: Delete styles.xml --- res/values-es/styles.xml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 res/values-es/styles.xml diff --git a/res/values-es/styles.xml b/res/values-es/styles.xml deleted file mode 100644 index 1468283e..00000000 --- a/res/values-es/styles.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file -- cgit v1.2.3 From 4d0bf7971ec321a55f180b833b033ceaa6635fdf Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 11 May 2014 13:55:15 +0200 Subject: transfered preferences descritpions into strings.xml --- res/values/strings.xml | 23 +++++++++++++++++++++++ res/xml/preferences.xml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 45 insertions(+), 22 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 5c844964..abae1053 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -92,4 +92,27 @@ OTR encryption not available Unfortunaly OTR encryption is not available for file transfer. You can choose either openPGP or no encryption. Use openPGP encryption + XMPP resource + The name this client identifies itself with + Accept files + Automatically accept files smaller than… + Notification Settings + Notifications + Notify when a new message arrives + Vibrate + Also vibrate when a new message arrives + Sound + Play ringtone with notification + Conference notifications + Always notify when a new conference message arrives instead of only when highlighted + Notification grace period + Disable notifications for a short time after a carbon copy was received + UI Options + Use Phones self contact picture + You may no longer be able to distinguish which account you are using in a conversation + Conference name + Use room’s subject to identify Conferences + Advanced Options + Never send crash reports + By sending in stack traces you are helping the ongoing development of Conversations diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 6268350a..b1b560c6 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -10,69 +10,69 @@ /> + android:title="@string/pref_notification_settings"> + android:title="@string/pref_conference_notifications" + android:summary="@string/pref_conference_notifications_summary"/> + android:title="@string/pref_ui_options"> -- cgit v1.2.3 From 3455d10a4a87916bfe5da52ca9c401dafa8d5155 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 12 May 2014 14:59:46 +0200 Subject: Better error handling if attach file doesnt work (on permission denied) and unified encrypted and unencrypted file attachment --- res/values/strings.xml | 5 ++ .../conversations/crypto/OnPgpEngineResult.java | 11 ----- src/eu/siacs/conversations/crypto/PgpEngine.java | 33 ++++++------- .../conversations/persistance/FileBackend.java | 12 ++--- .../services/XmppConnectionService.java | 48 ++++++++----------- .../conversations/ui/ConversationActivity.java | 54 ++++++++++++++-------- .../conversations/ui/ConversationFragment.java | 15 ++---- .../conversations/ui/ManageAccountActivity.java | 1 - src/eu/siacs/conversations/ui/UiCallback.java | 9 ++++ src/eu/siacs/conversations/ui/XmppActivity.java | 26 ++++++++--- 10 files changed, 112 insertions(+), 102 deletions(-) delete mode 100644 src/eu/siacs/conversations/crypto/OnPgpEngineResult.java create mode 100644 src/eu/siacs/conversations/ui/UiCallback.java diff --git a/res/values/strings.xml b/res/values/strings.xml index abae1053..8020a01e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -115,4 +115,9 @@ Advanced Options Never send crash reports By sending in stack traces you are helping the ongoing development of Conversations + OpenKeychain reporeted an error + I/O Error decrypting file + Error copying image file. + Accept + An error has occurred diff --git a/src/eu/siacs/conversations/crypto/OnPgpEngineResult.java b/src/eu/siacs/conversations/crypto/OnPgpEngineResult.java deleted file mode 100644 index 8e115839..00000000 --- a/src/eu/siacs/conversations/crypto/OnPgpEngineResult.java +++ /dev/null @@ -1,11 +0,0 @@ -package eu.siacs.conversations.crypto; - -import org.openintents.openpgp.OpenPgpError; - -import android.app.PendingIntent; - -public interface OnPgpEngineResult { - public void success(); - public void error(OpenPgpError openPgpError); - public void userInputRequried(PendingIntent pi); -} diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java index 229b4300..48750e24 100644 --- a/src/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/eu/siacs/conversations/crypto/PgpEngine.java @@ -14,12 +14,13 @@ import org.openintents.openpgp.OpenPgpSignatureResult; import org.openintents.openpgp.util.OpenPgpApi; import org.openintents.openpgp.util.OpenPgpApi.IOpenPgpCallback; +import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.ui.UiCallback; import eu.siacs.conversations.xmpp.jingle.JingleFile; - import android.app.PendingIntent; import android.content.Intent; import android.graphics.BitmapFactory; @@ -34,7 +35,7 @@ public class PgpEngine { this.mXmppConnectionService = service; } - public void decrypt(final Message message, final OnPgpEngineResult callback) { + public void decrypt(final Message message, final UiCallback callback) { Log.d("xmppService","decrypting message "+message.getUuid()); Intent params = new Intent(); params.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY); @@ -59,8 +60,7 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); return; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); return; default: return; @@ -97,8 +97,7 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); return; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); return; default: return; @@ -106,15 +105,15 @@ public class PgpEngine { } }); } catch (FileNotFoundException e) { - callback.error(new OpenPgpError(0, "file not found: "+e.getMessage())); + callback.error(R.string.error_decrypting_file); } catch (IOException e) { - callback.error(new OpenPgpError(0, "io exception: "+e.getMessage())); + callback.error(R.string.error_decrypting_file); } } } - public void encrypt(final Message message,final OnPgpEngineResult callback) { + public void encrypt(final Message message,final UiCallback callback) { long[] keys = { message.getConversation().getContact().getPgpKeyId() }; Intent params = new Intent(); params.setAction(OpenPgpApi.ACTION_ENCRYPT); @@ -146,8 +145,7 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); break; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); break; } } @@ -173,8 +171,7 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); break; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); break; } } @@ -235,7 +232,7 @@ public class PgpEngine { } public void generateSignature(final Account account, String status, - final OnPgpEngineResult callback) { + final UiCallback callback) { Intent params = new Intent(); params.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); params.setAction(OpenPgpApi.ACTION_SIGN); @@ -261,15 +258,14 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); return; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); return; } } }); } - public void hasKey(Contact contact, final OnPgpEngineResult callback) { + public void hasKey(Contact contact, final UiCallback callback) { Intent params = new Intent(); params.setAction(OpenPgpApi.ACTION_GET_KEY); params.putExtra(OpenPgpApi.EXTRA_KEY_ID, contact.getPgpKeyId()); @@ -287,8 +283,7 @@ public class PgpEngine { .getParcelableExtra(OpenPgpApi.RESULT_INTENT)); return; case OpenPgpApi.RESULT_CODE_ERROR: - callback.error((OpenPgpError) result - .getParcelableExtra(OpenPgpApi.RESULT_ERROR)); + callback.error(R.string.openpgp_error); return; } } diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index 868e2398..becb1ee3 100644 --- a/src/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/eu/siacs/conversations/persistance/FileBackend.java @@ -102,7 +102,7 @@ public class FileBackend { boolean success = scalledBitmap.compress( Bitmap.CompressFormat.WEBP, 75, os); if (!success) { - // Log.d("xmppService", "couldnt compress"); + return null; } os.flush(); os.close(); @@ -112,14 +112,12 @@ public class FileBackend { message.setBody(""+size+","+width+","+height); return file; } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + return null; } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + return null; + } catch (SecurityException e) { + return null; } - - return null; } public Bitmap getImageFromMessage(Message message) { diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 3581d189..d2742997 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -17,8 +17,7 @@ import org.openintents.openpgp.util.OpenPgpServiceConnection; import net.java.otr4j.OtrException; import net.java.otr4j.session.Session; import net.java.otr4j.session.SessionStatus; - -import eu.siacs.conversations.crypto.OnPgpEngineResult; +import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; @@ -33,6 +32,7 @@ import eu.siacs.conversations.persistance.OnPhoneContactsMerged; import eu.siacs.conversations.ui.OnAccountListChangedListener; import eu.siacs.conversations.ui.OnConversationListChangedListener; import eu.siacs.conversations.ui.OnRosterFetchedListener; +import eu.siacs.conversations.ui.UiCallback; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.utils.MessageParser; import eu.siacs.conversations.utils.OnPhoneContactsLoadedListener; @@ -446,45 +446,35 @@ public class XmppConnectionService extends Service { return this.fileBackend; } - public Message attachImageToConversation(final Conversation conversation, - final String presence, final Uri uri) { - final Message message = new Message(conversation, "",Message.ENCRYPTION_NONE); - message.setPresence(presence); + public Message attachImageToConversation(final Conversation conversation, final Uri uri, final UiCallback callback) { + final Message message; + if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { + message = new Message(conversation, "",Message.ENCRYPTION_DECRYPTED); + } else { + message = new Message(conversation, "", Message.ENCRYPTION_NONE); + } + message.setPresence(conversation.getNextPresence()); message.setType(Message.TYPE_IMAGE); message.setStatus(Message.STATUS_OFFERED); new Thread(new Runnable() { @Override public void run() { - getFileBackend().copyImageToPrivateStorage(message, uri); - databaseBackend.createMessage(message); - conversation.getMessages().add(message); - if (convChangedListener != null) { - convChangedListener.onConversationListChanged(); + JingleFile file = getFileBackend().copyImageToPrivateStorage(message, uri); + if (file==null) { + callback.error(R.string.error_copying_image_file); + } else { + if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { + getPgpEngine().encrypt(message, callback); + } else { + callback.success(); + } } - sendMessage(message, null); } }).start(); return message; } - public Message attachEncryptedImageToConversation(final Conversation conversation, final String presence, final Uri uri, final OnPgpEngineResult callback) { - Log.d(LOGTAG,"attach encrypted image"); - final Message message = new Message(conversation, "",Message.ENCRYPTION_DECRYPTED); - message.setPresence(presence); - message.setType(Message.TYPE_IMAGE); - message.setStatus(Message.STATUS_OFFERED); - new Thread(new Runnable() { - - @Override - public void run() { - getFileBackend().copyImageToPrivateStorage(message, uri); - getPgpEngine().encrypt(message, callback); - } - }).start(); - return message; - } - protected Conversation findMuc(String name, Account account) { for (Conversation conversation : this.conversations) { if (conversation.getContactJid().split("/")[0].equals(name) diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 234730fc..88728245 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -9,7 +9,6 @@ import java.util.List; import org.openintents.openpgp.OpenPgpError; import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; @@ -354,7 +353,7 @@ public class ConversationActivity extends XmppActivity { if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { if (hasPgp()) { if (conversation.getContact().getPgpKeyId()!=0) { - xmppConnectionService.getPgpEngine().hasKey(conversation.getContact(), new OnPgpEngineResult() { + xmppConnectionService.getPgpEngine().hasKey(conversation.getContact(), new UiCallback() { @Override public void userInputRequried(PendingIntent pi) { @@ -367,7 +366,7 @@ public class ConversationActivity extends XmppActivity { } @Override - public void error(OpenPgpError openPgpError) { + public void error(int error) { // TODO Auto-generated method stub } @@ -671,10 +670,26 @@ public class ConversationActivity extends XmppActivity { } else if (requestCode == REQUEST_ATTACH_FILE_DIALOG) { prepareImageToast = Toast.makeText(getApplicationContext(), getText(R.string.preparing_image), Toast.LENGTH_LONG); final Conversation conversation = getSelectedConversation(); - String presence = conversation.getNextPresence(); if (conversation.getNextEncryption() == Message.ENCRYPTION_NONE) { prepareImageToast.show(); - xmppConnectionService.attachImageToConversation(conversation, presence, data.getData()); + this.pendingMessage = xmppConnectionService.attachImageToConversation(conversation, data.getData(),new UiCallback() { + + @Override + public void userInputRequried(PendingIntent pi) { + + } + + @Override + public void success() { + sendPendingImageMessage(); + } + + @Override + public void error(int error) { + pendingMessage = null; + displayErrorDialog(error); + } + }); } else if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) { prepareImageToast.show(); attachPgpFile(conversation,data.getData()); @@ -696,8 +711,7 @@ public class ConversationActivity extends XmppActivity { } private void attachPgpFile(Conversation conversation, Uri uri) { - String presence = conversation.getNextPresence(); - pendingMessage = xmppConnectionService.attachEncryptedImageToConversation(conversation, presence, uri, new OnPgpEngineResult() { + pendingMessage = xmppConnectionService.attachImageToConversation(conversation, uri, new UiCallback() { @Override public void userInputRequried(PendingIntent pi) { @@ -706,20 +720,25 @@ public class ConversationActivity extends XmppActivity { @Override public void success() { - pendingMessage.getConversation().getMessages().add(pendingMessage); - xmppConnectionService.databaseBackend.createMessage(pendingMessage); - xmppConnectionService.sendMessage(pendingMessage, null); - xmppConnectionService.updateUi(pendingMessage.getConversation(), false); - pendingMessage = null; + sendPendingImageMessage(); } @Override - public void error(OpenPgpError openPgpError) { - Log.d(LOGTAG,"pgp error"+openPgpError.getMessage()); + public void error(int error) { + pendingMessage = null; + displayErrorDialog(error); } }); } + private void sendPendingImageMessage() { + pendingMessage.getConversation().getMessages().add(pendingMessage); + xmppConnectionService.databaseBackend.createMessage(pendingMessage); + xmppConnectionService.sendMessage(pendingMessage, null); + xmppConnectionService.updateUi(pendingMessage.getConversation(), false); + pendingMessage = null; + } + public void updateConversationList() { conversationList.clear(); conversationList.addAll(xmppConnectionService.getConversations()); @@ -925,7 +944,7 @@ public class ConversationActivity extends XmppActivity { } public void encryptTextMessage() { - xmppConnectionService.getPgpEngine().encrypt(this.pendingMessage, new OnPgpEngineResult() { + xmppConnectionService.getPgpEngine().encrypt(this.pendingMessage, new UiCallback() { @Override public void userInputRequried( @@ -947,10 +966,7 @@ public class ConversationActivity extends XmppActivity { } @Override - public void error( - OpenPgpError openPgpError) { - // TODO Auto-generated method - // stub + public void error(int error) { } }); diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 06bbc3a5..91a39ecc 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -8,9 +8,7 @@ import java.util.Set; import org.openintents.openpgp.OpenPgpError; import net.java.otr4j.session.SessionStatus; - import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; @@ -560,7 +558,7 @@ public class ConversationFragment extends Fragment { private void decryptMessage(final Message message) { PgpEngine engine = activity.xmppConnectionService.getPgpEngine(); if (engine != null) { - engine.decrypt(message, new OnPgpEngineResult() { + engine.decrypt(message, new UiCallback() { @Override public void userInputRequried(PendingIntent pi) { @@ -576,9 +574,7 @@ public class ConversationFragment extends Fragment { } @Override - public void error(OpenPgpError openPgpError) { - Log.d("xmppService", - "decryption error" + openPgpError.getMessage()); + public void error(int error) { message.setEncryption(Message.ENCRYPTION_DECRYPTION_FAILED); // updateMessages(); } @@ -680,7 +676,7 @@ public class ConversationFragment extends Fragment { if (activity.hasPgp()) { if (contact.getPgpKeyId() != 0) { xmppService.getPgpEngine().hasKey(contact, - new OnPgpEngineResult() { + new UiCallback() { @Override public void userInputRequried(PendingIntent pi) { @@ -695,9 +691,8 @@ public class ConversationFragment extends Fragment { } @Override - public void error(OpenPgpError openPgpError) { - Log.d("xmppService", "openpgp error" - + openPgpError.getMessage()); + public void error(int error) { + } }); diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 0a1cb5cd..0b7dac58 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -6,7 +6,6 @@ import java.util.List; import org.openintents.openpgp.OpenPgpError; import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.crypto.PgpEngine; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.ui.EditAccount.EditAccountListener; diff --git a/src/eu/siacs/conversations/ui/UiCallback.java b/src/eu/siacs/conversations/ui/UiCallback.java new file mode 100644 index 00000000..f9273b96 --- /dev/null +++ b/src/eu/siacs/conversations/ui/UiCallback.java @@ -0,0 +1,9 @@ +package eu.siacs.conversations.ui; + +import android.app.PendingIntent; + +public interface UiCallback { + public void success(); + public void error(int errorCode); + public void userInputRequried(PendingIntent pi); +} diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 55dcecc9..dc894ad5 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -1,9 +1,8 @@ package eu.siacs.conversations.ui; -import org.openintents.openpgp.OpenPgpError; +import java.nio.channels.AlreadyConnectedException; import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; @@ -164,7 +163,7 @@ public abstract class XmppActivity extends Activity { } protected void announcePgp(final Account account, final Conversation conversation) { - xmppConnectionService.getPgpEngine().generateSignature(account, "online", new OnPgpEngineResult() { + xmppConnectionService.getPgpEngine().generateSignature(account, "online", new UiCallback() { @Override public void userInputRequried(PendingIntent pi) { @@ -185,10 +184,25 @@ public abstract class XmppActivity extends Activity { } @Override - public void error(OpenPgpError openPgpError) { - // TODO Auto-generated method stub - + public void error(int error) { + displayErrorDialog(error); + } + }); + } + + protected void displayErrorDialog(final int errorCode) { + runOnUiThread(new Runnable() { + + @Override + public void run() { + AlertDialog.Builder builder = new AlertDialog.Builder(XmppActivity.this); + builder.setIconAttribute(android.R.attr.alertDialogIcon); + builder.setTitle(getString(R.string.error)); + builder.setMessage(errorCode); + builder.setNeutralButton(R.string.accept, null); + builder.create().show(); } }); + } } -- cgit v1.2.3 From 2fe9bbecdb33dbdfaf4679569d11806c4d082b80 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 12 May 2014 15:05:32 +0200 Subject: added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbb9576e..ecfd13f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Image file transfer * Better integration with OpenKeychain (PGP encryption) * Nicer conversation tiles for conferences +* Ability to clear conversation history * A lot of bug fixes and code clean up ####Version 0.1.3 -- cgit v1.2.3 From 4be8280beb9c61e4a11b67b61617455dbe52b466 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 12 May 2014 15:40:03 +0200 Subject: marked version 0.2 - skipping beta --- AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ce0bd52f..8c90d092 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="0.2" >