/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | LegacyContactsProviderTest.java | 68 ContentValues values = new ContentValues(); in testPeopleInsert() local 69 putContactValues(values); in testPeopleInsert() 71 Uri uri = mResolver.insert(People.CONTENT_URI, values); in testPeopleInsert() 72 assertStoredValues(uri, values); in testPeopleInsert() 73 assertSelection(People.CONTENT_URI, values, "people", People._ID, ContentUris.parseId(uri)); in testPeopleInsert() 77 ContentValues values = new ContentValues(); in testPeopleUpdate() local 78 putContactValues(values); in testPeopleUpdate() 80 Uri uri = mResolver.insert(People.CONTENT_URI, values); in testPeopleUpdate() 82 assertStoredValues(uri, values); in testPeopleUpdate() 83 assertSelection(People.CONTENT_URI, values, "people", People._ID, personId); in testPeopleUpdate() [all …]
|
D | ContactsProvider2Test.java | 756 ContentValues values = new ContentValues(); in testRawContactsInsert() local 758 values.put(RawContacts.ACCOUNT_NAME, "a"); in testRawContactsInsert() 759 values.put(RawContacts.ACCOUNT_TYPE, "b"); in testRawContactsInsert() 760 values.put(RawContacts.DATA_SET, "ds"); in testRawContactsInsert() 761 values.put(RawContacts.SOURCE_ID, "c"); in testRawContactsInsert() 762 values.put(RawContacts.VERSION, 42); in testRawContactsInsert() 763 values.put(RawContacts.DIRTY, 1); in testRawContactsInsert() 764 values.put(RawContacts.DELETED, 1); in testRawContactsInsert() 765 values.put(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_DISABLED); in testRawContactsInsert() 766 values.put(RawContacts.CUSTOM_RINGTONE, "d"); in testRawContactsInsert() [all …]
|
D | BaseContactsProvider2Test.java | 175 ContentValues values = new ContentValues(); in updateItem() local 176 CommonDatabaseUtils.extrasVarArgsToValues(values, extras); in updateItem() 177 return mResolver.update(uri, values, null, null); in updateItem() 195 ContentValues values = new ContentValues(); in createGroup() local 196 values.put(Groups.SOURCE_ID, sourceId); in createGroup() 197 values.put(Groups.TITLE, title); in createGroup() 198 values.put(Groups.GROUP_VISIBLE, visible); in createGroup() 199 values.put(Groups.AUTO_ADD, autoAdd ? 1 : 0); in createGroup() 200 values.put(Groups.FAVORITES, favorite ? 1 : 0); in createGroup() 202 return ContentUris.parseId(mResolver.insert(uri, values)); in createGroup() [all …]
|
D | VoicemailProviderTest.java | 110 ContentValues values = new ContentValues(); in testUpdate() local 111 values.put(Voicemails.NUMBER, "1-800-263-7643"); in testUpdate() 112 values.put(Voicemails.DATE, 2000); in testUpdate() 113 values.put(Voicemails.DURATION, 40); in testUpdate() 114 values.put(Voicemails.STATE, 2); in testUpdate() 115 values.put(Voicemails.HAS_CONTENT, 1); in testUpdate() 116 values.put(Voicemails.SOURCE_DATA, "foo"); in testUpdate() 117 int count = mResolver.update(uri, values, null, null); in testUpdate() 119 assertStoredValues(uri, values); in testUpdate() 135 ContentValues values = getTestVoicemailValues(); in testGetType_ItemUri() local [all …]
|
D | CallLogProviderTest.java | 92 ContentValues values = getDefaultCallValues(); in testInsert_RegularCallRecord() local 93 Uri uri = mResolver.insert(Calls.CONTENT_URI, values); in testInsert_RegularCallRecord() 94 values.put(Calls.COUNTRY_ISO, "us"); in testInsert_RegularCallRecord() 95 assertStoredValues(uri, values); in testInsert_RegularCallRecord() 96 assertSelection(uri, values, Calls._ID, ContentUris.parseId(uri)); in testInsert_RegularCallRecord() 111 final ContentValues values = getDefaultCallValues(); in testInsert_VoicemailCallRecord() local 112 values.put(Calls.TYPE, Calls.VOICEMAIL_TYPE); in testInsert_VoicemailCallRecord() 113 values.put(Calls.VOICEMAIL_URI, "content://foo/voicemail/2"); in testInsert_VoicemailCallRecord() 119 mResolver.insert(Calls.CONTENT_URI, values); in testInsert_VoicemailCallRecord() 124 Uri uri = mResolver.insert(Calls.CONTENT_URI_WITH_VOICEMAIL, values); in testInsert_VoicemailCallRecord() [all …]
|
D | GroupsTest.java | 162 ContentValues values = new ContentValues(); in testMarkAsDirtyParameter() local 163 values.put(Groups.NOTES, "New notes"); in testMarkAsDirtyParameter() 164 mResolver.update(updateUri, values, null, null); in testMarkAsDirtyParameter() 173 ContentValues values = new ContentValues(); in testGroupDirtyClearedWhenSetExplicitly() local 174 values.put(Groups.DIRTY, 0); in testGroupDirtyClearedWhenSetExplicitly() 175 values.put(Groups.NOTES, "other notes"); in testGroupDirtyClearedWhenSetExplicitly() 176 assertEquals(1, mResolver.update(uri, values, null, null)); in testGroupDirtyClearedWhenSetExplicitly() 209 ContentValues values = new ContentValues(); in testGroupVersionUpdates() local 210 values.put(Groups.TITLE, "title2"); in testGroupVersionUpdates() 211 mResolver.update(uri, values, null, null); in testGroupVersionUpdates() [all …]
|
D | ContactsActor.java | 372 final ContentValues values = new ContentValues(); in createRawContact() local 374 Uri rawContactUri = resolver.insert(RawContacts.CONTENT_URI, values); in createRawContact() 388 final ContentValues values = new ContentValues(); in createName() local 389 values.put(Data.RAW_CONTACT_ID, contactId); in createName() 390 values.put(Data.IS_PRIMARY, 1); in createName() 391 values.put(Data.IS_SUPER_PRIMARY, 1); in createName() 392 values.put(Data.MIMETYPE, CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE); in createName() 393 values.put(CommonDataKinds.StructuredName.FAMILY_NAME, name); in createName() 396 Uri dataUri = resolver.insert(insertUri, values); in createName() 402 final ContentValues values = new ContentValues(); in createPhone() local [all …]
|
D | SearchIndexManagerTest.java | 55 ContentValues values = new ContentValues(); in testSearchIndexForStructuredName() local 56 values.put(StructuredName.DISPLAY_NAME, "Bob I. Parr"); in testSearchIndexForStructuredName() 57 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName() 58 values.clear(); in testSearchIndexForStructuredName() 59 values.put(StructuredName.PREFIX, "Mrs."); in testSearchIndexForStructuredName() 60 values.put(StructuredName.GIVEN_NAME, "Helen"); in testSearchIndexForStructuredName() 61 values.put(StructuredName.MIDDLE_NAME, "I."); in testSearchIndexForStructuredName() 62 values.put(StructuredName.FAMILY_NAME, "Parr"); in testSearchIndexForStructuredName() 63 values.put(StructuredName.SUFFIX, "PhD"); in testSearchIndexForStructuredName() 64 values.put(StructuredName.PHONETIC_FAMILY_NAME, "par"); in testSearchIndexForStructuredName() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarProvider2.java | 729 ContentValues values = new ContentValues(); in updateEventsStartEndLocked() local 730 values.put(Events.DTSTART, get2445ToMillis(timezone, dtStart2445)); in updateEventsStartEndLocked() 731 values.put(Events.DTEND, get2445ToMillis(timezone, dtEnd2445)); in updateEventsStartEndLocked() 733 int result = mDb.update(Tables.EVENTS, values, SQL_WHERE_ID, in updateEventsStartEndLocked() 737 Log.v(TAG, "Could not update Events table with values " + values); in updateEventsStartEndLocked() 1519 private boolean fixAllDayTime(ContentValues values, ContentValues modValues) { in fixAllDayTime() argument 1520 Integer allDayObj = values.getAsInteger(Events.ALL_DAY); in fixAllDayTime() 1527 Long dtstart = values.getAsLong(Events.DTSTART); in fixAllDayTime() 1528 Long dtend = values.getAsLong(Events.DTEND); in fixAllDayTime() 1529 String duration = values.getAsString(Events.DURATION); in fixAllDayTime() [all …]
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | LauncherProvider.java | 126 SQLiteDatabase db, String table, String nullColumnHack, ContentValues values) { in dbInsertAndCheck() argument 127 if (!values.containsKey(LauncherSettings.Favorites._ID)) { in dbInsertAndCheck() 130 return db.insert(table, nullColumnHack, values); in dbInsertAndCheck() 154 public int bulkInsert(Uri uri, ContentValues[] values) { in bulkInsert() argument 160 int numValues = values.length; in bulkInsert() 162 if (dbInsertAndCheck(mOpenHelper, db, args.table, null, values[i]) < 0) { in bulkInsert() 172 return values.length; in bulkInsert() 187 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 191 int count = db.update(args.table, values, args.where, args.args); in update() 373 ContentValues values = new ContentValues(c.getColumnCount()); in copyFromCursor() local [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadProvider.java | 332 ContentValues values = new ContentValues(); in fillNullValues() local 333 values.put(Downloads.Impl.COLUMN_CURRENT_BYTES, 0); in fillNullValues() 334 fillNullValuesForColumn(db, values); in fillNullValues() 335 values.put(Downloads.Impl.COLUMN_TOTAL_BYTES, -1); in fillNullValues() 336 fillNullValuesForColumn(db, values); in fillNullValues() 337 values.put(Downloads.Impl.COLUMN_TITLE, ""); in fillNullValues() 338 fillNullValuesForColumn(db, values); in fillNullValues() 339 values.put(Downloads.Impl.COLUMN_DESCRIPTION, ""); in fillNullValues() 340 fillNullValuesForColumn(db, values); in fillNullValues() 343 private void fillNullValuesForColumn(SQLiteDatabase db, ContentValues values) { in fillNullValuesForColumn() argument [all …]
|
/packages/apps/Contacts/src/com/android/contacts/model/ |
D | RawContactModifier.java | 395 ValuesDelta values = state.getValues(); in trimEmpty() local 396 final String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE); in trimEmpty() 397 final String dataSet = values.getAsString(RawContacts.DATA_SET); in trimEmpty() 409 ValuesDelta values = state.getValues(); in hasChanges() local 410 final String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE); in hasChanges() 411 final String dataSet = values.getAsString(RawContacts.DATA_SET); in hasChanges() 487 public static boolean isEmpty(ValuesDelta values, DataKind kind) { in isEmpty() argument 489 return values.isInsert() && values.getAsByteArray(Photo.PHOTO) == null; in isEmpty() 497 final String value = values.getAsString(field.column); in isEmpty() 596 ArrayList<ContentValues> values = extras.getParcelableArrayList(Insert.DATA); in parseExtras() local [all …]
|
/packages/apps/Calendar/src/com/android/calendar/event/ |
D | EditEventHelper.java | 305 ContentValues values = getContentValuesFromModel(model); in saveEvent() local 319 values.put(Events.HAS_ALARM, (len > 0) ? 1 : 0); in saveEvent() 323 values.put(Events.HAS_ATTENDEE_DATA, 1); in saveEvent() 324 values.put(Events.STATUS, Events.STATUS_CONFIRMED); in saveEvent() 327 Events.CONTENT_URI).withValues(values); in saveEvent() 333 checkTimeDependentFields(originalModel, model, values, modifyWhich); in saveEvent() 334 ops.add(ContentProviderOperation.newUpdate(uri).withValues(values).build()); in saveEvent() 339 ops.add(ContentProviderOperation.newUpdate(uri).withValues(values).build()); in saveEvent() 345 values.put(Events.ORIGINAL_SYNC_ID, originalModel.mSyncId); in saveEvent() 346 values.put(Events.ORIGINAL_INSTANCE_TIME, begin); in saveEvent() [all …]
|
/packages/apps/Browser/src/com/android/browser/provider/ |
D | BrowserProvider2.java | 482 ContentValues values = new ContentValues(); in enableSync() local 483 values.put(Settings.KEY, Settings.KEY_SYNC_ENABLED); in enableSync() 484 values.put(Settings.VALUE, 1); in enableSync() 485 insertSettingsInTransaction(db, values); in enableSync() 533 ContentValues values = new ContentValues(); in importFromBrowserProvider() local 534 values.put(Bookmarks.URL, url); in importFromBrowserProvider() 535 values.put(Bookmarks.TITLE, c.getString(1)); in importFromBrowserProvider() 536 values.put(Bookmarks.DATE_CREATED, c.getInt(4)); in importFromBrowserProvider() 537 values.put(Bookmarks.POSITION, 0); in importFromBrowserProvider() 538 values.put(Bookmarks.PARENT, FIXED_ID_ROOT); in importFromBrowserProvider() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | LegacyApiSupport.java | 779 public Uri insert(Uri uri, ContentValues values) { in insert() argument 785 id = insertPeople(values); in insert() 789 id = insertOrganization(values); in insert() 794 id = insertContactMethod(rawContactId, values); in insert() 799 long rawContactId = getRequiredValue(values, ContactMethods.PERSON_ID); in insert() 800 id = insertContactMethod(rawContactId, values); in insert() 805 long rawContactId = getRequiredValue(values, in insert() 807 id = insertPhone(rawContactId, values); in insert() 813 id = insertPhone(rawContactId, values); in insert() 818 long rawContactId = getRequiredValue(values, in insert() [all …]
|
D | DataRowHandlerForStructuredName.java | 48 ContentValues values) { in insert() argument 49 fixStructuredNameComponents(values, values); in insert() 51 long dataId = super.insert(db, txContext, rawContactId, values); in insert() 53 String name = values.getAsString(StructuredName.DISPLAY_NAME); in insert() 54 Integer fullNameStyle = values.getAsInteger(StructuredName.FULL_NAME_STYLE); in insert() 59 insertNameLookupForPhoneticName(rawContactId, dataId, values); in insert() 66 public boolean update(SQLiteDatabase db, TransactionContext txContext, ContentValues values, in update() argument 71 final ContentValues augmented = getAugmentedValues(db, dataId, values); in update() 76 fixStructuredNameComponents(augmented, values); in update() 78 super.update(db, txContext, values, c, callerIsSyncAdapter); in update() [all …]
|
/packages/apps/Dialer/tests/src/com/android/dialer/voicemail/ |
D | VoicemailStatusHelperImplTest.java | 102 ContentValues values = new ContentValues(); in testNotAllOKForOnePackage() local 106 values.put(NOTIFICATION_CHANNEL_STATE, NOTIFICATION_CHANNEL_STATE_NO_CONNECTION); in testNotAllOKForOnePackage() 107 values.put(DATA_CHANNEL_STATE, DATA_CHANNEL_STATE_OK); in testNotAllOKForOnePackage() 108 updateEntryForPackage(TEST_PACKAGES[1], values); in testNotAllOKForOnePackage() 109 checkExpectedMessage(TEST_PACKAGES[1], values, STATUS_MSG_VOICEMAIL_NOT_AVAILABLE, in testNotAllOKForOnePackage() 113 values.put(NOTIFICATION_CHANNEL_STATE, NOTIFICATION_CHANNEL_STATE_MESSAGE_WAITING); in testNotAllOKForOnePackage() 114 values.put(DATA_CHANNEL_STATE, DATA_CHANNEL_STATE_OK); in testNotAllOKForOnePackage() 115 updateEntryForPackage(TEST_PACKAGES[1], values); in testNotAllOKForOnePackage() 116 checkNoMessages(TEST_PACKAGES[1], values); in testNotAllOKForOnePackage() 121 values.put(NOTIFICATION_CHANNEL_STATE, NOTIFICATION_CHANNEL_STATE_OK); in testNotAllOKForOnePackage() [all …]
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | MmsProvider.java | 270 public Uri insert(Uri uri, ContentValues values) { in insert() argument 272 if (values != null && values.containsKey(Part._DATA)) { in insert() 286 Object msgBoxObj = values.getAsInteger(Mms.MESSAGE_BOX); in insert() 334 boolean addDate = !values.containsKey(Mms.DATE); in insert() 335 boolean addMsgBox = !values.containsKey(Mms.MESSAGE_BOX); in insert() 338 filterUnsupportedKeys(values); in insert() 342 finalValues = new ContentValues(values); in insert() 360 Long threadId = values.getAsLong(Mms.THREAD_ID); in insert() 361 String address = values.getAsString(CanonicalAddressesColumns.ADDRESS); in insert() 375 finalValues = new ContentValues(values); in insert() [all …]
|
D | TelephonyProvider.java | 559 ContentValues values; in insert() local 561 values = new ContentValues(initialValues); in insert() 563 values = new ContentValues(); in insert() 568 if (!values.containsKey(Telephony.Carriers.NAME)) { in insert() 569 values.put(Telephony.Carriers.NAME, ""); in insert() 571 if (!values.containsKey(Telephony.Carriers.APN)) { in insert() 572 values.put(Telephony.Carriers.APN, ""); in insert() 574 if (!values.containsKey(Telephony.Carriers.PORT)) { in insert() 575 values.put(Telephony.Carriers.PORT, ""); in insert() 577 if (!values.containsKey(Telephony.Carriers.PROXY)) { in insert() [all …]
|
/packages/providers/DownloadProvider/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/ |
D | PublicApiAccessTest.java | 70 ContentValues values = buildValidValues(); in testMaximalValidWrite() local 71 values.put(Downloads.Impl.COLUMN_TITLE, "foo"); in testMaximalValidWrite() 72 values.put(Downloads.Impl.COLUMN_DESCRIPTION, "foo"); in testMaximalValidWrite() 73 values.put(Downloads.Impl.COLUMN_MIME_TYPE, "foo"); in testMaximalValidWrite() 74 values.put(Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE, "foo"); in testMaximalValidWrite() 75 values.put(Downloads.Impl.COLUMN_ALLOWED_NETWORK_TYPES, 0); in testMaximalValidWrite() 76 values.put(Downloads.Impl.COLUMN_ALLOW_ROAMING, true); in testMaximalValidWrite() 77 values.put(Downloads.Impl.RequestHeaders.INSERT_KEY_PREFIX + "0", "X-Some-Header: value"); in testMaximalValidWrite() 78 mContentResolver.insert(Downloads.Impl.CONTENT_URI, values); in testMaximalValidWrite() 82 ContentValues values = new ContentValues(); in buildValidValues() local [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaProvider.java | 262 ContentValues values = new ContentValues(); 263 values.put(Files.FileColumns.DATA, ""); 267 db.update("files", values, where, whereArgs); 1885 ContentValues values = new ContentValues(); in updateBucketNames() local 1890 values.clear(); in updateBucketNames() 1891 computeBucketValues(data, values); in updateBucketNames() 1892 db.update("files", values, "_id=?", rowId); in updateBucketNames() 1922 ContentValues values = new ContentValues(); in updateDisplayName() local 1927 values.clear(); in updateDisplayName() 1928 computeDisplayName(data, values); in updateDisplayName() [all …]
|
/packages/apps/Dialer/tests/src/com/android/dialer/tests/calllog/ |
D | FillCallLogTestActivity.java | 131 ContentValues values = new ContentValues(); in createContentValuesFromCursor() local 137 values.put(name, cursor.getString(column)); in createContentValuesFromCursor() 140 values.put(name, cursor.getLong(column)); in createContentValuesFromCursor() 143 values.put(name, cursor.getDouble(column)); in createContentValuesFromCursor() 146 values.put(name, cursor.getBlob(column)); in createContentValuesFromCursor() 149 values.putNull(name); in createContentValuesFromCursor() 156 return values; in createContentValuesFromCursor() 160 ContentValues[] values = new ContentValues[count]; in addRandomNumbers() local 162 values[i] = new ContentValues(); in addRandomNumbers() 163 values[i].put(Calls.NUMBER, generateRandomNumber()); in addRandomNumbers() [all …]
|
/packages/apps/Contacts/tests/src/com/android/contacts/detail/ |
D | ContactDetailFragmentTests.java | 42 final ContentValues values = new ContentValues(); in testImIntent() local 43 values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE); in testImIntent() 44 values.put(Im.TYPE, Im.TYPE_HOME); in testImIntent() 45 values.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK); in testImIntent() 46 values.put(Im.DATA, TEST_ADDRESS); in testImIntent() 47 ImDataItem im = (ImDataItem) DataItem.createFrom(values); in testImIntent() 59 final ContentValues values = new ContentValues(); in testImIntentWithAudio() local 60 values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE); in testImIntentWithAudio() 61 values.put(Im.TYPE, Im.TYPE_HOME); in testImIntentWithAudio() 62 values.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK); in testImIntentWithAudio() [all …]
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/ |
D | EmailContent.java | 345 ContentValues values = new ContentValues(); in toContentValues() local 348 values.put(BodyColumns.MESSAGE_KEY, mMessageKey); in toContentValues() 349 values.put(BodyColumns.HTML_CONTENT, mHtmlContent); in toContentValues() 350 values.put(BodyColumns.TEXT_CONTENT, mTextContent); in toContentValues() 351 values.put(BodyColumns.HTML_REPLY, mHtmlReply); in toContentValues() 352 values.put(BodyColumns.TEXT_REPLY, mTextReply); in toContentValues() 353 values.put(BodyColumns.SOURCE_MESSAGE_KEY, mSourceKey); in toContentValues() 354 values.put(BodyColumns.INTRO_TEXT, mIntroText); in toContentValues() 355 return values; in toContentValues() 407 ContentValues values) { in updateBodyWithMessageId() argument [all …]
|
/packages/apps/Browser/tests/src/com/android/browser/tests/utils/ |
D | BP2TestCaseHelper.java | 126 Uri mockInsert(Uri uri, ContentValues values) { in mockInsert() argument 128 Uri ret = getMockContentResolver().insert(uri, values); in mockInsert() 133 int mockUpdate(Uri uri, ContentValues values, String where, in mockUpdate() argument 136 int ret = getMockContentResolver().update(uri, values, where, selectionArgs); in mockUpdate() 147 ContentValues values = new ContentValues(); in insertBookmark() local 148 values.put(BrowserContract.Bookmarks.TITLE, title); in insertBookmark() 149 values.put(BrowserContract.Bookmarks.URL, url); in insertBookmark() 150 values.put(BrowserContract.Bookmarks.IS_FOLDER, 0); in insertBookmark() 151 return insertBookmark(values); in insertBookmark() 154 public Uri insertBookmark(ContentValues values) { in insertBookmark() argument [all …]
|