From aef86e350174701d6e28d82dc7a113bfdd8219ff Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Tue, 17 Dec 2013 18:30:50 -0800 Subject: [PATCH] Support inline image UI changes in Email b/5555553 A small CL to make sure email keeps compiling and has the same behavior as before. If Email wants to support long press to view image, additional work needs to be done on the email side in order to enable the full functionality. Change-Id: I8e7cbdf2a2eee452fe9597097b77db5c8052d7fe --- src/com/android/email/EmailApplication.java | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/com/android/email/EmailApplication.java b/src/com/android/email/EmailApplication.java index 6b168c2d0..d52c6a6b6 100644 --- a/src/com/android/email/EmailApplication.java +++ b/src/com/android/email/EmailApplication.java @@ -17,13 +17,20 @@ package com.android.email; import android.app.Application; +import android.content.Context; +import android.content.Intent; import com.android.email.preferences.EmailPreferenceMigrator; +import com.android.mail.browse.InlineAttachmentViewIntentBuilder; +import com.android.mail.browse.InlineAttachmentViewIntentBuilderCreator; +import com.android.mail.browse.InlineAttachmentViewIntentBuilderCreatorHolder; import com.android.mail.preferences.BasePreferenceMigrator; import com.android.mail.preferences.PreferenceMigratorHolder; import com.android.mail.preferences.PreferenceMigratorHolder.PreferenceMigratorCreator; import com.android.mail.utils.LogTag; +import java.util.Map; + public class EmailApplication extends Application { private static final String LOG_TAG = "Email"; @@ -36,5 +43,23 @@ public class EmailApplication extends Application { return new EmailPreferenceMigrator(); } }); + + InlineAttachmentViewIntentBuilderCreatorHolder.setInlineAttachmentViewIntentCreator( + new InlineAttachmentViewIntentBuilderCreator() { + @Override + public InlineAttachmentViewIntentBuilder + createInlineAttachmentViewIntentBuilder( + Map urlToMessageIdMap, + String account, long conversationId) { + return new InlineAttachmentViewIntentBuilder() { + @Override + public Intent createInlineAttachmentViewIntent(Context context, + String url) { + return null; + } + }; + } + }); + } }