OSDN Git Service

Fixed NPE in adding a phone number to an existing contact from call log
authorDmitri Plotnikov <dplotnikov@google.com>
Mon, 15 Mar 2010 23:37:19 +0000 (16:37 -0700)
committerDmitri Plotnikov <dplotnikov@google.com>
Mon, 15 Mar 2010 23:37:19 +0000 (16:37 -0700)
Change-Id: Icb3b31e4dff9595c48dd374a98731df66a07b182

src/com/android/contacts/ui/EditContactActivity.java

index 74d2f3e..35224d2 100644 (file)
@@ -242,7 +242,7 @@ public final class EditContactActivity extends Activity
             final boolean hasState = entitySet.size() > 0;
             if (hasExtras && hasState) {
                 // Find source defining the first RawContact found
-                final EntityDelta state = target.mState.get(0);
+                final EntityDelta state = entitySet.get(0);
                 final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
                 final ContactsSource source = sources.getInflatedSource(accountType,
                         ContactsSource.LEVEL_CONSTRAINTS);