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
This commit is contained in:
Daisuke Miyakawa 2011-06-02 09:07:17 -07:00
parent 22409fcffa
commit 3975a28918

View File

@ -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<CharSequence> addressTexts = new ArrayList<CharSequence>();
addressTexts.add(mToView.getText());
addressTexts.add(mCcView.getText());
addressTexts.add(mBccView.getText());
DataUsageStatUpdater updater = new DataUsageStatUpdater(mContext);
updater.updateWithRfc822Address(addressTexts);
}
return mDraft.mId;
}