Gets EditContactActivity back into a basic working state.
Editing of already existing values works. Adding new values, or new
contacts does not.
-Updated manifest to match the new
"vnd.android.cursor.item/person_aggregate" mimetype.
-Much of EditContactActivity is completely commented out now. In
particular anything to do with adding new contacts, editing current
values, or group management, has been gutted.
-Added endcodePredefinedImProtocol() and encodeCustomImProtocol() to
ContactsUtils.java
-Fixed a bug in star toggling in ViewContactActivity.
-ViewContactActivity now shows the display name from the StructuredName
data row instead of the copy in the aggregate table.
diff --git a/src/com/android/contacts/ContactsUtils.java b/src/com/android/contacts/ContactsUtils.java
index 18d6dfb..4b82246 100644
--- a/src/com/android/contacts/ContactsUtils.java
+++ b/src/com/android/contacts/ContactsUtils.java
@@ -22,6 +22,7 @@
import android.net.Uri;
import android.content.ContentResolver;
+import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
@@ -81,6 +82,14 @@
return display;
}
+ public static String encodePredefinedImProtocol(int protocol) {
+ return "pre:" + protocol;
+ }
+
+ public static String encodeCustomImProtocol(String protocolString) {
+ return "custom:" + protocolString;
+ }
+
public static Object decodeImProtocol(String encodedString) {
if (encodedString == null) {
return null;