Home
last modified time | relevance | path

Searched refs:cv (Results 1 – 25 of 66) sorted by relevance

123

/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
DCellBroadcastProviderTest.java100 ContentValues cv = fakeCellBroadcast(); in testUpdate() local
101 Uri uri = mContentResolver.insert(CONTENT_URI, cv); in testUpdate()
105 int messageDisplayed = 1 - cv.getAsInteger(CellBroadcasts.MESSAGE_DISPLAYED); in testUpdate()
107 cv.put(CellBroadcasts.MESSAGE_DISPLAYED, messageDisplayed); in testUpdate()
108 cv.put(CellBroadcasts.RECEIVED_TIME, receivedTime); in testUpdate()
109 mContentResolver.update(CONTENT_URI, cv, SELECT_BY_ID, in testUpdate()
126 ContentValues cv = fakeCellBroadcast(); in testUpdate_WithoutWritePermission_fail() local
127 Uri uri = mContentResolver.insert(CONTENT_URI, cv); in testUpdate_WithoutWritePermission_fail()
134 mContentResolver.update(CONTENT_URI, cv, SELECT_BY_ID, in testUpdate_WithoutWritePermission_fail()
146 ContentValues cv = fakeCellBroadcast(); in testGetAllCellBroadcast() local
[all …]
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastContentProvider.java254 ContentValues cv = new ContentValues(); in getContentValues() local
255 cv.put(Telephony.CellBroadcasts.SLOT_INDEX, message.getSlotIndex()); in getContentValues()
256 cv.put(Telephony.CellBroadcasts.GEOGRAPHICAL_SCOPE, message.getGeographicalScope()); in getContentValues()
258 cv.put(Telephony.CellBroadcasts.PLMN, location.getPlmn()); in getContentValues()
260 cv.put(Telephony.CellBroadcasts.LAC, location.getLac()); in getContentValues()
263 cv.put(Telephony.CellBroadcasts.CID, location.getCid()); in getContentValues()
265 cv.put(Telephony.CellBroadcasts.SERIAL_NUMBER, message.getSerialNumber()); in getContentValues()
266 cv.put(Telephony.CellBroadcasts.SERVICE_CATEGORY, message.getServiceCategory()); in getContentValues()
267 cv.put(Telephony.CellBroadcasts.LANGUAGE_CODE, message.getLanguageCode()); in getContentValues()
268 cv.put(Telephony.CellBroadcasts.MESSAGE_BODY, message.getMessageBody()); in getContentValues()
[all …]
/packages/modules/Connectivity/tests/cts/net/util/java/android/net/cts/util/
DCtsTetheringUtils.java107 final CallbackValue cv = mHistory.poll(TIMEOUT_MS, c -> true); in verifyTetheringStarted() local
108 assertNotNull("No onTetheringStarted after " + TIMEOUT_MS + " ms", cv); in verifyTetheringStarted()
109 assertTrue("Fail start tethering:" + cv, in verifyTetheringStarted()
110 cv instanceof CallbackValue.OnTetheringStarted); in verifyTetheringStarted()
114 final CallbackValue cv = mHistory.poll(TIMEOUT_MS, c -> true); in expectTetheringFailed() local
115 assertNotNull("No onTetheringFailed after " + TIMEOUT_MS + " ms", cv); in expectTetheringFailed()
116 assertTrue("Expect fail with error code " + expected + ", but received: " + cv, in expectTetheringFailed()
117 (cv instanceof CallbackValue.OnTetheringFailed) && (cv.error == expected)); in expectTetheringFailed()
276 (cv) -> { in expectTetherableInterfacesChanged()
277 if (cv.callbackType != CallbackType.ON_TETHERABLE_IFACES) return false; in expectTetherableInterfacesChanged()
[all …]
/packages/modules/StatsD/statsd/tests/utils/
DMultiConditionTrigger_test.cpp40 condition_variable cv; in TEST() local
44 MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] { in TEST()
49 cv.notify_all(); in TEST()
66 cv.wait(unique_lk, [&triggerCalled] { in TEST()
81 condition_variable cv; in TEST() local
84 MultiConditionTrigger trigger({}, [&lock, &cv, &triggerCalled] { in TEST()
89 cv.notify_all(); in TEST()
93 cv.wait(unique_lk, [&triggerCalled] { return triggerCalled; }); in TEST()
103 condition_variable cv; in TEST() local
106 MultiConditionTrigger trigger(conditionNames, [&lock, &cv, &triggerCalled] { in TEST()
[all …]
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DCarrierIdProvider.java384 ContentValues cv; in updateDatabaseFromPb()
392 cv = new ContentValues(); in updateDatabaseFromPb()
393 cv.put(CarrierId.CARRIER_ID, id.canonicalId); in updateDatabaseFromPb()
394 cv.put(CarrierId.CARRIER_NAME, id.carrierName); in updateDatabaseFromPb()
398 cv.put(CarrierId.PARENT_CARRIER_ID, id.parentCanonicalId); in updateDatabaseFromPb()
401 convertCarrierAttrToContentValues(cv, cvs, attr, 0); in updateDatabaseFromPb()
432 private void convertCarrierAttrToContentValues(ContentValues cv, List<ContentValues> cvs, in convertCarrierAttrToContentValues() argument
435 ContentValues carrier = new ContentValues(cv); in convertCarrierAttrToContentValues()
444 cv.put(CarrierId.All.MCCMNC, str); in convertCarrierAttrToContentValues()
445 convertCarrierAttrToContentValues(cv, cvs, attr, index + 1); in convertCarrierAttrToContentValues()
[all …]
DTelephonyProvider.java916 ContentValues cv = new ContentValues(); in initDatabase() local
917 cv.put(EDITED_STATUS, USER_DELETED); in initDatabase()
918 db.update(CARRIERS_TABLE, cv, IS_USER_DELETED_BUT_PRESENT_IN_XML, null); in initDatabase()
921 cv = new ContentValues(); in initDatabase()
922 cv.put(EDITED_STATUS, CARRIER_DELETED); in initDatabase()
923 db.update(CARRIERS_TABLE, cv, IS_CARRIER_DELETED_BUT_PRESENT_IN_XML, null); in initDatabase()
1845 ContentValues cv = new ContentValues(); in copySimInfoDataToTmpTable() local
1846 copySimInfoValuesV24(cv, c); in copySimInfoDataToTmpTable()
1853 getCardIdfromIccid(cv, c); in copySimInfoDataToTmpTable()
1855 db.insert(SIMINFO_TABLE_TMP, null, cv); in copySimInfoDataToTmpTable()
[all …]
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/
DBlockedNumberProviderTest.java92 private static ContentValues cv(Object... namesAndValues) { in cv() method in BlockedNumberProviderTest
132 insertExpectingFailure(cv()); in testInsert()
133 insertExpectingFailure(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, null)); in testInsert()
134 insertExpectingFailure(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, "")); in testInsert()
135 insertExpectingFailure(cv(BlockedNumbers.COLUMN_ID, 1)); in testInsert()
136 insertExpectingFailure(cv(BlockedNumbers.COLUMN_E164_NUMBER, "1")); in testInsert()
138 insert(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, "123")); in testInsert()
139 insert(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, "+1-2-3")); in testInsert()
140 insert(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, "+1-408-454-1111")); in testInsert()
141 insert(cv(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, "1-408-454-2222")); in testInsert()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/model/
DContactLoader.java471 ContentValues cv = new ContentValues(); in loadRawContactValues() local
473 cv.put(RawContacts._ID, cursor.getLong(ContactQuery.RAW_CONTACT_ID)); in loadRawContactValues()
475 cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_NAME); in loadRawContactValues()
476 cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_TYPE); in loadRawContactValues()
477 cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SET); in loadRawContactValues()
478 cursorColumnToContentValues(cursor, cv, ContactQuery.DIRTY); in loadRawContactValues()
479 cursorColumnToContentValues(cursor, cv, ContactQuery.VERSION); in loadRawContactValues()
480 cursorColumnToContentValues(cursor, cv, ContactQuery.SOURCE_ID); in loadRawContactValues()
481 cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC1); in loadRawContactValues()
482 cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC2); in loadRawContactValues()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/
DContactLoader.java620 ContentValues cv = new ContentValues(); in loadRawContactValues() local
622 cv.put(RawContacts._ID, cursor.getLong(ContactQuery.RAW_CONTACT_ID)); in loadRawContactValues()
624 cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_NAME); in loadRawContactValues()
625 cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_TYPE); in loadRawContactValues()
626 cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SET); in loadRawContactValues()
627 cursorColumnToContentValues(cursor, cv, ContactQuery.DIRTY); in loadRawContactValues()
628 cursorColumnToContentValues(cursor, cv, ContactQuery.VERSION); in loadRawContactValues()
629 cursorColumnToContentValues(cursor, cv, ContactQuery.SOURCE_ID); in loadRawContactValues()
630 cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC1); in loadRawContactValues()
631 cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC2); in loadRawContactValues()
[all …]
/packages/apps/Gallery2/jni/filters/
Dhsv.c94 short cv = hsv[hsvOff+0]; in hsv2rgb() local
101 m = ((int)cv*(k1 - (int)cs ))/k1; in hsv2rgb()
105 rb = ( rg = ( rr =( cv >> ABITS) )); in hsv2rgb()
109 iv=(int)cv; in hsv2rgb()
119 cv=(short) (cv >> ABITS); in hsv2rgb()
122 rr = cv; in hsv2rgb()
128 rg = cv; in hsv2rgb()
133 rg = cv; in hsv2rgb()
139 rb = cv; in hsv2rgb()
144 rb = cv; in hsv2rgb()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DExternalDbFacadeTest.java437 ContentValues cv = getContentValues(DATE_TAKEN_MS2, GENERATION_MODIFIED1); in testQueryMedia_match() local
438 helper.runWithTransaction(db -> db.insert(TABLE_FILES, null, cv)); in testQueryMedia_match()
440 cv.put(MediaColumns.DATE_TAKEN, DATE_TAKEN_MS1); in testQueryMedia_match()
441 cv.put(MediaColumns.GENERATION_MODIFIED, GENERATION_MODIFIED2); in testQueryMedia_match()
442 helper.runWithTransaction(db -> db.insert(TABLE_FILES, null, cv)); in testQueryMedia_match()
498 ContentValues cv = getContentValues(DATE_TAKEN_MS2, GENERATION_MODIFIED1); in testQueryMedia_withDateModified() local
499 cv.remove(MediaColumns.DATE_TAKEN); in testQueryMedia_withDateModified()
500 cv.put(MediaColumns.DATE_MODIFIED, dateModifiedSeconds2); in testQueryMedia_withDateModified()
501 helper.runWithTransaction(db -> db.insert(TABLE_FILES, null, cv)); in testQueryMedia_withDateModified()
503 cv.put(MediaColumns.DATE_MODIFIED, dateModifiedSeconds1); in testQueryMedia_withDateModified()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/test/
Dposix_socket_unittest.cc79 std::condition_variable cv; in connectPair() local
88 cv.notify_all(); in connectPair()
98 cv.wait_for(lk, timeout, [&] { return sock1.get() != nullptr; })); in connectPair()
192 std::condition_variable cv; in TEST_F() local
204 cv.notify_all(); in TEST_F()
214 ASSERT_TRUE(cv.wait_for(lk, 250ms, [&] { return received; })); in TEST_F()
242 std::condition_variable cv; in TEST_F() local
252 cv.notify_all(); in TEST_F()
261 ASSERT_TRUE(cv.wait_for(lk, 250ms, [&] { return connected; })); in TEST_F()
271 std::condition_variable cv; in TEST_F() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/apn/
DApnEditorTest.java164 final ContentValues cv = new ContentValues(); in testSetStringValue_valueChanged_shouldSetValue() local
168 cv, apnKey, apnValue, false /* assumeDiff */, ApnEditor.APN_INDEX); in testSetStringValue_valueChanged_shouldSetValue()
173 assertThat(apnValue).isEqualTo(cv.getAsString(apnKey)); in testSetStringValue_valueChanged_shouldSetValue()
181 final ContentValues cv = new ContentValues(); in testSetStringValue_valueNotChanged_shouldNotSetValue() local
185 cv, apnKey, apnValue, false /* assumeDiff */, ApnEditor.APN_INDEX); in testSetStringValue_valueNotChanged_shouldNotSetValue()
190 assertThat(cv.get(apnKey)).isNull(); in testSetStringValue_valueNotChanged_shouldNotSetValue()
198 final ContentValues cv = new ContentValues(); in testSetStringValue_nullValue_shouldNotSetValue_shouldNotSetValue() local
202 cv, apnKey, apnValue, false /* assumeDiff */, ApnEditor.APN_INDEX); in testSetStringValue_nullValue_shouldNotSetValue_shouldNotSetValue()
207 assertThat(cv.get(apnKey)).isNull(); in testSetStringValue_nullValue_shouldNotSetValue_shouldNotSetValue()
216 final ContentValues cv = new ContentValues(); in testSetIntValue_valueChanged_shouldSetValue() local
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DDataRowHandlerForStructuredName.java47 private void applySimpleFieldMaxSize(ContentValues cv) { in applySimpleFieldMaxSize() argument
48 applySimpleFieldMaxSize(cv, StructuredName.DISPLAY_NAME); in applySimpleFieldMaxSize()
49 applySimpleFieldMaxSize(cv, StructuredName.GIVEN_NAME); in applySimpleFieldMaxSize()
50 applySimpleFieldMaxSize(cv, StructuredName.FAMILY_NAME); in applySimpleFieldMaxSize()
51 applySimpleFieldMaxSize(cv, StructuredName.PREFIX); in applySimpleFieldMaxSize()
52 applySimpleFieldMaxSize(cv, StructuredName.MIDDLE_NAME); in applySimpleFieldMaxSize()
53 applySimpleFieldMaxSize(cv, StructuredName.SUFFIX); in applySimpleFieldMaxSize()
55 applySimpleFieldMaxSize(cv, StructuredName.PHONETIC_GIVEN_NAME); in applySimpleFieldMaxSize()
56 applySimpleFieldMaxSize(cv, StructuredName.PHONETIC_MIDDLE_NAME); in applySimpleFieldMaxSize()
57 applySimpleFieldMaxSize(cv, StructuredName.PHONETIC_FAMILY_NAME); in applySimpleFieldMaxSize()
/packages/services/Car/cpp/vhal/client/src/
DIVhalClient.cpp64 std::condition_variable cv; in getValueSync() member
75 s.cv.notify_one(); in getValueSync()
82 s.cv.wait(lk, [&s] { return s.gotResult; }); in getValueSync()
90 std::condition_variable cv; in setValueSync() member
100 s.cv.notify_one(); in setValueSync()
107 s.cv.wait(lk, [&s] { return s.gotResult; }); in setValueSync()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DSqlInjectionDetectionTest.java20 import static com.android.providers.contacts.TestUtils.cv;
143 mResolver.update(Data.CONTENT_URI, cv(), ";delete from contacts;--", null); in testBadUpdate()
147 mResolver.update(Data.CONTENT_URI, cv(), "_id in data_usage_stat", null); in testBadUpdate()
150 mResolver.update(Data.CONTENT_URI, cv("_id/**/", 1), null, null); in testBadUpdate()
153 mResolver.update(Data.CONTENT_URI, cv("[data1]", 1), null, null); in testBadUpdate()
160 mResolver.insert(Data.CONTENT_URI, cv("_id/**/", 1)); in testBadInsert()
DContactsProvider2TransactionTest.java19 import static com.android.providers.contacts.TestUtils.cv;
63 final ContentValues values = cv(RawContacts.LAST_TIME_CONTACTED, 86400); in testTransactionCallback_insert()
90 final ContentValues values = cv(RawContacts.LAST_TIME_CONTACTED, 86400); in testTransactionCallback_update()
124 final ContentValues values = cv(RawContacts.LAST_TIME_CONTACTED, 86400); in testTransactionCallback_delete()
153 final ContentValues values = cv(RawContacts.LAST_TIME_CONTACTED, 86400); in testTransactionCallback_bulkInsert()
198 assertStoredValues(Contacts.CONTENT_URI, cv( in checkStoredContact()
228 assertStoredValues(Profile.CONTENT_URI, cv( in checkStoredProfile()
DContactsDatabaseHelperUpgradeTest.java19 import static com.android.providers.contacts.TestUtils.cv;
153 cv(Contacts._ID, 1, in upgradeTo1201()
159 cv( in upgradeTo1201()
169 cv("_id", 1, in upgradeTo1201()
175 cv( in upgradeTo1201()
185 cv( in upgradeTo1201()
207 cv(Contacts._ID, 1, in upgradeTo1600()
214 cv(Contacts._ID, 2, in upgradeTo1600()
221 cv(Contacts._ID, 3, in upgradeTo1600()
228 cv(Contacts._ID, 4, in upgradeTo1600()
[all …]
DContactsProvider2Test.java19 import static com.android.providers.contacts.TestUtils.cv;
1651 cv(Phone.NUMBER, "1234", Phone.NORMALIZED_NUMBER, "5678") in testPhonesNormalizedNumber()
1669 cv(Phone.NUMBER, "4321", Phone.NORMALIZED_NUMBER, "8765") in testPhonesNormalizedNumber()
1685 cv(Phone.NUMBER, "+1-800-466-5432", Phone.NORMALIZED_NUMBER, "+18004665432") in testPhonesNormalizedNumber()
1700 cv(Phone.NUMBER, "+1-800-466-5432", Phone.NORMALIZED_NUMBER, "+18004665432") in testPhonesNormalizedNumber()
1716 cv(Phone.NUMBER, "888", Phone.NORMALIZED_NUMBER, "999") in testPhonesNormalizedNumber()
1728 cv(Phone.NUMBER, "1", Phone.NORMALIZED_NUMBER, null) in testPhonesNormalizedNumber()
1852 cv(Phone.DISPLAY_NAME, "Dad", Phone.NUMBER, "123-456-7890"), in testPhonesFilterSearchParams()
1853 cv(Phone.DISPLAY_NAME, "Mam", Phone.NUMBER, "323-123-4567") in testPhonesFilterSearchParams()
1859 cv(Phone.DISPLAY_NAME, "Dad", Phone.NUMBER, "123-456-7890") in testPhonesFilterSearchParams()
[all …]
/packages/providers/UserDictionaryProvider/src/com/android/providers/userdictionary/
DDictionaryBackupAgent.java193 ContentValues cv = new ContentValues(2); in restoreDictionary() local
253 cv.clear(); in restoreDictionary()
254 cv.put(Words.WORD, word); in restoreDictionary()
255 cv.put(Words.FREQUENCY, frequencyInt); in restoreDictionary()
256 cv.put(Words.LOCALE, locale); in restoreDictionary()
257 cv.put(Words.APP_ID, appidInt); in restoreDictionary()
258 cv.put(Words.SHORTCUT, shortcut); in restoreDictionary()
267 getContentResolver().insert(contentUri, cv); in restoreDictionary()
/packages/services/Car/cpp/vhal/client/test/
DAidlVhalClientTest.cpp321 std::condition_variable cv; in TEST_F() local
328 [&lock, &cv, resultPtr, gotResultPtr](VhalResult<std::unique_ptr<IHalPropValue>> r) { in TEST_F()
334 cv.notify_one(); in TEST_F()
339 cv.wait_for(lk, std::chrono::milliseconds(1000), [&gotResult] { return gotResult; }); in TEST_F()
410 std::condition_variable cv; in TEST_F() local
417 [&lock, &cv, resultPtr, gotResultPtr](VhalResult<std::unique_ptr<IHalPropValue>> r) { in TEST_F()
423 cv.notify_one(); in TEST_F()
428 cv.wait_for(lk, std::chrono::milliseconds(1000), [&gotResult] { return gotResult; }); in TEST_F()
548 std::condition_variable cv; in TEST_F() local
555 [&lock, &cv, resultPtr, gotResultPtr](VhalResult<void> r) { in TEST_F()
[all …]
/packages/modules/StatsD/statsd/src/external/
DStatsCallbackPuller.cpp54 shared_ptr<condition_variable> cv = make_shared<condition_variable>(); in PullInternal() local
61 [cv_mutex, cv, pullFinish, pullSuccess, sharedData]( in PullInternal()
82 cv->notify_one(); in PullInternal()
100 cv->wait_for(unique_lk, chrono::nanoseconds(mPullTimeoutNs), in PullInternal()
/packages/providers/TelephonyProvider/tests/src/com/android/providers/telephony/
DCarrierIdProviderTest.java339 ContentValues cv = new ContentValues(); in testUpdateCurrentSubscription() local
340 cv.put(CarrierId.CARRIER_ID, test_cid); in testUpdateCurrentSubscription()
341 cv.put(CarrierId.CARRIER_NAME, test_name); in testUpdateCurrentSubscription()
344 "1"), cv, null, null); in testUpdateCurrentSubscription() local
412 ContentValues cv = new ContentValues(); in testUpdateCurrentSubscription_WrongURI() local
413 cv.put(CarrierId.CARRIER_ID, test_cid); in testUpdateCurrentSubscription_WrongURI()
414 cv.put(CarrierId.CARRIER_NAME, test_name); in testUpdateCurrentSubscription_WrongURI()
415 mContext.getContentResolver().update(CarrierId.CONTENT_URI, cv, null, null); in testUpdateCurrentSubscription_WrongURI()
/packages/modules/adb/fdevent/
Dfdevent_test.h37 std::condition_variable cv; in WaitForFdeventLoop() local
42 cv.notify_one(); in WaitForFdeventLoop()
44 cv.wait(lock); in WaitForFdeventLoop()
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/
DBlockedNumberProvider.java150 private Uri insertBlockedNumber(ContentValues cv) { in insertBlockedNumber() argument
151 throwIfSpecified(cv, BlockedNumberContract.BlockedNumbers.COLUMN_ID); in insertBlockedNumber()
153 final String phoneNumber = cv.getAsString( in insertBlockedNumber()
163 cv.getAsString(BlockedNumberContract.BlockedNumbers.COLUMN_E164_NUMBER)); in insertBlockedNumber()
164 cv.put(BlockedNumberContract.BlockedNumbers.COLUMN_E164_NUMBER, e164Number); in insertBlockedNumber()
167 Log.d(TAG, String.format("inserted blocked number: %s", cv)); in insertBlockedNumber()
172 BlockedNumberDatabaseHelper.Tables.BLOCKED_NUMBERS, null, cv, in insertBlockedNumber()
178 private static void throwIfSpecified(ContentValues cv, String column) { in throwIfSpecified() argument
179 if (cv.containsKey(column)) { in throwIfSpecified()

123