Replacing old contacts API references with new ones.
This commit is contained in:
parent
e8a37cf769
commit
4587efc1d3
@ -42,8 +42,8 @@ import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.MediaScannerConnection;
|
||||
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
|
||||
import android.net.Uri;
|
||||
@ -51,12 +51,9 @@ import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.provider.Contacts;
|
||||
import android.provider.Contacts.Intents;
|
||||
import android.provider.Contacts.People;
|
||||
import android.provider.ContactsContract;
|
||||
import android.provider.ContactsContract.Presence;
|
||||
import android.provider.ContactsContract.CommonDataKinds;
|
||||
import android.provider.ContactsContract.Presence;
|
||||
import android.text.util.Regex;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@ -462,20 +459,20 @@ public class MessageView extends Activity implements OnClickListener {
|
||||
if (senderEmail != null) {
|
||||
Uri contactUri = Uri.fromParts("mailto", senderEmail.getAddress(), null);
|
||||
|
||||
Intent contactIntent = new Intent(Contacts.Intents.SHOW_OR_CREATE_CONTACT);
|
||||
Intent contactIntent = new Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT);
|
||||
contactIntent.setData(contactUri);
|
||||
|
||||
// Pass along full E-mail string for possible create dialog
|
||||
contactIntent.putExtra(Contacts.Intents.EXTRA_CREATE_DESCRIPTION,
|
||||
contactIntent.putExtra(ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION,
|
||||
senderEmail.toString());
|
||||
|
||||
// Only provide personal name hint if we have one
|
||||
String senderPersonal = senderEmail.getPersonal();
|
||||
if (senderPersonal != null) {
|
||||
contactIntent.putExtra(Intents.Insert.NAME, senderPersonal);
|
||||
contactIntent.putExtra(ContactsContract.Intents.Insert.NAME, senderPersonal);
|
||||
}
|
||||
|
||||
contactIntent.putExtra(Intents.EXTRA_TARGET_RECT,
|
||||
contactIntent.putExtra(ContactsContract.Intents.EXTRA_TARGET_RECT,
|
||||
getAbsoluteRect(mSenderPresenceView));
|
||||
startActivity(contactIntent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user