Lines Matching refs:values

59             ContentValues values) {
61 if (values.containsKey(SKIP_PROCESSING_KEY)) {
62 values.remove(SKIP_PROCESSING_KEY);
65 if (!preProcessPhoto(values)) {
70 long dataId = super.insert(db, txContext, rawContactId, values);
78 public boolean update(SQLiteDatabase db, TransactionContext txContext, ContentValues values,
82 if (values.containsKey(SKIP_PROCESSING_KEY)) {
83 values.remove(SKIP_PROCESSING_KEY);
86 if (!preProcessPhoto(values)) {
92 if (!super.update(db, txContext, values, c, callerIsSyncAdapter, callerIsMetadataSyncAdapter)) {
101 * Pre-processes the given content values for update or insert. If the photo column contains
104 * @param values The content values passed in.
107 private boolean preProcessPhoto(ContentValues values) {
108 if (values.containsKey(Photo.PHOTO)) {
109 boolean photoExists = hasNonNullPhoto(values);
111 if (!processPhoto(values)) {
118 values.putNull(Photo.PHOTO);
119 values.putNull(Photo.PHOTO_FILE_ID);
125 private boolean hasNonNullPhoto(ContentValues values) {
126 byte[] photoBytes = values.getAsByteArray(Photo.PHOTO);
139 * Reads the photo out of the given values object and processes it, placing the processed
142 * @param values The values being inserted or updated - assumed to contain a photo BLOB.
145 private boolean processPhoto(ContentValues values) {
146 byte[] originalPhoto = values.getAsByteArray(Photo.PHOTO);
153 values.put(Photo.PHOTO_FILE_ID, photoFileId);
155 values.putNull(Photo.PHOTO_FILE_ID);
157 values.put(Photo.PHOTO, processor.getThumbnailPhotoBytes());