/cts/libs/commonutil/src/com/android/cts/util/ |
D | StatisticsUtilsTest.java | 36 Collection<Integer> values = new HashSet<Integer>(); in testGet95PercentileValue() local 38 values.add(i); in testGet95PercentileValue() 40 assertEquals(95, (int) StatisticsUtils.get95PercentileValue(values)); in testGet95PercentileValue() 42 values = new HashSet<Integer>(); in testGet95PercentileValue() 44 values.add(i); in testGet95PercentileValue() 46 assertEquals(950, (int) StatisticsUtils.get95PercentileValue(values)); in testGet95PercentileValue() 48 values = new HashSet<Integer>(); in testGet95PercentileValue() 50 values.add(i * i); in testGet95PercentileValue() 52 assertEquals(95 * 95, (int) StatisticsUtils.get95PercentileValue(values)); in testGet95PercentileValue() 59 List<Integer> values = Arrays.asList(0, 1, 2, 3, 4); in testGetMean() local [all …]
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | MediaStoreAudioTestHelper.java | 122 ContentValues values = new ContentValues(); in getContentValues() local 123 values.put(Media.DATA, isInternal ? INTERNAL_DATA : EXTERNAL_DATA); in getContentValues() 124 values.put(Media.DATE_MODIFIED, DATE_MODIFIED); in getContentValues() 125 values.put(Media.DISPLAY_NAME, DISPLAY_NAME); in getContentValues() 126 values.put(Media.MIME_TYPE, MIME_TYPE); in getContentValues() 127 values.put(Media.SIZE, SIZE); in getContentValues() 128 values.put(Media.TITLE, TITLE); in getContentValues() 129 values.put(Media.ALBUM, ALBUM); in getContentValues() 130 values.put(Media.ARTIST, ARTIST); in getContentValues() 131 values.put(Media.COMPOSER, COMPOSER); in getContentValues() [all …]
|
D | MediaStore_Video_MediaTest.java | 81 ContentValues values = new ContentValues(); in testStoreVideoMediaExternal() local 82 values.put(Media.ALBUM, "cts"); in testStoreVideoMediaExternal() 83 values.put(Media.ARTIST, "cts team"); in testStoreVideoMediaExternal() 84 values.put(Media.CATEGORY, "test"); in testStoreVideoMediaExternal() 86 values.put(Media.DATE_TAKEN, dateTaken); in testStoreVideoMediaExternal() 87 values.put(Media.DESCRIPTION, "This is a video"); in testStoreVideoMediaExternal() 88 values.put(Media.DURATION, 8480); in testStoreVideoMediaExternal() 89 values.put(Media.LANGUAGE, "en"); in testStoreVideoMediaExternal() 90 values.put(Media.LATITUDE, 40.689060d); in testStoreVideoMediaExternal() 91 values.put(Media.LONGITUDE, -74.044636d); in testStoreVideoMediaExternal() [all …]
|
D | MediaStore_FilesTest.java | 99 ContentValues values = new ContentValues(); in testGetContentUri() local 101 mResolver.insert(allFilesUri, values); in testGetContentUri() 110 values.put(MediaColumns.DATA, dataPath); in testGetContentUri() 111 Uri fileUri = mResolver.insert(allFilesUri, values); in testGetContentUri() 128 values.put(MediaColumns.DATA, updatedPath); in testGetContentUri() 129 assertEquals(1, mResolver.update(fileUri, values, null, null)); in testGetContentUri() 133 Uri foo = mResolver.insert(allFilesUri, values); in testGetContentUri() 149 values.clear(); in testGetContentUri() 152 values.put(MediaColumns.DATA, b + "/testing"); in testGetContentUri() 153 fileUri = mResolver.insert(allFilesUri, values); in testGetContentUri() [all …]
|
D | MediaStore_Audio_GenresTest.java | 64 ContentValues values = new ContentValues(); in testStoreAudioGenresExternal() local 65 values.put(Genres.NAME, "POP"); in testStoreAudioGenresExternal() 66 Uri uri = mContentResolver.insert(Genres.EXTERNAL_CONTENT_URI, values); in testStoreAudioGenresExternal() 79 values.clear(); in testStoreAudioGenresExternal() 80 values.put(Genres.NAME, "ROCK"); in testStoreAudioGenresExternal() 81 assertEquals(1, mContentResolver.update(uri, values, null, null)); in testStoreAudioGenresExternal() 93 ContentValues values = new ContentValues(); in testStoreAudioGenresInternal() local 94 values.put(Genres.NAME, "POP"); in testStoreAudioGenresInternal() 95 Uri uri = mContentResolver.insert(Genres.INTERNAL_CONTENT_URI, values); in testStoreAudioGenresInternal() 101 ContentValues values = Audio1.getInstance().getContentValues(true); in testGetContentUriForAudioId() local [all …]
|
D | MediaStore_Audio_PlaylistsTest.java | 67 ContentValues values = new ContentValues(); in testStoreAudioPlaylistsExternal() local 68 values.put(Playlists.NAME, "My favourites"); in testStoreAudioPlaylistsExternal() 69 values.put(Playlists.DATA, externalPlaylistPath); in testStoreAudioPlaylistsExternal() 72 values.put(Playlists.DATE_MODIFIED, dateModified); in testStoreAudioPlaylistsExternal() 74 Uri uri = mContentResolver.insert(Playlists.EXTERNAL_CONTENT_URI, values); in testStoreAudioPlaylistsExternal() 93 values.clear(); in testStoreAudioPlaylistsExternal() 94 values.put(Playlists.NAME, "xxx"); in testStoreAudioPlaylistsExternal() 96 values.put(Playlists.DATE_MODIFIED, dateModified); in testStoreAudioPlaylistsExternal() 97 assertEquals(1, mContentResolver.update(uri, values, null, null)); in testStoreAudioPlaylistsExternal() 113 ContentValues values = new ContentValues(); in testStoreAudioPlaylistsInternal() local [all …]
|
D | ContactsContract_StreamItemsTest.java | 72 ContentValues values = new ContentValues(); in testContentDirectoryUri() local 73 values.put(Data.RAW_CONTACT_ID, rawContactId); in testContentDirectoryUri() 74 values.put(RawContacts.ACCOUNT_TYPE, ACCOUNT_TYPE); in testContentDirectoryUri() 75 values.put(RawContacts.ACCOUNT_NAME, ACCOUNT_NAME); in testContentDirectoryUri() 76 values.put(StreamItems.TEXT, UPDATE_TEXT); in testContentDirectoryUri() 77 values.put(StreamItems.TIMESTAMP, UPDATE_TIMESTAMP); in testContentDirectoryUri() 78 values.put(StreamItems.COMMENTS, UPDATE_COMMENTS); in testContentDirectoryUri() 80 assertEquals(1, mResolver.update(streamItemUri, values, null, null)); in testContentDirectoryUri() 86 ContentValues values = new ContentValues(); in insertRawContact() local 87 values.put(RawContacts.ACCOUNT_TYPE, ACCOUNT_TYPE); in insertRawContact() [all …]
|
D | ContactsContract_StreamItemPhotosTest.java | 49 ContentValues values = new ContentValues(); in testContentDirectoryUri() local 50 values.put(StreamItemPhotos.SORT_INDEX, 1); in testContentDirectoryUri() 51 values.put(StreamItemPhotos.PHOTO, photoData); in testContentDirectoryUri() 56 Uri uri = mResolver.insert(insertUri, values); in testContentDirectoryUri() 64 ContentValues values = new ContentValues(); in testContentPhotoUri() local 65 values.put(StreamItemPhotos.STREAM_ITEM_ID, mStreamItemId); in testContentPhotoUri() 66 values.put(StreamItemPhotos.SORT_INDEX, 1); in testContentPhotoUri() 67 values.put(StreamItemPhotos.PHOTO, photoData); in testContentPhotoUri() 69 Uri uri = mResolver.insert(StreamItems.CONTENT_PHOTO_URI, values); in testContentPhotoUri()
|
D | ContactsContract_AggregationSuggestionsTest.java | 73 ContentValues values = new ContentValues(); in testAggregationSuggestionsByNameReversed() local 74 values.put(Contacts._ID, contactIds[0]); in testAggregationSuggestionsByNameReversed() 75 values.put(Contacts.DISPLAY_NAME, "first1 last1"); in testAggregationSuggestionsByNameReversed() 76 DatabaseAsserts.assertCursorValuesMatchExactly(cursor, values); in testAggregationSuggestionsByNameReversed() 95 ContentValues values = new ContentValues(); in testAggregationSuggestionsByName() local 96 values.put(Contacts._ID, contactIds[0]); in testAggregationSuggestionsByName() 97 values.put(Contacts.DISPLAY_NAME, "first1 last1"); in testAggregationSuggestionsByName() 98 DatabaseAsserts.assertCursorValuesMatchExactly(cursor, values); in testAggregationSuggestionsByName() 132 ContentValues values = new ContentValues(); in testAggregationSuggestionsByName_matchSecondNameParameter() local 133 values.put(Contacts._ID, contactIds[1]); in testAggregationSuggestionsByName_matchSecondNameParameter() [all …]
|
/cts/tests/tests/app/src/android/app/cts/ |
D | ActivityManager_RunningServiceInfoTest.java | 59 ActivityManager.RunningServiceInfo values = in testWriteToParcel() local 61 assertEquals(mService, values.service); in testWriteToParcel() 62 assertEquals(1, values.pid); in testWriteToParcel() 63 assertEquals(PROCESS, values.process); in testWriteToParcel() 64 assertTrue(values.foreground); in testWriteToParcel() 65 assertEquals(1l, values.activeSince); in testWriteToParcel() 66 assertTrue(values.started); in testWriteToParcel() 67 assertEquals(2, values.clientCount); in testWriteToParcel() 68 assertEquals(1, values.crashCount); in testWriteToParcel() 69 assertEquals(1l, values.lastActivityTime); in testWriteToParcel() [all …]
|
D | ActivityManagerRunningTaskInfoTest.java | 53 ActivityManager.RunningTaskInfo values = ActivityManager.RunningTaskInfo.CREATOR in testWriteToParcel() local 55 assertEquals(1, values.id); in testWriteToParcel() 56 assertNull(values.baseActivity); in testWriteToParcel() 57 assertNull(values.topActivity); in testWriteToParcel() 58 assertNull(values.thumbnail); in testWriteToParcel() 59 assertEquals(1, values.numActivities); in testWriteToParcel() 60 assertEquals(2, values.numRunning); in testWriteToParcel() 67 values = ActivityManager.RunningTaskInfo.CREATOR in testWriteToParcel() 69 assertNotNull(values.thumbnail); in testWriteToParcel() 70 assertEquals(320, values.thumbnail.getHeight()); in testWriteToParcel() [all …]
|
D | ActivityManagerProcessErrorStateInfoTest.java | 59 ActivityManager.ProcessErrorStateInfo values = in testWriteToParcel() local 62 assertEquals(condition, values.condition); in testWriteToParcel() 63 assertEquals(processName, values.processName); in testWriteToParcel() 64 assertEquals(pid, values.pid); in testWriteToParcel() 65 assertEquals(uid, values.uid); in testWriteToParcel() 66 assertEquals(tag, values.tag); in testWriteToParcel() 68 assertEquals(shortMsg, values.shortMsg); in testWriteToParcel() 69 assertEquals(longMsg, values.longMsg); in testWriteToParcel() 70 assertNull(values.crashData); // Deprecated field: always null in testWriteToParcel() 93 ActivityManager.ProcessErrorStateInfo values = new ActivityManager.ProcessErrorStateInfo(); in testReadFromParcel() local [all …]
|
D | ActivityManagerRecentTaskInfoTest.java | 52 ActivityManager.RecentTaskInfo values = ActivityManager.RecentTaskInfo.CREATOR in testWriteToParcel() local 54 assertEquals(id, values.id); in testWriteToParcel() 55 assertEquals(null, values.baseIntent); in testWriteToParcel() 56 assertEquals(null, values.origActivity); in testWriteToParcel() 67 values = ActivityManager.RecentTaskInfo.CREATOR in testWriteToParcel() 69 assertEquals(-1, values.id); in testWriteToParcel() 70 assertNotNull(values.baseIntent); in testWriteToParcel() 71 assertEquals(Intent.ACTION_CALL, values.baseIntent.getAction()); in testWriteToParcel() 72 assertEquals(origActivity, values.origActivity); in testWriteToParcel() 86 ActivityManager.RecentTaskInfo values = new ActivityManager.RecentTaskInfo(); in testReadFromParcel() local [all …]
|
/cts/tests/tests/view/src/android/view/animation/cts/ |
D | ScaleAnimationTest.java | 78 float values[] = new float[9]; in testApplyTransformation() local 82 transformation.getMatrix().getValues(values); in testApplyTransformation() 83 assertMatrixValue(FROM_X, FROM_Y, values); in testApplyTransformation() 84 float trans1X = values[Matrix.MTRANS_X]; in testApplyTransformation() 85 float trans1Y = values[Matrix.MTRANS_Y]; in testApplyTransformation() 88 transformation.getMatrix().getValues(values); in testApplyTransformation() 89 assertMatrixValue(MID_X, MID_Y, values); in testApplyTransformation() 90 float trans2X = values[Matrix.MTRANS_X]; in testApplyTransformation() 91 float trans2Y = values[Matrix.MTRANS_Y]; in testApplyTransformation() 94 transformation.getMatrix().getValues(values); in testApplyTransformation() [all …]
|
D | TranslateAnimationTest.java | 100 float values[] = new float[9]; in testApplyTransformation() local 103 transformation.getMatrix().getValues(values); in testApplyTransformation() 104 assertEquals(FROM_X_DETLTA, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation() 105 assertEquals(FROM_Y_DELTA, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation() 109 transformation.getMatrix().getValues(values); in testApplyTransformation() 110 assertEquals((TO_X_DELTA + FROM_X_DETLTA) / 2, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation() 111 assertEquals((TO_Y_DELTA + FROM_Y_DELTA) / 2, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation() 115 transformation.getMatrix().getValues(values); in testApplyTransformation() 116 assertEquals(TO_X_DELTA, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation() 117 assertEquals(TO_Y_DELTA, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation() [all …]
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/ |
D | MagnitudeVerificationTest.java | 37 float[][] values = { in testVerify() local 45 runStats(5.0f, 0.1f, values, true, 5.0f); in testVerify() 46 runStats(4.5f, 0.6f, values, true, 5.0f); in testVerify() 47 runStats(5.5f, 0.6f, values, true, 5.0f); in testVerify() 48 runStats(4.5f, 0.1f, values, false, 5.0f); in testVerify() 49 runStats(5.5f, 0.1f, values, false, 5.0f); in testVerify() 52 …private void runStats(float expected, float threshold, float[][] values, boolean pass, float magni… in runStats() argument 54 MagnitudeVerification verification = getVerification(expected, threshold, values); in runStats() 70 float[] ... values) { in getVerification() argument 71 Collection<TestSensorEvent> events = new ArrayList<>(values.length); in getVerification() [all …]
|
D | StandardDeviationVerificationTest.java | 38 float[][] values = { in testVerify() local 50 runVerification(threshold, values, true, standardDeviations); in testVerify() 53 runVerification(threshold, values, false, standardDeviations); in testVerify() 56 runVerification(threshold, values, false, standardDeviations); in testVerify() 59 runVerification(threshold, values, false, standardDeviations); in testVerify() 62 private void runVerification(float[] threshold, float[][] values, boolean pass, in runVerification() argument 65 StandardDeviationVerification verification = getVerification(threshold, values); in runVerification() 87 float[] ... values) { in getVerification() argument 88 Collection<TestSensorEvent> events = new ArrayList<>(values.length); in getVerification() 89 for (float[] value : values) { in getVerification()
|
D | MeanVerificationTest.java | 37 float[][] values = { in testVerify() local 48 MeanVerification verification = getVerification(expected, threshold, values); in testVerify() 55 verification = getVerification(expected, threshold, values); in testVerify() 62 verification = getVerification(expected, threshold, values); in testVerify() 74 verification = getVerification(expected, threshold, values); in testVerify() 85 verification = getVerification(expected, threshold, values); in testVerify() 96 float[] ... values) { in getVerification() argument 97 Collection<TestSensorEvent> events = new ArrayList<>(values.length); in getVerification() 98 for (float[] value : values) { in getVerification()
|
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
D | DataUtil.java | 42 ContentValues values = new ContentValues(); in insertName() local 43 values.put(ContactsContract.Data.MIMETYPE, in insertName() 45 values.put(CommonDataKinds.StructuredName.DISPLAY_NAME, name); in insertName() 46 insertData(resolver, rawContactId, values); in insertName() 51 ContentValues values = new ContentValues(); in insertPhoneNumber() local 52 values.put(ContactsContract.Data.MIMETYPE, CommonDataKinds.Phone.CONTENT_ITEM_TYPE); in insertPhoneNumber() 53 values.put(CommonDataKinds.Phone.NUMBER, number); in insertPhoneNumber() 54 return DataUtil.insertData(resolver, rawContactId, values); in insertPhoneNumber() 58 ContentValues values = new ContentValues(); in insertEmail() local 59 values.put(ContactsContract.Data.MIMETYPE, CommonDataKinds.Email.CONTENT_ITEM_TYPE); in insertEmail() [all …]
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
D | TestSensorEvent.java | 34 public final float values[]; field in TestSensorEvent 54 values = event.values.clone(); in TestSensorEvent() 65 public TestSensorEvent(Sensor sensor, long timestamp, int accuracy, float[] values) { in TestSensorEvent() argument 66 this(sensor, timestamp, timestamp, accuracy, values); in TestSensorEvent() 73 float[] values) { in TestSensorEvent() argument 78 this.values = values; in TestSensorEvent() 88 Arrays.toString(this.values)); in toString()
|
D | MovementDetectorHelper.java | 87 mGravity[0] = event.values[0]; in onSensorChanged() 88 mGravity[1] = event.values[1]; in onSensorChanged() 89 mGravity[2] = event.values[2]; in onSensorChanged() 92 mGravity[0] = ALPHA * mGravity[0] + (1 - ALPHA) * event.values[0]; in onSensorChanged() 93 mGravity[1] = ALPHA * mGravity[1] + (1 - ALPHA) * event.values[1]; in onSensorChanged() 94 mGravity[2] = ALPHA * mGravity[2] + (1 - ALPHA) * event.values[2]; in onSensorChanged() 98 linearAcceleration[0] = event.values[0] - mGravity[0]; in onSensorChanged() 99 linearAcceleration[1] = event.values[1] - mGravity[1]; in onSensorChanged() 100 linearAcceleration[2] = event.values[2] - mGravity[2]; in onSensorChanged()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/ |
D | MockTvInputSetupActivity.java | 68 ContentValues values = new ContentValues(); in onCreate() local 69 values.put(TvContract.Channels.COLUMN_INPUT_ID, inputId); in onCreate() 70 values.put(TvContract.Channels.COLUMN_DISPLAY_NUMBER, CHANNEL_NUMBER); in onCreate() 71 values.put(TvContract.Channels.COLUMN_DISPLAY_NAME, CHANNEL_NAME); in onCreate() 72 Uri channelUri = getContentResolver().insert(uri, values); in onCreate() 76 channelUri = getContentResolver().insert(uri, values); in onCreate() 80 values = new ContentValues(); in onCreate() 81 values.put(Programs.COLUMN_CHANNEL_ID, ContentUris.parseId(channelUri)); in onCreate() 82 values.put(Programs.COLUMN_TITLE, PROGRAM_TITLE); in onCreate() 83 values.put(Programs.COLUMN_SHORT_DESCRIPTION, PROGRAM_DESCRIPTION); in onCreate() [all …]
|
/cts/tests/tests/database/src/android/database/cts/ |
D | DatabaseUtils_InsertHelperTest.java | 146 ContentValues values = new ContentValues(); in testInsert() local 147 values.put("boolean_value", false); in testInsert() 148 values.put("int_value", 123); in testInsert() 149 values.put("long_value", 987654L); in testInsert() 150 values.put("double_value", 654.321); in testInsert() 151 values.put("float_value", 21.1f); in testInsert() 152 values.put("string_value", "insert another row"); in testInsert() 153 values.put("blob_value", blob); in testInsert() 154 values.putNull("null_value"); in testInsert() 155 id = mInsertHelper.insert(values); in testInsert() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | MatrixTest.java | 181 float[] values = new float[9]; in testPreRotate2() local 182 mMatrix.getValues(values); in testPreRotate2() 201 float[] values = new float[9]; in testPreConcat() local 202 values[0] = 1000; in testPreConcat() 204 matrix.setValues(values); in testPreConcat() 256 float[] values = new float[9]; in testPostConcat() local 257 values[0] = 1000; in testPostConcat() 258 matrix.setValues(values); in testPostConcat() 301 float[] values = new float[9]; in testInvert() local 302 values[0] = 1000f; in testInvert() [all …]
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | DeviceInfoActivity.java | 396 private static boolean[] checkArray(boolean[] values) { in checkArray() argument 397 if (values.length > MAX_ARRAY_LENGTH) { in checkArray() 398 return Arrays.copyOf(values, MAX_ARRAY_LENGTH); in checkArray() 400 return values; in checkArray() 404 private static double[] checkArray(double[] values) { in checkArray() argument 405 if (values.length > MAX_ARRAY_LENGTH) { in checkArray() 406 return Arrays.copyOf(values, MAX_ARRAY_LENGTH); in checkArray() 408 return values; in checkArray() 412 private static int[] checkArray(int[] values) { in checkArray() argument 413 if (values.length > MAX_ARRAY_LENGTH) { in checkArray() [all …]
|