Bläddra i källkod

Apex Mobile
修复contact 编辑后无法显示的问题

Ray Zhang 8 år sedan
förälder
incheckning
8cd3cec3f9
1 ändrade filer med 6 tillägg och 7 borttagningar
  1. 6 7
      Apex Mobile/app/src/main/java/com/usai/apex/InnerMapActivity.java

+ 6 - 7
Apex Mobile/app/src/main/java/com/usai/apex/InnerMapActivity.java

@@ -8,7 +8,6 @@ import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
-import android.net.Uri;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
@@ -266,12 +265,12 @@ public class InnerMapActivity extends AppCompatActivity implements BaiduMapFragm
 					.setNegativeButton("No", new DialogInterface.OnClickListener() {
 						@Override
 						public void onClick(DialogInterface dialog, int which) {
-							// 不更新则直接查看
-//							cm.insertContact(contact,mContext);
-							Contact existContact = cm.searchContact(contact.getName());
-							String contactId = cm.getContactID(existContact.getName());
-							Intent editIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("content://com.android.contacts/contacts/"+contactId));
-							startActivity(editIntent);
+							// 添加一条新记录
+							cm.insertContact(contact,mContext);
+//							Contact existContact = cm.searchContact(contact.getName());
+//							String contactId = cm.getContactID(existContact.getName());
+//							Intent editIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("content://com.android.contacts/contacts/"+contactId));
+//							startActivity(editIntent);
 						}
 					})
 					.setPositiveButton("Yes", new DialogInterface.OnClickListener() {