Home
last modified time | relevance | path

Searched refs:values (Results 1 – 25 of 624) sorted by relevance

12345678910>>...25

/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DOffsetVerificationTest.java46 float[][] values = null; in testSingleEventVerify() local
49 values = new float[][]{ {10, 10, 10, 2, 2, 2} }; in testSingleEventVerify()
50 runStats(2.0f /* threshold */, values, true /* pass */); in testSingleEventVerify()
51 runStats(1.9f /* threshold */, values, false /* pass */); in testSingleEventVerify()
54 values = new float[][]{ {10, 10, 10, 2, 0, 0} }; in testSingleEventVerify()
55 runStats(2.0f /* threshold */, values, true /* pass */); in testSingleEventVerify()
56 runStats(1.9f /* threshold */, values, false /* pass */); in testSingleEventVerify()
59 values = new float[][]{ {10, 10, 10, 0, 0, 2} }; in testSingleEventVerify()
60 runStats(2.0f /* threshold */, values, true /* pass */); in testSingleEventVerify()
61 runStats(1.9f /* threshold */, values, false /* pass */); in testSingleEventVerify()
[all …]
DMagnitudeVerificationTest.java37 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 …]
DStandardDeviationVerificationTest.java38 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()
DHingeAngleVerification.java56 if (lastEvent != null && lastEvent.values[0] == event.values[0]) { in verify()
59 " time=%s, value=%s", event.timestamp, event.values[0], lastEvent.timestamp, in verify()
60 lastEvent.values[0]); in verify()
64 if (event.values[0] > maxRange) { in verify()
67 " range=%s", event.timestamp, event.values[0], maxRange); in verify()
71 if (event.values[0] < 0) { in verify()
74 event.timestamp, event.values[0]); in verify()
80 float remainder = event.values[0] == 0.0f ? 0 : Math.abs(event.values[0] % resolution); in verify()
84 " resolution=%s %s", event.timestamp, event.values[0], resolution, in verify()
DMeanVerificationTest.java38 float[][] values = { in testVerify() local
51 getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
59 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
65 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
76 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
87 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
101 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
107 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
118 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
129 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
[all …]
/cts/tests/mediaprovider/modern/src/android/provider/cts/media/modern/
DMediaStoreAudioTestHelper.java66 final ContentValues values = getContentValues(volumeName); in insert() local
68 values.getAsString(MediaStore.Audio.Media.DATA) in insert()
71 final Uri itemUri = contentResolver.insert(dirUri, values); in insert()
111 ContentValues values = new ContentValues(); in getContentValues() local
119 values.put(Media.DATA, data.getAbsolutePath()); in getContentValues()
123 values.put(Media.DATE_MODIFIED, DATE_MODIFIED); in getContentValues()
124 values.put(Media.DISPLAY_NAME, DISPLAY_NAME); in getContentValues()
125 values.put(Media.MIME_TYPE, MIME_TYPE); in getContentValues()
126 values.put(Media.SIZE, SIZE); in getContentValues()
127 values.put(Media.TITLE, TITLE); in getContentValues()
[all …]
/cts/tests/mediaprovider/src/android/provider/cts/media/
DMediaStoreAudioTestHelper.java66 final ContentValues values = getContentValues(volumeName); in insert() local
68 values.getAsString(MediaStore.Audio.Media.DATA) in insert()
71 final Uri itemUri = contentResolver.insert(dirUri, values); in insert()
111 ContentValues values = new ContentValues(); in getContentValues() local
119 values.put(Media.DATA, data.getAbsolutePath()); in getContentValues()
123 values.put(Media.DATE_MODIFIED, DATE_MODIFIED); in getContentValues()
124 values.put(Media.DISPLAY_NAME, DISPLAY_NAME); in getContentValues()
125 values.put(Media.MIME_TYPE, MIME_TYPE); in getContentValues()
126 values.put(Media.SIZE, SIZE); in getContentValues()
127 values.put(Media.TITLE, TITLE); in getContentValues()
[all …]
/cts/tests/app/src/android/app/cts/
DActivityManager_RunningServiceInfoTest.java60 ActivityManager.RunningServiceInfo values = in testWriteToParcel() local
62 assertEquals(mService, values.service); in testWriteToParcel()
63 assertEquals(1, values.pid); in testWriteToParcel()
64 assertEquals(PROCESS, values.process); in testWriteToParcel()
65 assertTrue(values.foreground); in testWriteToParcel()
66 assertEquals(1l, values.activeSince); in testWriteToParcel()
67 assertTrue(values.started); in testWriteToParcel()
68 assertEquals(2, values.clientCount); in testWriteToParcel()
69 assertEquals(1, values.crashCount); in testWriteToParcel()
70 assertEquals(1l, values.lastActivityTime); in testWriteToParcel()
[all …]
DActivityManagerProcessErrorStateInfoTest.java59 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 …]
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvContractTest.java161 ContentValues values = new ContentValues(); in createDummyChannelValues() local
162 values.put(Channels.COLUMN_INPUT_ID, inputId); in createDummyChannelValues()
163 values.put(Channels.COLUMN_INTERNAL_PROVIDER_ID, "ID-4321"); in createDummyChannelValues()
164 values.put(Channels.COLUMN_TYPE, preview ? Channels.TYPE_PREVIEW : Channels.TYPE_OTHER); in createDummyChannelValues()
165 values.put(Channels.COLUMN_SERVICE_TYPE, Channels.SERVICE_TYPE_AUDIO_VIDEO); in createDummyChannelValues()
166 values.put(Channels.COLUMN_DISPLAY_NUMBER, "1"); in createDummyChannelValues()
167 values.put(Channels.COLUMN_VIDEO_FORMAT, Channels.VIDEO_FORMAT_480P); in createDummyChannelValues()
169 return values; in createDummyChannelValues()
173 ContentValues values = new ContentValues(); in createDummyProgramValues() local
174 values.put(Programs.COLUMN_CHANNEL_ID, channelId); in createDummyProgramValues()
[all …]
/cts/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/
DSimPhonebookContract_SimRecordsTest.java209 ContentValues values = new ContentValues(); in insertAdn_addsRecordAndReturnsValidUri() local
210 values.put(SimRecords.NAME, "Name"); in insertAdn_addsRecordAndReturnsValidUri()
211 values.put(SimRecords.PHONE_NUMBER, "8005550101"); in insertAdn_addsRecordAndReturnsValidUri()
214 values); in insertAdn_addsRecordAndReturnsValidUri()
234 ContentValues values = new ContentValues(); in updateAdn_existingRecord_updatesRecordAndReturns1() local
235 values.put(SimRecords.NAME, "Updated"); in updateAdn_existingRecord_updatesRecordAndReturns1()
236 values.put(SimRecords.PHONE_NUMBER, "8005550102"); in updateAdn_existingRecord_updatesRecordAndReturns1()
237 int count = mResolver.update(uri, values, null); in updateAdn_existingRecord_updatesRecordAndReturns1()
238 mResolver.update(uri, values, null, null); in updateAdn_existingRecord_updatesRecordAndReturns1()
257 ContentValues values = new ContentValues(); in updateAdn_unusedIndex_updatesRecordAndReturns1() local
[all …]
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DGroupUtil.java43 ContentValues values = new ContentValues(); in insertGroupWithoutAccount() local
44 values.put(Groups.TITLE, "group a"); in insertGroupWithoutAccount()
45 Uri uri = resolver.insert(URI, values); in insertGroupWithoutAccount()
59 ContentValues values = new ContentValues(); in insertGroupWithAccount() local
60 values.put(Groups.TITLE, "group a"); in insertGroupWithAccount()
62 values.put(ContactsContract.Groups.ACCOUNT_NAME, (String) null); in insertGroupWithAccount()
63 values.put(ContactsContract.Groups.ACCOUNT_TYPE, (String) null); in insertGroupWithAccount()
65 values.put(ContactsContract.Groups.ACCOUNT_NAME, account.name); in insertGroupWithAccount()
66 values.put(ContactsContract.Groups.ACCOUNT_TYPE, account.type); in insertGroupWithAccount()
68 values.put(ContactsContract.Groups.DATA_SET, (String) null); in insertGroupWithAccount()
[all …]
DDataUtil.java47 ContentValues values = new ContentValues(); in insertName() local
48 values.put(ContactsContract.Data.MIMETYPE, in insertName()
50 values.put(CommonDataKinds.StructuredName.DISPLAY_NAME, name); in insertName()
51 insertData(resolver, rawContactId, values); in insertName()
56 ContentValues values = new ContentValues(); in insertPhoneNumber() local
57 values.put(ContactsContract.Data.MIMETYPE, CommonDataKinds.Phone.CONTENT_ITEM_TYPE); in insertPhoneNumber()
58 values.put(CommonDataKinds.Phone.NUMBER, number); in insertPhoneNumber()
59 return DataUtil.insertData(resolver, rawContactId, values); in insertPhoneNumber()
63 ContentValues values = new ContentValues(); in insertEmail() local
64 values.put(ContactsContract.Data.MIMETYPE, CommonDataKinds.Email.CONTENT_ITEM_TYPE); in insertEmail()
[all …]
DCallLogProviderTest.java51 ContentValues values = new ContentValues(); in testNoSubqueries() local
52 values.put(CallLog.Calls.NUMBER, TEST_NUMBER); in testNoSubqueries()
53 values.put(CallLog.Calls.TYPE, Calls.OUTGOING_TYPE); in testNoSubqueries()
54 values.put(CallLog.Calls.DATE, Long.valueOf(0 /*start time*/)); in testNoSubqueries()
55 values.put(CallLog.Calls.DURATION, Long.valueOf(5 /*call duration*/)); in testNoSubqueries()
57 mContentResolver.insert(CallLog.Calls.CONTENT_URI, values); in testNoSubqueries()
73 ContentValues values = new ContentValues(); in testUpdate() local
74 values.put(CallLog.Calls.NUMBER, TEST_NUMBER); in testUpdate()
75 values.put(CallLog.Calls.TYPE, Calls.OUTGOING_TYPE); in testUpdate()
76 values.put(CallLog.Calls.DATE, Long.valueOf(0 /*start time*/)); in testUpdate()
[all …]
DRawContactUtil.java37 ContentValues values) { in update() argument
39 return resolver.update(uri, values, null, null); in update()
52 ContentValues values = new ContentValues(); in updateRawContactAccount() local
55 values.put(ContactsContract.RawContacts.ACCOUNT_NAME, (String) null); in updateRawContactAccount()
56 values.put(ContactsContract.RawContacts.ACCOUNT_TYPE, (String) null); in updateRawContactAccount()
58 values.put(ContactsContract.RawContacts.ACCOUNT_NAME, accountUpdateTo.name); in updateRawContactAccount()
59 values.put(ContactsContract.RawContacts.ACCOUNT_TYPE, accountUpdateTo.type); in updateRawContactAccount()
61 return update(resolver, rawContactId, values); in updateRawContactAccount()
89 ContentValues values = new ContentValues(); in insertRawContactIgnoringNullAccount() local
91 values.put(ContactsContract.RawContacts.ACCOUNT_NAME, account.name); in insertRawContactIgnoringNullAccount()
[all …]
DContactsContract_DataUsageTest.java160 ContentValues values; in testUsageUpdate() local
162 values = new ContentValues(); in testUsageUpdate()
163 values.put(Contacts.LAST_TIME_CONTACTED, 123); in testUsageUpdate()
164 assertEquals(1, ContactUtil.update(mResolver, contact.getId(), values)); in testUsageUpdate()
166 values = new ContentValues(); in testUsageUpdate()
167 values.put(Contacts.LAST_TIME_CONTACTED, 123); in testUsageUpdate()
168 assertEquals(1, RawContactUtil.update(mResolver, rawContact.getId(), values)); in testUsageUpdate()
170 values = new ContentValues(); in testUsageUpdate()
171 values.put(Contacts.TIMES_CONTACTED, 456); in testUsageUpdate()
172 assertEquals(1, ContactUtil.update(mResolver, contact.getId(), values)); in testUsageUpdate()
[all …]
/cts/tests/tests/view/src/android/view/animation/cts/
DScaleAnimationTest.java107 float values[] = new float[9]; in testApplyTransformation() local
111 transformation.getMatrix().getValues(values); in testApplyTransformation()
112 assertMatrixValue(FROM_X, FROM_Y, values); in testApplyTransformation()
113 float trans1X = values[Matrix.MTRANS_X]; in testApplyTransformation()
114 float trans1Y = values[Matrix.MTRANS_Y]; in testApplyTransformation()
117 transformation.getMatrix().getValues(values); in testApplyTransformation()
118 assertMatrixValue(MID_X, MID_Y, values); in testApplyTransformation()
119 float trans2X = values[Matrix.MTRANS_X]; in testApplyTransformation()
120 float trans2Y = values[Matrix.MTRANS_Y]; in testApplyTransformation()
123 transformation.getMatrix().getValues(values); in testApplyTransformation()
[all …]
DTranslateAnimationTest.java130 float values[] = new float[9]; in testApplyTransformation() local
133 transformation.getMatrix().getValues(values); in testApplyTransformation()
134 assertEquals(FROM_X_DELTA, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation()
135 assertEquals(FROM_Y_DELTA, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation()
139 transformation.getMatrix().getValues(values); in testApplyTransformation()
140 assertEquals((TO_X_DELTA + FROM_X_DELTA) / 2, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation()
141 assertEquals((TO_Y_DELTA + FROM_Y_DELTA) / 2, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation()
145 transformation.getMatrix().getValues(values); in testApplyTransformation()
146 assertEquals(TO_X_DELTA, values[Matrix.MTRANS_X], POSITION_DELTA); in testApplyTransformation()
147 assertEquals(TO_Y_DELTA, values[Matrix.MTRANS_Y], POSITION_DELTA); in testApplyTransformation()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/
DMockTvInputSetupActivity.java77 ContentValues values = new ContentValues(); in onCreate() local
78 values.put(TvContract.Channels.COLUMN_INPUT_ID, inputId); in onCreate()
79 values.put(TvContract.Channels.COLUMN_DISPLAY_NUMBER, CHANNEL_NUMBER); in onCreate()
80 values.put(TvContract.Channels.COLUMN_DISPLAY_NAME, CHANNEL_NAME); in onCreate()
81 values.put(TvContract.Channels.COLUMN_APP_LINK_TEXT, APP_LINK_TEXT); in onCreate()
82 values.put(TvContract.Channels.COLUMN_APP_LINK_COLOR, Color.RED); in onCreate()
83 values.put(TvContract.Channels.COLUMN_APP_LINK_ICON_URI, in onCreate()
85 values.put(TvContract.Channels.COLUMN_APP_LINK_POSTER_ART_URI, in onCreate()
90 values.put(TvContract.Channels.COLUMN_APP_LINK_INTENT_URI, in onCreate()
93 Uri channelUri = getContentResolver().insert(uri, values); in onCreate()
[all …]
/cts/tests/sensor/src/android/hardware/cts/helpers/
DTestSensorEvent.java34 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()
DMovementDetectorHelper.java87 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/audio/peripheralprofile/
DAudioStringsHelper.java90 public static String makeRatesList(int[] values) { in makeRatesList() argument
91 return makeIntList(values); in makeRatesList()
95 public static String makeIntList(int[] values) { in makeIntList() argument
97 for (int index = 0; index < values.length; index++) { in makeIntList()
98 sb.append(values[index]); in makeIntList()
99 if (index < values.length - 1) { in makeIntList()
108 public static String makeHexList(int[] values) { in makeHexList() argument
110 for (int index = 0; index < values.length; index++) { in makeHexList()
111 sb.append("0x" + Integer.toHexString(values[index]).toUpperCase()); in makeHexList()
112 if (index < values.length - 1) { in makeHexList()
/cts/tests/tests/database/src/android/database/cts/
DDatabaseUtils_InsertHelperTest.java146 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/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/
DDevicePolicyEventWrapper.java133 public Builder setStrings(String... values) { in setStrings() argument
134 mStringArrayValue = values; in setStrings()
138 public Builder setStrings(String value, String[] values) { in setStrings() argument
139 if (values == null) { in setStrings()
142 mStringArrayValue = new String[values.length + 1]; in setStrings()
144 System.arraycopy(values, 0, mStringArrayValue, 1, values.length); in setStrings()
148 public Builder setStrings(String value1, String value2, String[] values) { in setStrings() argument
149 if (values == null) { in setStrings()
152 mStringArrayValue = new String[values.length + 2]; in setStrings()
155 System.arraycopy(values, 0, mStringArrayValue, 2, values.length); in setStrings()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/audiolib/
DStatUtils.java21 double mean, double[] values, int numValues) { in calculateMeanAbsoluteDeviation() argument
24 sum += Math.abs(values[index] - mean); in calculateMeanAbsoluteDeviation()
29 public static double calculateMean(double[] values) { in calculateMean() argument
31 for (double value : values) { in calculateMean()
34 return sum / values.length; in calculateMean()

12345678910>>...25