/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/ |
D | SdpManagerTestServer.java | 12 import junit.framework.Assert; 180 …Assert.assertEquals(AbstractionLayer.BT_STATUS_SUCCESS, status); /* BT_STATUS_SUCCESS == 0 - but s… in onReceive() 183 Assert.assertNotNull(record); in onReceive() 187 …Assert.assertEquals(((long)record.getSupportedFeatures())&0xffffffffL, SdpManagerTest.SDP_FEATURES… in onReceive() 188 … Assert.assertEquals(record.getSupportedMessageTypes(), SdpManagerTest.SDP_MSG_TYPES); in onReceive() 189 Assert.assertEquals(record.getProfileVersion(), SdpManagerTest.SDP_VERSION); in onReceive() 190 … Assert.assertEquals(record.getServiceName(), SdpManagerTest.SDP_SERVER_NAME); in onReceive() 191 Assert.assertEquals(record.getMasInstanceId(), SdpManagerTest.SDP_MAS_ID); in onReceive() 195 Assert.assertEquals(mOperationIndex+rfcommChannel,l2capPsm); in onReceive() 204 … Assert.assertEquals(0, status); /* BT_STATUS_SUCCESS == 0 - but status is not documented... */ in onReceive() [all …]
|
D | MapStepsConvo.java | 12 import junit.framework.Assert; 174 Assert.fail(); in addConvoListingStep() 205 Assert.assertNotNull(op); in validate() 214 Assert.assertNotNull(appParamsRaw); in validate() 217 Assert.assertNotNull(appParams); in validate() 218 Assert.assertNotNull(appParams.getDatabaseIdentifier()); in validate() 219 Assert.assertNotSame(BluetoothMapAppParams.INVALID_VALUE_PARAMETER, in validate() 222 Assert.assertSame(mExpectedSize, appParams.getConvoListingSize()); in validate() 226 Assert.assertTrue(mExpectedListing.equals(receivedListing)); in validate() 227 Assert.assertSame(mExpectedListing.getList().size(), in validate() [all …]
|
D | MapStepsFolder.java | 9 import junit.framework.Assert; 87 Assert.assertNotNull(MapBuildFolderStructurValidator.sCurrentFolder); in execute() 114 Assert.assertNotNull(op); in validate() 122 Assert.assertNotNull(appParamsRaw); in validate() 125 Assert.assertNotNull(appParams); in validate() 128 Assert.assertTrue(mExpectedFolderElement.compareTo(sCurrentFolder.getRoot()) in validate() 132 Assert.assertEquals(ResponseCodes.OBEX_HTTP_OK, responseCode); in validate() 136 Assert.fail(); in validate()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | BugleDatabaseOperations.java | 43 import com.android.messaging.util.Assert; 44 import com.android.messaging.util.Assert.DoesNotRunOnMainThread; 98 Assert.isNotMainThread(); in sanitizeConversationParticipants() 142 Assert.isNotMainThread(); in getRecipientsFromConversationParticipants() 169 Assert.isNotMainThread(); in getOrCreateConversationFromThreadId() 190 Assert.isNotMainThread(); in getOrCreateConversationFromRecipient() 212 Assert.isNotMainThread(); in getOrCreateConversation() 257 Assert.isNotMainThread(); in getExistingConversation() 269 Assert.isTrue(cursor.getCount() == 1); in getExistingConversation() 291 Assert.isNotMainThread(); in getThreadId() [all …]
|
D | BitmapPool.java | 27 import com.android.messaging.util.Assert; 86 Assert.isTrue(maxSize > 0); in BitmapPool() 87 Assert.isTrue(!TextUtils.isEmpty(name)); in BitmapPool() 189 Assert.notNull(resources); in decodeSampledBitmapFromResource() 190 Assert.notNull(optionsTmp); in decodeSampledBitmapFromResource() 191 Assert.isTrue(width > 0); in decodeSampledBitmapFromResource() 192 Assert.isTrue(height > 0); in decodeSampledBitmapFromResource() 229 Assert.notNull(inputStream); in decodeSampledBitmapFromInputStream() 230 Assert.isTrue(width > 0); in decodeSampledBitmapFromInputStream() 231 Assert.isTrue(height > 0); in decodeSampledBitmapFromInputStream() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | AvatarUriUtil.java | 98 Assert.notNull(participants); in createAvatarUri() 99 Assert.isTrue(!participants.isEmpty()); in createAvatarUri() 120 Assert.notNull(avatarUris); in joinAvatarUriToGroup() 121 Assert.isTrue(!avatarUris.isEmpty()); in joinAvatarUriToGroup() 125 Assert.isTrue(AvatarUriUtil.isAvatarUri(firstAvatar)); in joinAvatarUriToGroup() 136 Assert.notNull(uri); in joinAvatarUriToGroup() 137 Assert.isTrue(UriUtil.isLocalResourceUri(uri) || AvatarUriUtil.isAvatarUri(uri)); in joinAvatarUriToGroup() 149 Assert.notNull(participant); in createAvatarUri() 198 Assert.notNull(participantData); in createAvatarUri() 199 Assert.isTrue(participantData.isActiveSubscription()); in createAvatarUri() [all …]
|
D | SafeAsyncTask.java | 25 import com.android.messaging.util.Assert.RunsOnAnyThread; 76 Assert.isMainThread(); // AsyncTask has to be created on the main thread in SafeAsyncTask() 83 Assert.isMainThread(); // AsyncTask requires this in executeOnThreadPool() 95 Assert.isTrue(mThreadPoolRequested); in doInBackground() 120 Assert.fail(this + " took too long"); in doInBackground() 130 Assert.fail("Use SafeAsyncTask.executeOnThreadPool"); in onPostExecute()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | SynchronousContactsProvider2.java | 24 import junit.framework.Assert; 275 Assert.assertTrue("begin", mOnBeginTransactionInternalCalledInProfileMode); 276 Assert.assertTrue("commit", mOnCommitTransactionInternalCalledInProfileMode); 277 Assert.assertFalse("rollback", mOnRollbackTransactionInternalCalledInProfileMode); 281 Assert.assertTrue("begin", mOnBeginTransactionInternalCalledInProfileMode); 282 Assert.assertFalse("commit", mOnCommitTransactionInternalCalledInProfileMode); 283 Assert.assertTrue("rollback", mOnRollbackTransactionInternalCalledInProfileMode); 287 Assert.assertFalse("begin", mOnBeginTransactionInternalCalledInProfileMode); 288 Assert.assertFalse("commit", mOnCommitTransactionInternalCalledInProfileMode); 289 Assert.assertFalse("rollback", mOnRollbackTransactionInternalCalledInProfileMode); [all …]
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/format/ |
D | SpannedTestUtils.java | 27 import junit.framework.Assert; 44 Assert.assertEquals("", actualHtmlText); in checkHtmlText() 46 Assert.assertEquals("<p dir=ltr>" + expectedHtmlText + "</p>\n", actualHtmlText); in checkHtmlText() 59 Assert.assertTrue(seq instanceof Spanned); in assertPrefixSpan() 63 Assert.assertEquals(0, getNumForegroundColorSpansBetween(spannable, 0, start - 1)); in assertPrefixSpan() 65 Assert.assertEquals(1, getNumForegroundColorSpansBetween(spannable, start, end)); in assertPrefixSpan() 66 Assert.assertEquals(0, getNumForegroundColorSpansBetween(spannable, end + 1, in assertPrefixSpan() 81 Assert.assertFalse(seq instanceof Spanned); in assertNotSpanned() 82 Assert.assertEquals(expected, seq); in assertNotSpanned()
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/ |
D | RecordingTestUtils.java | 22 import junit.framework.Assert; 55 Assert.assertEquals("id", expected.getId(), actual.getId()); in assertRecordingEquals() 56 Assert.assertEquals("channel", expected.getChannelId(), actual.getChannelId()); in assertRecordingEquals() 57 Assert.assertEquals("programId", expected.getProgramId(), actual.getProgramId()); in assertRecordingEquals() 58 Assert.assertEquals("priority", expected.getPriority(), actual.getPriority()); in assertRecordingEquals() 59 Assert.assertEquals("start time", expected.getStartTimeMs(), actual.getStartTimeMs()); in assertRecordingEquals() 60 Assert.assertEquals("end time", expected.getEndTimeMs(), actual.getEndTimeMs()); in assertRecordingEquals() 61 Assert.assertEquals("state", expected.getState(), actual.getState()); in assertRecordingEquals() 62 Assert.assertEquals("parent season recording", expected.getParentSeasonRecording(), in assertRecordingEquals()
|
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/preference/ |
D | ContactsPreferencesTest.java | 28 import junit.framework.Assert; 71 Assert.assertEquals(ContactsPreferences.SORT_ORDER_PRIMARY, in testGetSortOrderDefault() 81 Assert.assertEquals(ContactsPreferences.SORT_ORDER_PRIMARY, in testGetSortOrder() 90 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testGetDisplayOrderDefault() 100 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testGetDisplayOrder() 112 Assert.assertEquals(ContactsPreferences.SORT_ORDER_PRIMARY, in testRefreshSortOrder() 116 Assert.assertEquals(ContactsPreferences.SORT_ORDER_ALTERNATIVE, in testRefreshSortOrder() 128 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testRefreshDisplayOrder() 132 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE, in testRefreshDisplayOrder() 145 Assert.assertEquals("name1", mContactsPreferences.getDefaultAccount()); in testRefreshDefaultAccount() [all …]
|
/packages/apps/Dialer/tests/src/com/android/dialer/calllog/ |
D | ContactInfoHelperTest.java | 29 import junit.framework.Assert; 62 Assert.assertNull(mContactInfoHelper.lookupContactFromUri(null, false)); in testLookupContactFromUri_NullUri() 69 Assert.assertEquals(ContactInfo.EMPTY, mContactInfoHelper.lookupContactFromUri( in testLookupContactFromUri_NoResults() 83 Assert.assertEquals(TEST_DISPLAY_NAME, contactInfo.name); in testLookupContactFromUri_NoDisplayNameAlternative() 84 Assert.assertNull(contactInfo.nameAlternative); in testLookupContactFromUri_NoDisplayNameAlternative() 97 Assert.assertEquals(TEST_DISPLAY_NAME, contactInfo.name); in testLookupContactFromUri_HasDisplayNameAlternative() 98 Assert.assertEquals(TEST_DISPLAY_NAME_ALTERNATIVE, contactInfo.nameAlternative); in testLookupContactFromUri_HasDisplayNameAlternative() 103 Assert.assertNull(mContactInfoHelper.lookUpDisplayNameAlternative(mContext, null, in testLookupDisplayNameAlternative_NullLookup() 110 Assert.assertNull(mContactInfoHelper.lookUpDisplayNameAlternative(mContext, in testLookupDisplayNameAlternative_NoResults() 118 Assert.assertEquals(TEST_DISPLAY_NAME_ALTERNATIVE, in testLookupDisplayNameAlternative_HasDisplayNameAlternative()
|
/packages/apps/Dialer/tests/src/com/android/dialer/util/ |
D | FakeAsyncTaskExecutor.java | 24 import junit.framework.Assert; 64 Assert.assertNotNull(instrumentation); in FakeAsyncTaskExecutor() 116 Assert.assertNotNull(mNextTask); in execute() 127 Assert.assertNull(mNextIdentifier); in submit() 128 Assert.assertNull(mNextTask); in submit() 130 Assert.assertNotNull("Already had a valid task.\n" in submit() 158 Assert.assertEquals("Expected one task " + identifier + ", got " + tasks, 1, tasks.size()); in runTask() 174 Assert.assertTrue("There were no tasks with identifier " + identifier, tasks.size() > 0); in runAllTasks() 202 Assert.assertTrue(latch.await(mTimeoutMs, TimeUnit.MILLISECONDS)); in runTask() 207 Assert.assertNotNull(identifier); in getSubmittedTasksByIdentifier()
|
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/ |
D | ImagePersistTask.java | 27 import com.android.messaging.util.Assert; 57 Assert.isTrue(heightPercent >= 0 && heightPercent <= 1); in ImagePersistTask() 58 Assert.notNull(bytes); in ImagePersistTask() 59 Assert.notNull(context); in ImagePersistTask() 60 Assert.notNull(callback); in ImagePersistTask() 100 Assert.equals(mWidth, bitmap.getHeight()); in doInBackgroundTimed() 101 Assert.equals(mHeight, bitmap.getWidth()); in doInBackgroundTimed() 105 Assert.equals(mWidth, bitmap.getWidth()); in doInBackgroundTimed() 106 Assert.equals(mHeight, bitmap.getHeight()); in doInBackgroundTimed() 168 Assert.notNull(mException); in onPostExecute()
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
D | ConversationActivityUiState.java | 22 import com.android.messaging.util.Assert; 136 Assert.fail("Invalid contact picking mode for ConversationActivity!"); in getDesiredContactPickingMode() 158 Assert.fail("Invalid conversation activity state: can't create conversation!"); in onGetOrCreateConversation() 170 Assert.isTrue(mConversationContactUiState != STATE_CONTACT_PICKER_ONLY_INITIAL_CONTACT && in onStartMessageCompose() 189 Assert.fail("Invalid conversation activity state: can't add more participants!"); in onAddMoreParticipants() 224 Assert.isTrue(isUiUpdateInProgress()); in notifyOnOverallUiStateChanged() 238 Assert.isTrue((mConversationContactUiState == STATE_CONTACT_PICKER_ONLY_INITIAL_CONTACT) == in assertValidState() 248 Assert.fail("Unbalanced Ui updates!"); in endUiUpdate() 293 Assert.fail("ConversationActivityUiState: failed to clone(). Is there a mutable " + in clone()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
D | MediaResourceManager.java | 21 import com.android.messaging.util.Assert; 22 import com.android.messaging.util.Assert.RunsOnAnyThread; 138 Assert.isNotMainThread(); in requestMediaResourceSync() 144 Assert.isTrue(loadResult.loadedResource.getRefCount() > 0); in requestMediaResourceSync() 171 Assert.notNull(decodeRequest); in processMediaRequestInternal() 208 Assert.notNull(resource); in loadMediaFromRequest() 260 Assert.isNull(mException); in scheduleAsyncMediaRequest() 261 Assert.isTrue(result.loadedResource.getRefCount() > 0); in scheduleAsyncMediaRequest() 278 Assert.isTrue(bindableRequest == null || !bindableRequest.isBound()); in scheduleAsyncMediaRequest() 293 Assert.isTrue(mediaResource != null); in addResourceToMemoryCache()
|
D | DecodedImageResource.java | 23 import com.android.messaging.util.Assert; 24 import com.android.messaging.util.Assert.DoesNotRunOnMainThread; 111 Assert.notNull(mBitmap); in getMediaSize() 139 Assert.notNull(mBitmap); in getDrawable() 159 Assert.isFalse(isEncoded()); in getMediaEncodingRequest() 188 Assert.isNotMainThread(); in loadMediaBlocking() 193 Assert.isFalse(bitmap.hasAlpha()); in loadMediaBlocking()
|
D | VCardRequest.java | 22 import com.android.messaging.util.Assert; 23 import com.android.messaging.util.Assert.DoesNotRunOnMainThread; 85 Assert.isNotMainThread(); in loadMediaBlocking() 86 Assert.isTrue(mLoadedResource == null); in loadMediaBlocking() 87 Assert.equals(0, mLoadedVCards.size()); in loadMediaBlocking() 119 Assert.isNotMainThread(); in parseVCard() 154 Assert.isNotMainThread(); in doActuallyReadOneVCard() 179 Assert.isNotMainThread(); in readOneVCardFile() 257 Assert.isNotMainThread(); in onEntryCreated()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/ |
D | ConversationData.java | 50 import com.android.messaging.util.Assert; 51 import com.android.messaging.util.Assert.RunsOnMainThread; 185 Assert.equals(CONVERSATION_META_DATA_LOADER, id); in onCreateLoader() 209 Assert.isTrue(data.getCount() == 1); in onLoadFinished() 251 Assert.equals(CONVERSATION_MESSAGES_LOADER, id); in onCreateLoader() 354 Assert.equals(PARTICIPANT_LOADER, id); in onCreateLoader() 405 Assert.equals(SELF_PARTICIPANT_LOADER, id); in onCreateLoader() 471 Assert.isTrue(conversationId != null); in ConversationData() 489 Assert.isMainThread(); in addConversationDataListener() 595 Assert.isTrue(TextUtils.equals(mConversationId, message.getConversationId())); in sendMessage() [all …]
|
D | BlockedParticipantsData.java | 31 import com.android.messaging.util.Assert; 55 Assert.isTrue(id == BLOCKED_PARTICIPANTS_LOADER); in onCreateLoader() 69 Assert.isTrue(loader.getId() == BLOCKED_PARTICIPANTS_LOADER); in onLoadFinished() 71 Assert.isTrue(isBound(cursorLoader.getBindingId())); in onLoadFinished() 77 Assert.isTrue(loader.getId() == BLOCKED_PARTICIPANTS_LOADER); in onLoaderReset() 79 Assert.isTrue(isBound(cursorLoader.getBindingId())); in onLoaderReset()
|
/packages/apps/Dialer/tests/src/com/android/dialer/list/ |
D | PhoneFavoritesTileAdapterTest.java | 17 import junit.framework.Assert; 211 Assert.assertEquals(1, mAdapter.mContactEntries.size()); in testSetContactCursor_DisplayNameOrder_Primary() 212 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testSetContactCursor_DisplayNameOrder_Primary() 220 Assert.assertEquals(1, mAdapter.mContactEntries.size()); in testSetContactCursor_DisplayNameOrder_Alternative() 221 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE, in testSetContactCursor_DisplayNameOrder_Alternative() 229 Assert.assertEquals(1, mAdapter.mContactEntries.size()); in testSetContactCursor_DisplayNameOrder_Changed() 230 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testSetContactCursor_DisplayNameOrder_Changed() 236 Assert.assertEquals(1, mAdapter.mContactEntries.size()); in testSetContactCursor_DisplayNameOrder_Changed() 237 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE, in testSetContactCursor_DisplayNameOrder_Changed() 296 Assert.assertEquals(expectedSize, contactEntries.size()); in assertContactEntryListPositionsMatchId() [all …]
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
D | MockDataSetObserver.java | 21 import junit.framework.Assert; 32 Assert.assertFalse("onChanged() was called", mChangedCount > 0); in assertNotChanged() 36 Assert.assertFalse("onInvalidated() was called", mInvalidatedCount > 0); in assertNotInvalidated() 40 Assert.assertTrue("onChanged() was not called", mChangedCount > 0); in assertChanged() 44 Assert.assertTrue("onInvalidated() was not called", mInvalidatedCount > 0); in assertInvalidated()
|
/packages/apps/ContactsCommon/TestCommon/src/com/android/contacts/common/test/mocks/ |
D | MockContentProvider.java | 28 import junit.framework.Assert; 479 Assert.fail("Unexpected query: Actual:" in query() 494 Assert.fail("Incorrect query. Expected one of: " + mExpectedQueries + ". Actual: " + in query() 502 Assert.fail("Unexpected getType query: " + uri); in getType() 510 Assert.fail("Unknown mime type for: " + uri); in getType() 517 Assert.fail("Unexpected insert. Actual: " + insertToString(uri, values)); in insert() 530 Assert.fail("Incorrect insert. Expected one of: " + mExpectedInserts + ". Actual: " in insert() 545 Assert.fail("Unexpected update. Actual: " in update() 559 Assert.fail("Incorrect update. Expected one of: " + mExpectedUpdates + ". Actual: " in update() 575 Assert.fail("Unexpected delete. Actual: " + deleteToString(uri, selection, in delete() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | ProcessDownloadedMmsAction.java | 47 import com.android.messaging.util.Assert; 102 Assert.notNull(messageId); in processMessageDownloaded() 103 Assert.notNull(contentUri); in processMessageDownloaded() 104 Assert.notNull(notificationUri); in processMessageDownloaded() 105 Assert.notNull(conversationId); in processMessageDownloaded() 106 Assert.notNull(participantId); in processMessageDownloaded() 142 Assert.notNull(messageId); in processMessageDownloadFastFailed() 143 Assert.notNull(notificationUri); in processMessageDownloadFastFailed() 144 Assert.notNull(conversationId); in processMessageDownloadFastFailed() 145 Assert.notNull(participantId); in processMessageDownloadFastFailed() [all …]
|
D | UpdateConversationOptionsAction.java | 28 import com.android.messaging.util.Assert; 40 Assert.notNull(conversationId); in enableConversationNotifications() 52 Assert.notNull(conversationId); in setConversationNotificationSound() 64 Assert.notNull(conversationId); in enableVibrationForConversationNotification() 81 Assert.notNull(conversationId); in UpdateConversationOptionsAction() 98 Assert.isTrue(dbWrapper.getDatabase().inTransaction()); in putOptionValuesInTransaction()
|