diff --git a/res/layout/message_compose.xml b/res/layout/message_compose.xml index 3cda691c3..6d3237fc8 100644 --- a/res/layout/message_compose.xml +++ b/res/layout/message_compose.xml @@ -84,6 +84,7 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:gravity="left|top" android:minLines="3" + android:hint="@string/message_compose_body_hint" android:inputType="textMultiLine|textAutoCorrect|textCapSentences" /> + android:fadingEdge="none" + android:fillViewport="true"> + android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:baselineAligned="false" > + + + + - + android:layout_gravity="center_vertical" + android:baselineAlignBottom="true" /> + "Kopie" "Skrytá kopie" "Předmět" + + \n\n"-------- Původní zpráva --------"\n"Předmět: %s"\n"Odesílatel: %s"\n"Komu: %s"\n"Kopie: %s"\n\n \n\n"%snapsal/a:"\n\n "Text v uvozovkách" diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 823ca36b4..b4724634e 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -62,6 +62,8 @@ "Cc" "Bcc" "Betreff" + + \n\n"-------- Originalnachricht --------"\n"Betreff: %s"\n"Von: %s"\n"An: %s"\n"Cc: %s"\n\n \n\n"%s schrieb:"\n\n "Zitierter Text" diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index d9c240b1e..9eedd39cf 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -17,7 +17,7 @@ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> "leer los archivos adjuntos del mensaje" "Permite que esta aplicación lea los archivos adjuntos del correo electrónico." - "Correo electrónico" + "Email" "Tus cuentas" "Redactar" "Depurar" @@ -29,7 +29,7 @@ "Responder a todos" "Suprimir" "Reenviar" - "Finalizado" + "Listo" "Descartar" "Guardar como borrador" "Actualizar" @@ -41,7 +41,7 @@ "Eliminar cuenta" "Cuentas" "Marcar como leída" - "Marcar como no leído" + "Marcar como no leída" "Añadir Cc/CCO" "Añadir archivo adjunto" "Configuración de volcado" @@ -62,6 +62,8 @@ "Cc" "CCO" "Asunto" + + \n\n"-------- Original Message --------"\n"Subject: %s"\n"From: %s"\n"To: %s"\n"CC: %s"\n\n \n\n"%s wrote:"\n\n "Texto entre comillas" diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index af017d82e..bd7444e23 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -31,7 +31,7 @@ "Transférer" "OK" "Supprimer" - "Enregistrer en tant que brouillon" + "Enregistrer" "Actualiser" "Ajouter un compte" "Nouveau message" @@ -46,7 +46,7 @@ "Ajouter une pièce jointe" "Paramètres d\'image mémoire" "Options de compte" - "Chargement des messages en cours..." + "Chargement des messages..." "Erreur de connexion" "Essayer de charger plus de messages" "Nouvel e-mail" @@ -62,6 +62,8 @@ "Cc" "Cci" "Objet" + + \n\n"-------- Message original --------"\n"Objet : %s"\n"De : %s"\n"À : %s"\n"Cc : %s"\n\n \n\n"%s a écrit :"\n\n "Texte du message précédent" @@ -80,7 +82,7 @@ "Récupération de la pièce jointe." "Message supprimé." "Message supprimé." - "Message enregistré en tant que brouillon." + "Message enregistré comme brouillon." "Configurer la messagerie électronique" "Saisissez l\'adresse e-mail de votre compte :" "Adresse e-mail" @@ -91,7 +93,7 @@ "Récupération des informations sur le compte…" "Vérification des paramètres de serveur entrant…" "Vérification des paramètres de serveur sortant…" - "Annulation en cours..." + "Annulation..." "Configurer la messagerie électronique" "Votre compte est configuré et votre messagerie est active !" "Donner un nom à ce compte (facultatif)" @@ -159,8 +161,8 @@ "Nom du compte" "Votre nom" "Paramètres de notification" - "Vibrer" - "Vibrer également lors de la réception d\'un e-mail" + "Vibreur" + "Vibrer à la réception d\'un e-mail" "Sélectionner la sonnerie" "Paramètres du serveur" "Supprimer le compte" diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 53ca6f7fe..65e1f281d 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -29,7 +29,7 @@ "Rispondi a tutti" "Elimina" "Inoltra" - "Completato" + "Fine" "Elimina" "Salva come bozza" "Aggiorna" @@ -62,6 +62,8 @@ "Cc" "Ccn" "Oggetto" + + \n\n"-------- Messaggio originale --------"\n"Oggetto: %s"\n"Da: %s"\n"A: %s"\n"CC: %s"\n\n \n\n"%s ha scritto:"\n\n "Testo tra virgolette" @@ -71,8 +73,8 @@ "Cc:" "Apri" "Salva" - "Messaggio precedente" - "Messaggio successivo" + "Messaggio prec." + "Messaggio succ." "Allegato salvato su scheda SD come %s." "Impossibile salvare l\'allegato nella scheda SD." "Seleziona \"Mostra immagini\" per visualizzare le immagini incorporate." @@ -86,11 +88,11 @@ "Indirizzo email" "Password" "Invia email da questo account per impostazione predefinita." - "Impostazione manuale" + "Configurazione manuale" "Digita un indirizzo email e una password validi." "Recupero informazioni sull\'account in corso…" "Verifica delle impostazioni del server della posta in arrivo in corso…" - "Verifica delle impostazioni del server della posta in uscita in corso…" + "Verifica impostazioni server posta in uscita…" "Annullamento in corso..." "Imposta email" "Il tuo account è stato impostato e l\'email sarà presto disponibile." diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 3aca655c0..42db97232 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -62,6 +62,8 @@ "Cc" "Bcc" "件名" + + \n\n"-------- 元のメッセージ --------"\n"件名: %s"\n"From: %s"\n"To: %s"\n"Cc: %s"\n\n \n\n"%s: "\n\n "元のメッセージ" diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 1baa57482..f69a592a6 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -62,6 +62,8 @@ "참조" "숨은참조" "제목" + + \n\n"-------- 원본 메일 --------"\n"제목: %s"\n"보낸사람: %s"\n"받는사람: %s"\n"참조: %s"\n\n \n\n"%s님이 작성:"\n\n "받은메일" diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index eed6d4c2a..f86fc7748 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -62,6 +62,8 @@ "Kopi" "Blindkopi" "Emne" + + \n\n"-------- Original Message --------"\n"Subject: %s"\n"From: %s"\n"To: %s"\n"CC: %s"\n\n \n\n"%s:"\n\n "Sitert tekst" @@ -75,7 +77,7 @@ "Neste melding" "Vedlegget ble lagret til minnekortet som %s." "Kunne ikke lagre vedlegget til minnekort." - "Velg \\\\\\\"Vis bilder\\\\\\\" for å vise vedlagte bilder." + "Velg \"Vis bilder\" for å vise vedlagte bilder." "Vis bilder" "Henter vedlegg." "Meldingen ble slettet." @@ -164,9 +166,9 @@ "Velg ringetone" "Innstillinger for tjener" "Fjern" - "Kontoen \\\\\\\"%s\\\\\\\" vil bli fjernet fra e-postapplikasjonen." + "Kontoen \"%s\" vil bli fjernet fra e-postapplikasjonen." "E-posttilgang er ikke støttet for enkelte typer Yahoo!-e-postkontoer. Hvis du har problemer med å koble til, besøk yahoo.com for mer informasjon." "Før du setter opp denne e-postkontoen, må du gå til Yahoo!-nettsiden og slå på POP3-tilgang for den." - "Bare noen \\\\\\\"pluss-kontoer tilbyr POP-tilgangBREAK_0 som dette programmet trenger for å koble til. Hvis du ikke klarer å logge innBREAK_1 med riktig e-postadresse og passord, kan det være du ikke har en betaltBREAK_2 \\\\\\\"pluss-tilgang. Start nettleseren for å få tilgang til slike e-postkontoer." + "Bare noen \"pluss-kontoer tilbyr POP-tilgangBREAK_0 som dette programmet trenger for å koble til. Hvis du ikke klarer å logge innBREAK_1 med riktig e-postadresse og passord, kan det være du ikke har en betaltBREAK_2 \"pluss-tilgang. Start nettleseren for å få tilgang til slike e-postkontoer." "Før du setter opp denne e-postkontoen, besøk T-Online-nettsiden og velg et passord for e-posttilgang via POP3." diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 1d666bea1..a308c8205 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -62,6 +62,8 @@ "Cc" "Bcc" "Onderwerp" + + \n\n"-------- Oorspronkelijk bericht --------"\n"Onderwerp: %s"\n"Van: %s"\n"Aan: %s"\n"Cc: %s"\n\n \n\n"%sschreef:"\n\n "Geciteerde tekst" @@ -79,7 +81,7 @@ "Afbeeldingen weergeven" "Bijlage wordt opgehaald." "Bericht verwijderd." - "Bericht genegeerd" + "Bericht wordt verwijderd" "Bericht opgeslagen als concept." "E-mail instellen" "Typ het e-mailadres van je account:" diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 456de9709..0a9a266e2 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -31,7 +31,7 @@ "Przekaż dalej" "Gotowe" "Odrzuć" - "Zapisz jako wersję roboczą" + "Zapisz wersję roboczą" "Odśwież" "Dodaj konto" "Utwórz" @@ -53,7 +53,7 @@ "Nieprzeczytane: %d (%s)" "na %d kontach" "Odebrane" - "Witamy w konfiguracji poczty e-mail!"\n\n"W tej usłudze można korzystać z dowolnego konta e-mail."\n\n"Konfiguracja najpopularniejszych kont e-mail składa się z tylko 2 etapów." + "Zapraszamy do skonfigurowania poczty e-mail!"\n\n"W tej usłudze można korzystać z dowolnego konta e-mail."\n\n"Konfiguracja najpopularniejszych kont e-mail składa się z tylko 2 etapów." "Wersja: %s" "Czy włączyć dodatkowe rejestrowanie na potrzeby debugowania?" "Czy chcesz włączyć rejestrowanie poufnych informacji na potrzeby debugowania? (Może to spowodować uwzględnianie haseł w dziennikach)." @@ -62,6 +62,8 @@ "DW" "UDW" "Temat" + + \n\n"-------- Wiadomość oryginalna --------"\n"Temat: %s"\n"Od: %s"\n"Do: %s"\n"DW: %s"\n\n \n\n"Użytkownik %s napisał:"\n\n "Cytowany tekst" @@ -126,7 +128,7 @@ "Nazwa użytkownika" "Hasło" "Opcje konta" - "Częstotliwość sprawdzania poczty e-mail" + "Sprawdzanie poczty" "Nigdy" "Co 5 minut" "Co 10 minut" @@ -151,16 +153,16 @@ "Domyślne konto" "Domyślnie wysyłaj wiadomości e-mail z tego konta" "Powiadomienia e-mail" - "Wyświetl powiadomienie na pasku stanu po otrzymaniu wiadomości e-mail" - "Częstotliwość sprawdzania poczty e-mail" - "Ustawienia poczty przychodzącej" - "Ustawienia poczty wychodzącej" + "Wyświetl powiadomienie na pasku stanu po otrzymaniu e-maila" + "Sprawdzanie poczty" + "Poczta przychodząca" + "Poczta wychodząca" "Dodaj kolejne konto" "Nazwa konta" "Imię i nazwisko" "Ustawienia powiadomień" "Wibracje" - "Sygnalizuj wibracjami otrzymanie wiadomości e-mail" + "Sygnalizuj otrzymanie wiadomości e-mail wibracją" "Wybierz dzwonek" "Ustawienia serwera" "Usuń konto" diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 8b0f7aec1..1539eb72e 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -62,6 +62,8 @@ "Копия" "Скрытая" "Тема" + + \n\n"-------- Исходное сообщение --------"\n"Тема: %s"\n"От: %s"\n"Кому: %s"\n"Копия: %s"\n\n \n\n"%s написал(а):"\n\n "Цитируемый текст" diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index d6d57e039..fb300c0c1 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -62,6 +62,8 @@ "抄送" "密送" "主题" + + \n\n"-------- 原始邮件 --------"\n"主题:%s"\n"发件人:%s"\n"收件人:%s"\n"抄送:%s"\n\n \n\n"%s写道:"\n\n "引用文字" diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 5a650c357..8581b9a9b 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -62,6 +62,8 @@ "副本" "密件副本" "主旨" + + \n\n"--------原始郵件 --------"\n"主旨:%s"\n"寄件者:%s"\n"收件者:%s"\n"副本:%s"\n\n \n\n"%s提到:"\n\n "引用的文字" diff --git a/res/values/strings.xml b/res/values/strings.xml index d57727d11..0eb3cfc1f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -126,6 +126,8 @@ Bcc Subject + + Compose Mail \n\n-------- Original Message --------\nSubject: %s\nFrom: %s\nTo: %s\nCC: %s\n\n diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index 359a03578..3c10fceec 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -16,19 +16,29 @@ package com.android.email.activity; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.Map; -import java.util.regex.Matcher; +import com.android.email.Account; +import com.android.email.Email; +import com.android.email.MessagingController; +import com.android.email.MessagingListener; +import com.android.email.R; +import com.android.email.Utility; +import com.android.email.mail.Address; +import com.android.email.mail.Message; +import com.android.email.mail.MessagingException; +import com.android.email.mail.Multipart; +import com.android.email.mail.Part; +import com.android.email.mail.Message.RecipientType; +import com.android.email.mail.internet.MimeUtility; +import com.android.email.mail.store.LocalStore.LocalAttachmentBodyPart; +import com.android.email.mail.store.LocalStore.LocalMessage; +import com.android.email.provider.AttachmentProvider; + +import org.apache.commons.io.IOUtils; import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.MediaScannerConnection; @@ -38,6 +48,9 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Process; +import android.provider.Contacts; +import android.provider.Contacts.People; +import android.provider.Contacts.Presence; import android.text.util.Regex; import android.util.Config; import android.util.Log; @@ -57,24 +70,16 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; -import org.apache.commons.io.IOUtils; - -import com.android.email.Account; -import com.android.email.Email; -import com.android.email.MessagingController; -import com.android.email.MessagingListener; -import com.android.email.R; -import com.android.email.Utility; -import com.android.email.mail.Address; -import com.android.email.mail.Message; -import com.android.email.mail.MessagingException; -import com.android.email.mail.Multipart; -import com.android.email.mail.Part; -import com.android.email.mail.Message.RecipientType; -import com.android.email.mail.internet.MimeUtility; -import com.android.email.mail.store.LocalStore.LocalAttachmentBodyPart; -import com.android.email.mail.store.LocalStore.LocalMessage; -import com.android.email.provider.AttachmentProvider; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.Map; +import java.util.Random; +import java.util.regex.Matcher; public class MessageView extends Activity implements UrlInterceptHandler, OnClickListener { @@ -83,6 +88,12 @@ public class MessageView extends Activity private static final String EXTRA_MESSAGE = "com.android.email.MessageView_message"; private static final String EXTRA_FOLDER_UIDS = "com.android.email.MessageView_folderUids"; private static final String EXTRA_NEXT = "com.android.email.MessageView_next"; + + private static final String[] METHODS_WITH_PRESENCE_PROJECTION = new String[] { + People.ContactMethods._ID, // 0 + People.PRESENCE_STATUS, // 1 + }; + private static final int METHODS_STATUS_COLUMN = 1; private TextView mSubjectView; private TextView mFromView; @@ -93,8 +104,9 @@ public class MessageView extends Activity private View mCcContainerView; private WebView mMessageContentView; private LinearLayout mAttachments; - private View mAttachmentIcon; + private ImageView mAttachmentIcon; private View mShowPicturesSection; + private ImageView mSenderPresenceView; private Account mAccount; private String mFolder; @@ -121,6 +133,7 @@ public class MessageView extends Activity private static final int MSG_ATTACHMENT_NOT_SAVED = 8; private static final int MSG_SHOW_SHOW_PICTURES = 9; private static final int MSG_FETCHING_ATTACHMENT = 10; + private static final int MSG_SET_SENDER_PRESENCE = 11; @Override public void handleMessage(android.os.Message msg) { @@ -172,6 +185,9 @@ public class MessageView extends Activity getString(R.string.message_view_fetching_attachment_toast), Toast.LENGTH_SHORT).show(); break; + case MSG_SET_SENDER_PRESENCE: + updateSenderPresence(msg.arg1); + break; default: super.handleMessage(msg); } @@ -238,6 +254,12 @@ public class MessageView extends Activity msg.arg1 = show ? 1 : 0; sendMessage(msg); } + + public void setSenderPresence(int presenceIconId) { + android.os.Message + .obtain(this, MSG_SET_SENDER_PRESENCE, presenceIconId, 0) + .sendToTarget(); + } } /** @@ -279,22 +301,25 @@ public class MessageView extends Activity setContentView(R.layout.message_view); - mSubjectView = (TextView)findViewById(R.id.subject); - mFromView = (TextView)findViewById(R.id.from); - mToView = (TextView)findViewById(R.id.to); - mCcView = (TextView)findViewById(R.id.cc); + mSubjectView = (TextView) findViewById(R.id.subject); + mFromView = (TextView) findViewById(R.id.from); + mToView = (TextView) findViewById(R.id.to); + mCcView = (TextView) findViewById(R.id.cc); mCcContainerView = findViewById(R.id.cc_container); - mDateView = (TextView)findViewById(R.id.date); - mTimeView = (TextView)findViewById(R.id.time); - mMessageContentView = (WebView)findViewById(R.id.message_content); - mAttachments = (LinearLayout)findViewById(R.id.attachments); - mAttachmentIcon = findViewById(R.id.attachment); + mDateView = (TextView) findViewById(R.id.date); + mTimeView = (TextView) findViewById(R.id.time); + mMessageContentView = (WebView) findViewById(R.id.message_content); + mAttachments = (LinearLayout) findViewById(R.id.attachments); + mAttachmentIcon = (ImageView) findViewById(R.id.attachment); mShowPicturesSection = findViewById(R.id.show_pictures_section); + mSenderPresenceView = (ImageView) findViewById(R.id.presence); mMessageContentView.setVerticalScrollBarEnabled(false); mAttachments.setVisibility(View.GONE); mAttachmentIcon.setVisibility(View.GONE); + mFromView.setOnClickListener(this); + mSenderPresenceView.setOnClickListener(this); findViewById(R.id.reply).setOnClickListener(this); findViewById(R.id.reply_all).setOnClickListener(this); findViewById(R.id.delete).setOnClickListener(this); @@ -374,6 +399,9 @@ public class MessageView extends Activity public void onResume() { super.onResume(); MessagingController.getInstance(getApplication()).addListener(mListener); + if (mMessage != null) { + startPresenceCheck(); + } } @Override @@ -417,6 +445,27 @@ public class MessageView extends Activity } } } + + private void onClickSender() { + if (mMessage != null) { + try { + Address senderEmail = mMessage.getFrom()[0]; + + // TODO look up contact + // TODO action VIEW if exists + // TODO disambiguate + // TODO create + + Toast.makeText(this, + "Look up contact for " + senderEmail.toFriendly(), Toast.LENGTH_SHORT) + .show(); + } catch (MessagingException me) { + if (Config.LOGV) { + Log.v(Email.LOG_TAG, "loadMessageForViewHeadersAvailable", me); + } + } + } + } private void onReply() { if (mMessage != null) { @@ -530,6 +579,10 @@ public class MessageView extends Activity public void onClick(View view) { switch (view.getId()) { + case R.id.from: + case R.id.presence: + onClickSender(); + break; case R.id.reply: onReply(); break; @@ -733,6 +786,72 @@ public class MessageView extends Activity } } } + + /** + * Launch a thread (because of cross-process DB lookup) to check presence of the sender of the + * message. When that thread completes, update the UI. + * + * This must only be called when mMessage is null (it will hide presence indications) or when + * mMessage has already seen its headers loaded. + * + * Note: This is just a polling operation. A more advanced solution would be to keep the + * cursor open and respond to presence status updates (in the form of content change + * notifications). However, because presence changes fairly slowly compared to the duration + * of viewing a single message, a simple poll at message load (and onResume) should be + * sufficient. + */ + private void startPresenceCheck() { + String email = null; + try { + if (mMessage != null) { + Address sender = mMessage.getFrom()[0]; + email = sender.getAddress(); + } + } catch (MessagingException me) { } + if (email == null) { + mHandler.setSenderPresence(0); + return; + } + final String senderEmail = email; + + new Thread() { + @Override + public void run() { + Cursor methodsCursor = getContentResolver().query( + Uri.withAppendedPath(Contacts.ContactMethods.CONTENT_URI, "with_presence"), + METHODS_WITH_PRESENCE_PROJECTION, + Contacts.ContactMethods.DATA + "=?", + new String[]{ senderEmail }, + null); + + int presenceIcon = 0; + + if (methodsCursor != null) { + if (methodsCursor.moveToFirst() && + !methodsCursor.isNull(METHODS_STATUS_COLUMN)) { + presenceIcon = Presence.getPresenceIconResourceId( + methodsCursor.getInt(METHODS_STATUS_COLUMN)); + } + methodsCursor.close(); + } + + mHandler.setSenderPresence(presenceIcon); + } + }.start(); + } + + /** + * Update the actual UI. Must be called from main thread (or handler) + * @param presenceIconId the presence of the sender, 0 for "unknown" + */ + private void updateSenderPresence(int presenceIconId) { + if (presenceIconId == 0) { + mSenderPresenceView.setVisibility(View.GONE); + } else { + mSenderPresenceView.setImageResource(presenceIconId); + mSenderPresenceView.setVisibility(View.VISIBLE); + } + } class Listener extends MessagingListener { @Override @@ -756,6 +875,7 @@ public class MessageView extends Activity toText, ccText, hasAttachments); + startPresenceCheck(); } catch (MessagingException me) { if (Config.LOGV) { diff --git a/tests/src/com/android/email/activity/MessageComposeInstrumentationTests.java b/tests/src/com/android/email/activity/MessageComposeInstrumentationTests.java index 4ccce60a6..e637a725d 100644 --- a/tests/src/com/android/email/activity/MessageComposeInstrumentationTests.java +++ b/tests/src/com/android/email/activity/MessageComposeInstrumentationTests.java @@ -84,6 +84,8 @@ public class MessageComposeInstrumentationTests Preferences.getPreferences(context).getDefaultAccount(); Email.setServicesEnabled(context); } + Intent intent = new Intent(Intent.ACTION_VIEW); + setActivityIntent(intent); final MessageCompose a = getActivity(); mToView = (EditText) a.findViewById(R.id.to); mSubjectView = (EditText) a.findViewById(R.id.subject);