From 3975a28918769e3f9bf43264ec167b0b4bed2f2c Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Thu, 2 Jun 2011 09:07:17 -0700 Subject: [PATCH] Send email usage feedback to ContactsProvider This enables the provider to count the number of contacted per email address basis, which should improve auto-complete quality. Bug: 4371572 Change-Id: I4f0e586d3edff5a460e33dc7d9f9680119a8d568 --- src/com/android/email/activity/MessageCompose.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 9f2add56b..59e2b7dbc 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -16,6 +16,7 @@ package com.android.email.activity; +import com.android.common.contacts.DataUsageStatUpdater; import com.android.email.Controller; import com.android.email.Email; import com.android.email.EmailAddressAdapter; @@ -1209,6 +1210,13 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus R.string.message_view_attachment_background_load); } mController.sendMessage(mDraft.mId, mDraft.mAccountKey); + + ArrayList addressTexts = new ArrayList(); + addressTexts.add(mToView.getText()); + addressTexts.add(mCcView.getText()); + addressTexts.add(mBccView.getText()); + DataUsageStatUpdater updater = new DataUsageStatUpdater(mContext); + updater.updateWithRfc822Address(addressTexts); } return mDraft.mId; }