Bug 850430 - Treat key as an array on the Android contacts backend. r=me

--HG--
extra : rebase_source : fa9b1bc125ea0dab8f86d82568c7422da27d556a
This commit is contained in:
Reuben Morais 2013-10-18 03:11:11 -03:00
Родитель a5312198ca
Коммит f53379b3da
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -513,7 +513,7 @@ public class ContactService implements GeckoEventListener {
String anniversary = null;
String sex = null;
String genderIdentity = null;
String key = null;
JSONArray key = new JSONArray();
// Get all the data columns
final String[] columnsToGet = getAllColumns();
@ -614,7 +614,7 @@ public class ContactService implements GeckoEventListener {
genderIdentity = cursor.getString(cursor.getColumnIndex(CUSTOM_DATA_COLUMN));
} else if (MIMETYPE_KEY.equals(mimeType)) {
key = cursor.getString(cursor.getColumnIndex(CUSTOM_DATA_COLUMN));
key.put(cursor.getString(cursor.getColumnIndex(CUSTOM_DATA_COLUMN)));
}
} catch (JSONException e) {
throw new IllegalArgumentException(e);
@ -640,12 +640,12 @@ public class ContactService implements GeckoEventListener {
contactProperties.put("url", urls);
contactProperties.put("impp", impps);
contactProperties.put("category", categories);
contactProperties.put("key", key);
putPossibleNullValueInJSONObject("bday", bday, contactProperties);
putPossibleNullValueInJSONObject("anniversary", anniversary, contactProperties);
putPossibleNullValueInJSONObject("sex", sex, contactProperties);
putPossibleNullValueInJSONObject("genderIdentity", genderIdentity, contactProperties);
putPossibleNullValueInJSONObject("key", key, contactProperties);
// Add the raw contact ID and the properties to the contact
contact.put("id", String.valueOf(rawContactId));