Skip to content

Commit 8f643c1

Browse files
author
Marc Blank
committed
Expose _id in ExtendedProperties subValues
* ExtendedValues' "name" and "value" columns are exposed in Entry entity subvalues, but it is clumsy to change a value, as the _id of the ExtendedValues row isn't also exposed. (We otherwise have to perform a potentially slow query) * This CL adds the _id column to the columns exposed Bug: 2638762 Change-Id: Iaffeffed620af78439f5f73aa5f3257b0f8a0fd0
1 parent b40c42f commit 8f643c1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/java/android/provider/Calendar.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,13 @@ private static class EntityIteratorImpl extends CursorEntityIterator {
638638
private static final int COLUMN_ATTENDEE_TYPE = 3;
639639
private static final int COLUMN_ATTENDEE_STATUS = 4;
640640
private static final String[] EXTENDED_PROJECTION = new String[] {
641+
ExtendedProperties._ID,
641642
ExtendedProperties.NAME,
642-
ExtendedProperties.VALUE,
643+
ExtendedProperties.VALUE
643644
};
644-
private static final int COLUMN_NAME = 0;
645-
private static final int COLUMN_VALUE = 1;
645+
private static final int COLUMN_ID = 0;
646+
private static final int COLUMN_NAME = 1;
647+
private static final int COLUMN_VALUE = 2;
646648

647649
private static final String WHERE_EVENT_ID = "event_id=?";
648650

@@ -772,6 +774,8 @@ public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException
772774
try {
773775
while (subCursor.moveToNext()) {
774776
ContentValues extendedValues = new ContentValues();
777+
extendedValues.put(ExtendedProperties._ID,
778+
subCursor.getString(COLUMN_ID));
775779
extendedValues.put(ExtendedProperties.NAME,
776780
subCursor.getString(COLUMN_NAME));
777781
extendedValues.put(ExtendedProperties.VALUE,

0 commit comments

Comments
 (0)