Home
last modified time | relevance | path

Searched refs:getCount (Results 1 – 25 of 508) sorted by relevance

12345678910>>...21

/packages/apps/Messaging/src/com/android/messaging/ui/
DCompositeAdapter.java55 public int getCount() { in getCount() method in CompositeAdapter.Partition
56 int count = mAdapter.getCount(); in getCount()
147 final int end = start + mPartitions[i].getCount(); in getPartitionAtPosition()
151 (mPartitions[i].getCount() > 0 || mPartitions[i].showIfEmpty())) { in getPartitionAtPosition()
178 mCount += mPartitions[i].getCount(); in ensureCacheValid()
183 public int getCount() { in getCount() method in CompositeAdapter
188 public int getCount(final int index) { in getCount() method in CompositeAdapter
190 return mPartitions[index].getCount(); in getCount()
198 final int end = start + mPartitions[i].getCount(); in getItem()
203 (partition.getCount() > 0 || partition.showIfEmpty())) { in getItem()
[all …]
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/
DSearchCursorManager.java86 if (cursor != null && cursor.getCount() > 0) { in setContactsCursor()
102 if (cursor != null && cursor.getCount() > 0) { in setNearbyPlacesCursor()
118 if (cursor != null && cursor.getCount() > 0) { in setCorpDirectoryCursor()
133 int getCount() { in getCount() method in SearchCursorManager
136 count += contactsCursor.getCount(); in getCount()
141 count += nearbyPlacesCursor.getCount(); in getCount()
146 count += corpDirectoryCursor.getCount(); in getCount()
155 position -= contactsCursor.getCount(); in getRowType()
169 position -= nearbyPlacesCursor.getCount(); in getRowType()
183 position -= corpDirectoryCursor.getCount(); in getRowType()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/history/
DHistoryManager.java40 private int getCount() { in getCount() method in HistoryManager
64 if (getCount() <= 0) { in canReset()
71 if (mCurrentPresetPosition == getCount() - 1) { in canUndo()
111 if (getCount() == 0) { in reset()
119 if (getCount() == 0) { in getLast()
138 for (int i = mCurrentPresetPosition; i < getCount(); i++) { in insert()
165 if (mCurrentPresetPosition >= getCount()) { in undo()
166 mCurrentPresetPosition = getCount() - 1; in undo()
/packages/apps/Contacts/tests/src/com/android/contacts/widget/
DCompositeListAdapterTest.java119 assertEquals(5, adapter.getCount()); in testGetCount()
124 assertEquals(0, adapter.getCount()); in testGetCountWithInvalidation()
127 assertEquals(2, adapter.getCount()); in testGetCountWithInvalidation()
130 assertEquals(2, adapter.getCount()); in testGetCountWithInvalidation()
133 assertEquals(5, adapter.getCount()); in testGetCountWithInvalidation()
223 assertEquals(3, adapter.getCount()); in testNotifyDataSetChangedPropagated()
231 assertEquals(4, adapter.getCount()); in testNotifyDataSetChangedPropagated()
249 assertEquals(5, adapter.getCount()); in testNotifyDataSetChangedOnAddingAdapter()
267 assertEquals(1, adapter.getCount()); in testNotifyDataSetInvalidated()
272 assertEquals(0, adapter.getCount()); in testNotifyDataSetInvalidated()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DSuggestionCursorUtil.java40 assertEquals(message, 0, suggestions.getCount()); in assertNoSuggestions()
66 assertEquals(message + ", count", expected.getCount(), observed.getCount()); in assertSameSuggestions()
68 int count = expected.getCount(); in assertSameSuggestions()
113 return cursor.getPosition() < cursor.getCount() - 1;
127 return slice(cursor, start, cursor.getCount() - start);
141 for (int i = 0; i < cursor.getCount(); i++) {
192 int count = from.getCount();
218 assertTrue(message + ", no suggestions", observed.getCount() > 0);
219 for (int i = 0; i < observed.getCount(); ++i) {
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java278 assertEquals(expected, cursor.getCount()); in execute()
341 assertEquals(expected, cursor.getCount()); in execute()
385 if (len != cursor.getCount()) { in execute()
388 assertEquals("number of instances don't match", len, cursor.getCount()); in execute()
1052 Log.i(TAG, "dumpCursor() count: " + cursor.getCount()); in dumpCursor()
1438 assertEquals(1, cursor.getCount()); in testInsertUpdateDeleteColor()
1447 assertEquals(0, cursor.getCount()); in testInsertUpdateDeleteColor()
1465 assertEquals(1, cursor.getCount()); in checkColor()
1489 assertEquals(0, cursor.getCount()); in testInsertNormalEvents()
1530 assertEquals("Item " + i + " not found", 1, cursor.getCount()); in testInsertNormalEvents()
[all …]
DCalendarDatabaseHelperTest.java351 assertEquals(mBadDb.rawQuery("SELECT _id FROM Events;", null).getCount(), 2); in addVersion50Events()
352 assertEquals(mGoodDb.rawQuery("SELECT _id FROM Events;", null).getCount(), 2); in addVersion50Events()
385 assertEquals(mBadDb.rawQuery("SELECT _id FROM Events;", null).getCount(), 2); in addVersion67Events()
386 assertEquals(mGoodDb.rawQuery("SELECT _id FROM Events;", null).getCount(), 2); in addVersion67Events()
532 if (c1.getCount() != c2.getCount()) { in compareCursors()
533 Log.d("CDBT","c1 has " + c1.getCount() + " rows and c2 has " + c2.getCount()); in compareCursors()
/packages/apps/Messaging/tests/src/com/android/messaging/util/
DContactUtilTest.java146 cur.getCount()); in ingoredTestGetPhones()
162 if (cur.getCount() != 5) { in ingoredTestFilterPhonesByName()
185 cur.getCount()); in ingoredTestFilterPhonesByPartialNumber()
207 cur.getCount()); in ingoredTestFilterPhonesByFullNumber()
227 cur.getCount()); in ingoredTestLookupPhoneWithAreaCode()
247 cur.getCount()); in ingoredTestLookupPhoneWithoutAreaCode()
260 cur.getCount()); in ingoredTestGetFrequentPhones()
274 cur.getCount()); in ingoredTestFilterEmails()
287 cur.getCount()); in ingoredTestLookupEmail()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactMetadataProviderTest.java133 assertEquals(1, c.getCount()); in testGetMetadataByAccount()
348 assertEquals(2, c.getCount()); in testDeleteMetadata()
354 assertEquals(0, c.getCount()); in testDeleteMetadata()
360 assertEquals(1, c.getCount()); in testBulkInsert()
371 assertEquals(3, c.getCount()); in testBulkInsert()
379 assertEquals(2, c.getCount()); in testBatchOperations()
443 assertEquals(2, c.getCount()); in testBatchOperations()
453 assertEquals(0, c.getCount()); in testBatchOperations()
463 assertEquals(1, c.getCount()); in testQueryMetadataSyncState()
479 assertEquals(1, c.getCount()); in testUpdateMetadataSyncState()
[all …]
DVoicemailProviderTest.java109 assertEquals("Record count", 1, c.getCount()); in testInsertReadMessageIsNotNew()
187 assertEquals(1, getCount(voicemailUri(), null, null)); in testDeleteOwnPackageVoicemail_DeletesRow()
191 assertEquals(0, getCount(ownVoicemail, null, null)); in testDeleteOwnPackageVoicemail_DeletesRow()
198 assertEquals(1, getCount(voicemailUri(), null, null)); in testDeleteOtherPackageVoicemail_SetsDirtyStatus()
208 assertEquals(1, getCount(anotherVoicemail, null, null)); in testDeleteOtherPackageVoicemail_SetsDirtyStatus()
218 assertEquals(0, getCount(uri, null, null)); in testDelete()
225 assertEquals(1, getCount(voicemailUri(), null, null)); in testUpdateAfterDelete_lastModifiedNotChanged()
298 assertEquals(2, getCount(voicemailUri(), null, null)); in testPermissions_InsertAndQuery()
302 assertEquals(1, getCount(voicemailUri(), null, null)); in testPermissions_InsertAndQuery()
317 assertEquals(2, getCount(voicemailUri(), null, null)); in testPermissions_InsertAndQuery()
[all …]
DContactDirectoryManagerTest.java191 assertEquals(5, cursor.getCount()); in testScanAllProviders()
272 assertEquals(3, cursor.getCount()); in testPackageInstalled()
290 assertEquals(4, cursor.getCount()); in testPackageInstalled()
332 assertEquals(4, cursor.getCount()); in testPackageUninstalled()
341 assertEquals(3, cursor.getCount()); in testPackageUninstalled()
378 assertEquals(4, cursor.getCount()); in testPackageReplaced()
390 assertEquals(4, cursor.getCount()); in testPackageReplaced()
436 assertEquals(4, cursor.getCount()); in testPackageRenamed()
457 assertEquals(4, cursor.getCount()); in testPackageRenamed()
503 assertEquals(3, cursor.getCount()); in testAccountRemoval()
[all …]
DContactsProvider2Test.java1018 assertEquals(3, cursor.getCount()); in assertDataRows()
1095 assertEquals(3, cursor.getCount()); in assertEntityRows()
1392 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "1234"), null, null)); in testPhonesNormalizedNumber()
1394 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "5678"), null, null)); in testPhonesNormalizedNumber()
1407 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "1234"), null, null)); in testPhonesNormalizedNumber()
1409 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "4321"), null, null)); in testPhonesNormalizedNumber()
1411 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "5678"), null, null)); in testPhonesNormalizedNumber()
1413 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "8765"), null, null)); in testPhonesNormalizedNumber()
1426 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "+1-800-466-5432"), null, in testPhonesNormalizedNumber()
1429 getCount(Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, "8765"), null, null)); in testPhonesNormalizedNumber()
[all …]
/packages/apps/Launcher3/tests/src/com/android/launcher3/provider/
DRestoreDbTaskTest.java33 assertEquals(5, getCount(db, "select * from favorites where profileId = 42")); in testMigrateProfileId()
38 assertEquals(0, getCount(db, "select * from favorites where profileId = 42")); in testMigrateProfileId()
39 assertEquals(5, getCount(db, "select * from favorites where profileId = 33")); in testMigrateProfileId()
46 assertEquals(6, getCount(db, "select * from favorites where profileId = 33")); in testMigrateProfileId()
49 private int getCount(SQLiteDatabase db, String sql) { in getCount() method in RestoreDbTaskTest
51 return c.getCount(); in getCount()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/
Dlanguage_model_dict_content.cpp59 if (mHasHistoricalInfo && unigramProbabilityEntry.getHistoricalInfo()->getCount() == 0) { in getWordAttributes()
87 && historicalInfo->getCount() == 1) { in getWordAttributes()
91 contextCount = prevWordProbabilityEntry.getHistoricalInfo()->getCount(); in getWordAttributes()
96 historicalInfo->getCount(), contextCount, ngramType); in getWordAttributes()
235 updatedUnigramProbabilityEntry.getHistoricalInfo()->getCount()); in updateAllEntriesOnInputWord()
250 updatedNgramProbabilityEntry.getHistoricalInfo()->getCount()); in updateAllEntriesOnInputWord()
265 0 /* level */, originalProbabilityEntry.getHistoricalInfo()->getCount() in createUpdatedEntryFrom()
266 + historicalInfo.getCount()); in createUpdatedEntryFrom()
360 const int updatedCount = originalHistoricalInfo->getCount() / 2; in updateAllProbabilityEntriesForGCInner()
443 outEntryInfo->emplace_back(priority, probabilityEntry.getHistoricalInfo()->getCount(), in getEntryInfo()
/packages/apps/Email/tests/src/com/android/email/provider/
DContentCacheTests.java159 int activeCount = ContentCache.sActiveCursors.getCount(activeCursor); in testCachedCursors()
170 assertEquals(1, cursor.getCount()); in testCachedCursors()
271 assertEquals(2, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
278 assertEquals(0, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
286 assertEquals(2, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
289 assertEquals(0, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
294 assertEquals(1, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
299 assertEquals(0, ContentCache.sActiveCursors.getCount(underlyingCursor)); in testCloseCachedCursor()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/
DSortingCursorWrapperTest.java142 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_names_ascending()
166 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_names_descending()
189 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_sizes_ascending()
212 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_sizes_descending()
251 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_sizesWithBucketing_ascending()
303 for (int i = 0; i < cursor.getCount(); ++i) { in testSort_sizesWithBucketing_descending()
356 assertEquals(ITEM_COUNT + DL_COUNT, cursor.getCount()); in testSort_time_ascending()
393 assertEquals(ITEM_COUNT + DL_COUNT, cursor.getCount()); in testSort_time_descending()
411 assertEquals(ITEM_COUNT, cursor.getCount()); in testSort_type_ascending()
443 assertEquals(ITEM_COUNT, cursor.getCount()); in testSort_type_descending()
/packages/apps/Gallery2/src/com/android/photos/views/
DHeaderGridView.java289 public int getCount() { in getCount() method in HeaderGridView.HeaderViewGridAdapter
291 return getHeadersCount() * mNumColumns + mAdapter.getCount(); in getCount()
319 adapterCount = mAdapter.getCount(); in isEnabled()
343 adapterCount = mAdapter.getCount(); in getItem()
357 int adapterCount = mAdapter.getCount(); in getItemId()
398 adapterCount = mAdapter.getCount(); in getView()
416 int adapterCount = mAdapter.getCount(); in getItemViewType()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DSeparatedFolderListAdapter.java44 int size = adapter.getCount(); in getItem()
57 public int getCount() { in getCount() method in SeparatedFolderListAdapter
61 total += adapter.getCount(); in getCount()
79 int size = adapter.getCount(); in getItemViewType()
96 int size = adapter.getCount(); in getView()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dforgetting_curve_utils.cpp53 const int count = clampToValidCountRange(newHistoricalInfo->getCount(), headerPolicy); in createUpdatedHistoricalInfo()
58 && originalHistoricalInfo->getCount() < newHistoricalInfo->getCount())) { in createUpdatedHistoricalInfo()
60 int count = newHistoricalInfo->getCount(); in createUpdatedHistoricalInfo()
68 const int updatedCount = originalHistoricalInfo->getCount() + 1; in createUpdatedHistoricalInfo()
74 originalHistoricalInfo->getLevel(), originalHistoricalInfo->getCount()); in createUpdatedHistoricalInfo()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DSyncCursorPair.java293 return mLocalCursorIterator.getCount(); in getLocalCount()
297 return mRemoteCursorsIterator.getCount(); in getRemoteCount()
321 public int getCount(); in getCount() method
406 public int getCount() { in getCount() method in SyncCursorPair.LocalCursorIterator
407 return (mCursor == null ? 0 : mCursor.getCount()); in getCount()
534 public int getCount() { in getCount() method in SyncCursorPair.RemoteCursorsIterator
535 return (mSmsCursor == null ? 0 : mSmsCursor.getCount()) + in getCount()
536 (mMmsCursor == null ? 0 : mMmsCursor.getCount()); in getCount()
612 } else if (cursor.getCount() == 0) { in getCountFromCursor()
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/
DDatabaseIndexingManagerTest.java191 assertThat(cursor.getCount()).isEqualTo(1); in testInsertRawColumn_rowInserted()
204 assertThat(cursor.getCount()).isEqualTo(1); in testInsertRawColumn_nonIndexableKey_resultIsDisabled()
267 assertThat(cursor.getCount()).isEqualTo(0); in testInsertRawColumn_mismatchedLocale_noRowInserted()
278 assertThat(cursor.getCount()).isEqualTo(0); in testNullResource_NothingInserted()
286 assertThat(cursor.getCount()).isEqualTo(17); in testAddResource_RowsInserted()
299 assertThat(cursor.getCount()).isEqualTo(2); in testAddResource_withNIKs_rowsInsertedDisabled()
301 assertThat(cursor.getCount()).isEqualTo(15); in testAddResource_withNIKs_rowsInsertedDisabled()
582 assertThat(cursor.getCount()).isEqualTo(1); in testResourceProvider_rowInserted()
650 assertThat(cursor.getCount()).isEqualTo(6); in testResourceProvider_resourceRowInserted()
720 assertThat(cursor.getCount()).isEqualTo(1); in testResourceProvider_disabledResource_rowsInserted()
[all …]
/packages/services/Telephony/tests/src/com/android/phone/
DPhoneSearchIndexablesProviderTest.java107 assertThat(cursor.getCount()).isEqualTo(1); in testQueryRawData()
122 assertThat(cursor1.getCount()).isEqualTo(11); in testQueryNonIndexableKeys()
127 assertThat(cursor2.getCount()).isEqualTo(1); in testQueryNonIndexableKeys()
132 assertThat(cursor3.getCount()).isEqualTo(2); in testQueryNonIndexableKeys()
137 assertThat(cursor4.getCount()).isEqualTo(3); in testQueryNonIndexableKeys()
/packages/apps/Email/provider_src/com/android/email/provider/
DContentCache.java159 /*package*/ synchronized int getCount(T object) { in getCount() method in ContentCache.CounterMap
324 public int getCount() { in getCount() method in ContentCache.CachedCursor
326 mCount = super.getCount(); in getCount()
336 if (pos >= getCount() || pos < -1) { in moveToPosition()
370 return moveToPosition(getCount() - 1); in moveToLast()
375 return mPosition == (getCount() - 1); in isLast()
548 if (c.getCount() == 0) { in getMatrixCursor()
703 if (c.getCount() == 1) { in recordQueryTime()
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DSectionedAlbumDataAdapter.java70 if (DEBUG) Log.i(TAG, "numAlbums = " + mAlbumData.getCount()); in onChanged()
71 for (int i = 0; i < mAlbumData.getCount(); i++) { in onChanged()
85 for (int i = 0; i < mAlbumData.getCount(); i++) { in onChanged()
124 public int getCount() { in getCount() method in SectionedAlbumDataAdapter
125 return mAlbumData.getCount() + sections.length; in getCount()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DBugleDatabaseOperations.java269 Assert.isTrue(cursor.getCount() == 1); in getExistingConversation()
303 Assert.isTrue(cursor.getCount() == 1); in getThreadId()
338 Assert.inRange(cursor.getCount(), 0, 1); in isBlockedParticipant()
704 if (cursor != null && cursor.getCount() > 0) { in addConversationSelfIdToContentValues()
883 Assert.inRange(cursor.getCount(), 0, 1); in getConversationSelfId()
932 Assert.inRange(cursor.getCount(), 0, 1); in getSmsServiceCenterForConversation()
955 Assert.inRange(cursor.getCount(), 0, 1); in getExistingParticipant()
1028 Assert.inRange(cursor.getCount(), 0, 1); in readMessagePartData()
1050 Assert.inRange(cursor.getCount(), 0, 1); in readMessageData()
1073 Assert.inRange(cursor.getCount(), 0, 1); in readMessageData()
[all …]

12345678910>>...21