Home
last modified time | relevance | path

Searched refs:ValuesDelta (Results 1 – 25 of 41) sorted by relevance

12

/packages/experimental/LoaderApp/src/com/android/loaderapp/model/
DEntityDelta.java65 private ValuesDelta mValues;
71 private HashMap<String, ArrayList<ValuesDelta>> mEntries = Maps.newHashMap();
76 public EntityDelta(ValuesDelta values) { in EntityDelta()
86 entity.mValues = ValuesDelta.fromBefore(before.getEntityValues()); in fromBefore()
89 entity.addEntry(ValuesDelta.fromBefore(namedValues.values)); in fromBefore()
102 final ValuesDelta remoteValues = remote.mValues; in mergeAfter()
117 local.mValues = ValuesDelta.mergeAfter(local.mValues, remote.mValues); in mergeAfter()
120 for (ArrayList<ValuesDelta> mimeEntries : remote.mEntries.values()) { in mergeAfter()
121 for (ValuesDelta remoteEntry : mimeEntries) { in mergeAfter()
125 final ValuesDelta localEntry = local.getEntry(childId); in mergeAfter()
[all …]
DEntitySet.java19 import com.android.loaderapp.model.EntityDelta.ValuesDelta;
247 final ValuesDelta values = delta.getValues(); in getRawContactId()
275 public ValuesDelta getSuperPrimaryEntry(final String mimeType) { in getSuperPrimaryEntry()
276 ValuesDelta primary = null; in getSuperPrimaryEntry()
277 ValuesDelta randomEntry = null; in getSuperPrimaryEntry()
279 final ArrayList<ValuesDelta> mimeEntries = delta.getMimeEntries(mimeType); in getSuperPrimaryEntry()
282 for (ValuesDelta entry : mimeEntries) { in getSuperPrimaryEntry()
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/
DRawContactDelta.java36 import com.android.contacts.common.model.ValuesDelta;
67 private ValuesDelta mValues;
79 private final HashMap<String, ArrayList<ValuesDelta>> mEntries = Maps.newHashMap();
84 public RawContactDelta(ValuesDelta values) { in RawContactDelta()
94 rawContactDelta.mValues = ValuesDelta.fromBefore(before.getValues()); in fromBefore()
97 rawContactDelta.addEntry(ValuesDelta.fromBefore(values)); in fromBefore()
110 final ValuesDelta remoteValues = remote.mValues; in mergeAfter()
125 local.mValues = ValuesDelta.mergeAfter(local.mValues, remote.mValues); in mergeAfter()
128 for (ArrayList<ValuesDelta> mimeEntries : remote.mEntries.values()) { in mergeAfter()
129 for (ValuesDelta remoteEntry : mimeEntries) { in mergeAfter()
[all …]
DValuesDelta.java41 public class ValuesDelta implements Parcelable { class
55 protected ValuesDelta() { in ValuesDelta() method in ValuesDelta
62 public static ValuesDelta fromBefore(ContentValues before) { in fromBefore()
63 final ValuesDelta entry = new ValuesDelta(); in fromBefore()
73 public static ValuesDelta fromAfter(ContentValues after) { in fromAfter()
74 final ValuesDelta entry = new ValuesDelta(); in fromAfter()
280 public void copyStringFrom(ValuesDelta from, String key) { in copyStringFrom()
333 public static ValuesDelta mergeAfter(ValuesDelta local, ValuesDelta remote) { in mergeAfter()
338 if (local == null) local = new ValuesDelta(); in mergeAfter()
353 if (object instanceof ValuesDelta) { in equals()
[all …]
DRawContactModifier.java51 import com.android.contacts.common.model.ValuesDelta;
113 public static ValuesDelta ensureKindExists( in ensureKindExists()
124 final ValuesDelta child = insertChild(state, kind); in ensureKindExists()
196 final List<ValuesDelta> mimeEntries = state.getMimeEntries(kind.mimeType); in getTypeFrequencies()
200 for (ValuesDelta entry : mimeEntries) { in getTypeFrequencies()
228 public static EditType getCurrentType(ValuesDelta entry, DataKind kind) { in getCurrentType()
332 public static ValuesDelta insertChild(RawContactDelta state, DataKind kind) { in insertChild()
348 public static ValuesDelta insertChild(RawContactDelta state, DataKind kind, EditType type) { in insertChild()
366 final ValuesDelta child = ValuesDelta.fromAfter(after); in insertChild()
379 ValuesDelta values = state.getValues(); in trimEmpty()
[all …]
DRawContactDeltaList.java35 import com.android.contacts.common.model.ValuesDelta;
422 final ValuesDelta values = delta.getValues(); in getRawContactId()
472 public ValuesDelta getSuperPrimaryEntry(final String mimeType) { in getSuperPrimaryEntry()
473 ValuesDelta primary = null; in getSuperPrimaryEntry()
474 ValuesDelta randomEntry = null; in getSuperPrimaryEntry()
476 final ArrayList<ValuesDelta> mimeEntries = delta.getMimeEntries(mimeType); in getSuperPrimaryEntry()
479 for (ValuesDelta entry : mimeEntries) { in getSuperPrimaryEntry()
/packages/apps/Contacts/src/com/android/contacts/editor/
DKindSectionData.java20 import com.android.contacts.common.model.ValuesDelta;
51 public List<ValuesDelta> getValuesDeltas() { in getValuesDeltas()
52 final List<ValuesDelta> valuesDeltas = mRawContactDelta.getMimeEntries(mDataKind.mimeType); in getValuesDeltas()
53 return valuesDeltas == null ? new ArrayList<ValuesDelta>() : valuesDeltas; in getValuesDeltas()
57 public List<ValuesDelta> getVisibleValuesDeltas() { in getVisibleValuesDeltas()
58 final ArrayList<ValuesDelta> valuesDeltas = new ArrayList<> (); in getVisibleValuesDeltas()
59 for (ValuesDelta valuesDelta : getValuesDeltas()) { in getVisibleValuesDeltas()
69 public List<ValuesDelta> getNonEmptyValuesDeltas() { in getNonEmptyValuesDeltas()
70 final ArrayList<ValuesDelta> valuesDeltas = new ArrayList<> (); in getNonEmptyValuesDeltas()
71 for (ValuesDelta valuesDelta : getValuesDeltas()) { in getNonEmptyValuesDeltas()
[all …]
DKindSectionDataList.java19 import com.android.contacts.common.model.ValuesDelta;
58 public Pair<KindSectionData,ValuesDelta> getEntryToWrite(long id, in getEntryToWrite()
68 final ValuesDelta valuesDelta = kindSectionData.getValuesDeltaById(id); in getEntryToWrite()
80 final ValuesDelta valuesDelta = kindSectionData.getSuperPrimaryValuesDelta(); in getEntryToWrite()
133 public Pair<KindSectionData,ValuesDelta> getEntryToDisplay(long id) { in getEntryToDisplay()
140 final ValuesDelta valuesDelta = kindSectionData.getValuesDeltaById(id); in getEntryToDisplay()
149 final ValuesDelta valuesDelta = kindSectionData.getSuperPrimaryValuesDelta(); in getEntryToDisplay()
158 final ValuesDelta valuesDelta = kindSectionData.getFirstNonEmptyValuesDelta(); in getEntryToDisplay()
166 final List<ValuesDelta> valuesDeltaList = kindSectionData.getValuesDeltas(); in getEntryToDisplay()
169 final ValuesDelta valuesDelta = valuesDeltaList.get(0); in getEntryToDisplay()
DStructuredNameEditorView.java33 import com.android.contacts.common.model.ValuesDelta;
71 public void setValues(DataKind kind, ValuesDelta entry, RawContactDelta state, boolean readOnly, in setValues()
134 ValuesDelta values = getValues(); in switchFromFullNameToStructuredName()
159 ValuesDelta values = getValues(); in switchFromStructuredNameToFullName()
182 private Map<String, String> valuesToStructuredNameMap(ValuesDelta values) { in valuesToStructuredNameMap()
190 private void eraseFullName(ValuesDelta values) { in eraseFullName()
194 private void rebuildFullName(ValuesDelta values) { in rebuildFullName()
201 private void eraseStructuredName(ValuesDelta values) { in eraseStructuredName()
207 private void rebuildStructuredName(ValuesDelta values) { in rebuildStructuredName()
237 final ValuesDelta valuesDelta = getValues(); in getDisplayName()
DPhoneticNameEditorView.java24 import com.android.contacts.common.model.ValuesDelta;
34 private static class PhoneticValuesDelta extends ValuesDelta {
35 private ValuesDelta mValues;
38 public PhoneticValuesDelta(ValuesDelta values) { in PhoneticValuesDelta()
105 public void setValues(DataKind kind, ValuesDelta entry, RawContactDelta state, boolean readOnly, in setValues()
145 ValuesDelta entry = getEntry(); in hasData()
DCompactKindSectionView.java22 import com.android.contacts.common.model.ValuesDelta;
56 private final ValuesDelta mValuesDelta;
60 public StructuredNameEditorListener(ValuesDelta valuesDelta, long rawContactId, in StructuredNameEditorListener()
292 ValuesDelta primaryValuesDelta) { in setState()
313 private void rebuildFromState(ValuesDelta primaryValuesDelta) { in rebuildFromState()
333 for (ValuesDelta valuesDelta : kindSectionData.getVisibleValuesDeltas()) { in rebuildFromState()
342 ValuesDelta valuesDelta, RawContactDelta rawContactDelta) { in addNameEditorViews()
415 ValuesDelta valuesDelta, Editor.EditorListener editorListener) { in addNonNameEditorView()
560 final ValuesDelta values = RawContactModifier.insertChild(rawContactDelta, dataKind); in updateEmptyNonNameEditors()
DRawContactEditorView.java44 import com.android.contacts.common.model.ValuesDelta;
261 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState()
273 ValuesDelta primaryNickNameEntry = state.getPrimaryEntry(nickNameKind.mimeType); in setState()
286 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState()
338 ArrayList<ValuesDelta> entries = mState.getMimeEntries(GroupMembership.CONTENT_ITEM_TYPE); in addToDefaultGroupIfNeeded()
340 for (ValuesDelta values : entries) { in addToDefaultGroupIfNeeded()
352 ValuesDelta entry = RawContactModifier.insertChild(mState, mGroupMembershipKind); in addToDefaultGroupIfNeeded()
DKindSectionView.java32 import com.android.contacts.common.model.ValuesDelta;
170 for (ValuesDelta entry : mState.getMimeEntries(mKind.mimeType)) { in rebuildFromState()
186 private View createEditorView(ValuesDelta entry) { in createEditorView()
211 private boolean isEmptyNoop(ValuesDelta item) { in isEmptyNoop()
259 final ValuesDelta values = RawContactModifier.insertChild(mState, mKind); in updateEmptyEditors()
DRawContactReadOnlyEditorView.java44 import com.android.contacts.common.model.ValuesDelta;
140 ValuesDelta primary; in setState()
165 final ArrayList<ValuesDelta> phones = state.getMimeEntries(Phone.CONTENT_ITEM_TYPE); in setState()
170 for (ValuesDelta phone : phones) { in setState()
190 final ArrayList<ValuesDelta> emails = state.getMimeEntries(Email.CONTENT_ITEM_TYPE); in setState()
195 for (ValuesDelta email : emails) { in setState()
DViewIdGenerator.java24 import com.android.contacts.common.model.ValuesDelta;
71 public int getId(RawContactDelta entity, DataKind kind, ValuesDelta values, in getId()
84 private static String getMapKey(RawContactDelta entity, DataKind kind, ValuesDelta values, in getMapKey()
DGroupMembershipView.java45 import com.android.contacts.common.model.ValuesDelta;
371 ArrayList<ValuesDelta> entries = mState.getMimeEntries(GroupMembership.CONTENT_ITEM_TYPE); in onItemClick()
373 for (ValuesDelta entry : entries) { in onItemClick()
390 ValuesDelta entry = RawContactModifier.insertChild(mState, mKind); in onItemClick()
416 ArrayList<ValuesDelta> entries = mState.getMimeEntries(GroupMembership.CONTENT_ITEM_TYPE); in hasMembership()
418 for (ValuesDelta values : entries) { in hasMembership()
DCompactRawContactsEditorView.java24 import com.android.contacts.common.model.ValuesDelta;
100 public void onNameFieldChanged(long rawContactId, ValuesDelta valuesDelta); in onNameFieldChanged()
356 private ValuesDelta mPhotoValuesDelta;
358 private Pair<KindSectionData, ValuesDelta> mPrimaryNameKindSectionData;
494 for (ValuesDelta valuesDelta : kindSectionData.getNonEmptyValuesDeltas()) { in unsetSuperPrimaryFromAllPhotos()
534 final List<ValuesDelta> valuesDeltas = kindSectionData.getNonEmptyValuesDeltas(); in getPhotos()
537 final ValuesDelta valuesDelta = valuesDeltas.get(j); in getPhotos()
584 final List<ValuesDelta> valuesDeltaList = kindSectionData.getNonEmptyValuesDeltas(); in setPrimaryPhoto()
591 final ValuesDelta valuesDelta = valuesDeltaList.get(photo.valuesDeltaListIndex); in setPrimaryPhoto()
940 final Pair<KindSectionData,ValuesDelta> photoToDisplay = in addPhotoView()
[all …]
DEditor.java22 import com.android.contacts.common.model.ValuesDelta;
67 … public void setValues(DataKind kind, ValuesDelta values, RawContactDelta state, boolean readOnly, in setValues()
DPhotoEditorView.java38 import com.android.contacts.common.model.ValuesDelta;
51 private ValuesDelta mEntry;
115 … public void setValues(DataKind kind, ValuesDelta values, RawContactDelta state, boolean readOnly, in setValues()
DLabeledEditorView.java49 import com.android.contacts.common.model.ValuesDelta;
76 private ValuesDelta mEntry;
281 protected ValuesDelta getEntry() { in getEntry()
389 public void setValues(DataKind kind, ValuesDelta entry, RawContactDelta state, boolean readOnly, in setValues()
417 public ValuesDelta getValues() { in getValues()
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/
DRawContactModifierTests.java42 import com.android.contacts.common.model.ValuesDelta;
360 final ValuesDelta values = ValuesDelta.fromAfter(after); in testIsEmptyEmpty()
372 final ValuesDelta values = RawContactModifier.insertChild(state, kindPhone, typeHome); in testIsEmptyDirectFields()
435 final ValuesDelta values = RawContactModifier.insertChild(state, kindPhone, typeHome); in testTrimEmptySpaces()
461 final ValuesDelta values = RawContactModifier.insertChild(state, kindPhone, typeHome); in testTrimLeaveValid()
492 state.addEntry(ValuesDelta.fromBefore(before)); in testTrimEmptyUntouched()
525 final ValuesDelta child = state.getEntry(TEST_ID); in testTrimEmptyAfterUpdate()
656 final ValuesDelta child = state.getEntry(TEST_ID); in testTrimUpdateRemain()
728 final ValuesDelta child = state.getEntry(TEST_ID); in testTrimUpdateUpdate()
851 oldState.addEntry(ValuesDelta.fromAfter(mockNameValues)); in testMigrateWithDisplayNameFromGoogleToExchange1()
[all …]
DRawContactDeltaTests.java35 import com.android.contacts.common.model.ValuesDelta;
109 source.addEntry(ValuesDelta.fromAfter(phone)); in testParcelChangesInsert()
122 final ValuesDelta child = source.getEntry(TEST_PHONE_ID); in testParcelChangesUpdate()
136 final ValuesDelta child = source.getEntry(TEST_PHONE_ID); in testParcelChangesDelete()
149 final ValuesDelta values = ValuesDelta.fromBefore(before); in testValuesDiffDelete()
185 source.addEntry(ValuesDelta.fromAfter(phone)); in testEntityDiffNoneInsert()
228 source.addEntry(ValuesDelta.fromAfter(phone)); in testEntityDiffUpdateInsert()
270 final ValuesDelta child = source.getEntry(TEST_PHONE_ID); in testEntityDiffNoneUpdate()
332 final ValuesDelta values = ValuesDelta.fromAfter(after); in testEntityDiffInsert()
354 final ValuesDelta values = ValuesDelta.fromAfter(after); in testEntityDiffInsertInsert()
[all …]
DRawContactDeltaListTests.java37 import com.android.contacts.common.model.ValuesDelta;
115 final ValuesDelta values = ValuesDelta.fromAfter(after); in getInsert()
142 final RawContactDelta after = new RawContactDelta(ValuesDelta.fromAfter(contact)); in buildAfterEntity()
144 after.addEntry(ValuesDelta.fromAfter(entry)); in buildAfterEntity()
173 match.addEntry(ValuesDelta.fromAfter(values)); in insertPhone()
176 static ValuesDelta getPhone(RawContactDeltaList set, long rawContactId, long dataId) { in getPhone()
263 static ContentValues buildDataInsert(ValuesDelta values, long rawContactId) { in buildDataInsert()
273 static ContentProviderOperation buildOper(Uri uri, int type, ValuesDelta values) { in buildOper()
393 final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED); in testMergeDataLocalUpdateRemoteInsert()
418 final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED); in testMergeDataLocalUpdateRemoteDelete()
[all …]
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/model/
DValuesDeltaTests.java48 final ValuesDelta values = ValuesDelta.fromAfter(after); in testValuesDiffInsert()
68 final ValuesDelta values = ValuesDelta.fromBefore(before); in testValuesDiffNone()
80 final ValuesDelta values = ValuesDelta.fromBefore(before); in testValuesDiffUpdate()
/packages/apps/Contacts/src/com/android/contacts/activities/
DConfirmAddDetailActivity.java70 import com.android.contacts.common.model.ValuesDelta;
647 final RawContactDelta entityDelta = new RawContactDelta(ValuesDelta.fromAfter( in addEditableRawContact()
652 final ArrayList<ValuesDelta> readOnlyNames = in addEditableRawContact()
655 final ValuesDelta readOnlyName = readOnlyNames.get(0); in addEditableRawContact()
656 final ValuesDelta newName = RawContactModifier.ensureKindExists(entityDelta, in addEditableRawContact()
696 final ArrayList<ValuesDelta> deltas = mRawContactDelta.getMimeEntries(mMimetype); in bindEditor()
698 for (ValuesDelta valuesDelta : deltas) { in bindEditor()
716 …private void inflateEditorView(DataKind dataKind, ValuesDelta valuesDelta, RawContactDelta state) { in inflateEditorView()

12