Code example for ContentValues

Methods: getAsByteArray

0
        } 
        return true; 
    } 
 
    private boolean hasNonNullPhoto(ContentValues values) {
        byte[] photoBytes = values.getAsByteArray(Photo.PHOTO);
        return photoBytes != null && photoBytes.length > 0;
    } 
 
    @Override 
    public int delete(SQLiteDatabase db, TransactionContext txContext, Cursor c) {
        long rawContactId = c.getLong(DataDeleteQuery.RAW_CONTACT_ID);
        int count = super.delete(db, txContext, c);
        mContactAggregator.updatePhotoId(db, rawContactId);
        return count;
    } 
 
    /** 
     * Reads the photo out of the given values object and processes it, placing the processed 
     * photos (a photo store file ID and a compressed thumbnail) back into the ContentValues 
     * object.