Home
last modified time | relevance | path

Searched refs:Length (Results 1 – 25 of 76) sorted by relevance

1234

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/units/
DLengthTest.java21 import android.health.connect.datatypes.units.Length;
34 assertThat(Length.fromMeters(10.0)).isInstanceOf(Length.class); in testCreate()
35 assertThat(Length.fromMeters(10.0).getInMeters()).isEqualTo(10.0); in testCreate()
40 Length Length1 = Length.fromMeters(10.0); in testEquals()
41 Length Length2 = Length.fromMeters(10.0); in testEquals()
42 Length Length3 = Length.fromMeters(20.0); in testEquals()
50 Length Length1 = Length.fromMeters(10.0); in testCompare()
51 Length Length2 = Length.fromMeters(10.0); in testCompare()
52 Length Length3 = Length.fromMeters(20.0); in testCompare()
/packages/modules/Bluetooth/system/common/
Dleaky_bonded_queue_unittest.cc56 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
58 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); in TEST()
60 EXPECT_EQ(queue->Length(), static_cast<size_t>(2)); in TEST()
62 EXPECT_EQ(queue->Length(), static_cast<size_t>(3)); in TEST()
65 EXPECT_EQ(queue->Length(), static_cast<size_t>(3)); in TEST()
92 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
94 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); in TEST()
97 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
99 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); in TEST()
101 EXPECT_EQ(queue->Length(), static_cast<size_t>(2)); in TEST()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DExerciseRouteTest.java27 import android.health.connect.datatypes.units.Length;
68 .setHorizontalAccuracy(Length.fromMeters(horizontalAcc)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
69 .setVerticalAccuracy(Length.fromMeters(verticalAcc)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
70 .setAltitude(Length.fromMeters(altitude)) in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
76 assertThat(point.getAltitude()).isEqualTo(Length.fromMeters(altitude)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
77 assertThat(point.getHorizontalAccuracy()).isEqualTo(Length.fromMeters(horizontalAcc)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
78 assertThat(point.getVerticalAccuracy()).isEqualTo(Length.fromMeters(verticalAcc)); in testExerciseRouteLocation_setExtraFieldsViaBuilder_buildCorrectObject()
98 .setHorizontalAccuracy(Length.fromMeters(-5)) in testExerciseRouteLocation_horizontalAccuracyIsInvalid_throwsException()
106 .setHorizontalAccuracy(Length.fromMeters(-5)) in testExerciseRouteLocation_verticalAccuracyIsInvalid_throwsException()
127 .setHorizontalAccuracy(Length.fromMeters(horizontalAcc)) in testExerciseRouteLocation_parcelable()
[all …]
DHeightRecordTest.java50 import android.health.connect.datatypes.units.Length;
340 AggregateRecordsResponse<Length> response = in testAggregation_Height()
342 new AggregateRecordsRequest.Builder<Length>( in testAggregation_Height()
356 Length maxHeight = response.get(HEIGHT_MAX); in testAggregation_Height()
357 Length minHeight = response.get(HEIGHT_MIN); in testAggregation_Height()
358 Length avgHeight = response.get(HEIGHT_AVG); in testAggregation_Height()
378 new Metadata.Builder().build(), Instant.now(), Length.fromMeters(1.0)); in testZoneOffsets()
541 new Metadata.Builder().build(), Instant.now(), Length.fromMeters(3.1)) in testCreateHeightRecord_invalidValue()
568 insertAndReadRecords(recordCount, Length.fromMeters(1.0)); in insertRecords_sameClientRecordIdAndNewData_readNewData()
570 Length newHeight = Length.fromMeters(2.0); in insertRecords_sameClientRecordIdAndNewData_readNewData()
[all …]
DExerciseCompletionGoalTest.java35 import android.health.connect.datatypes.units.Length;
72 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in distanceGoal_equalsAndHashCode()
73 .isNotEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200))); in distanceGoal_equalsAndHashCode()
74 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in distanceGoal_equalsAndHashCode()
75 .isEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in distanceGoal_equalsAndHashCode()
77 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()) in distanceGoal_equalsAndHashCode()
79 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200)).hashCode()); in distanceGoal_equalsAndHashCode()
80 assertThat(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()) in distanceGoal_equalsAndHashCode()
82 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)).hashCode()); in distanceGoal_equalsAndHashCode()
89 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(500))); in distanceGoal_insertionAndRead()
[all …]
DPlannedExerciseStepTest.java25 import android.health.connect.datatypes.units.Length;
55 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in hashCodeAndEquals_sensitiveToAllFields()
142 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100)); in hashCodeAndEquals_sensitiveToAllFields()
144 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(200)); in hashCodeAndEquals_sensitiveToAllFields()
161 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in setDescriptionNull_setsDescriptionToNull()
173 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in clearPerformanceGoals_removesAllExistingPerformanceGoals()
186 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getCompletionGoal()
189 .isEqualTo(new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getCompletionGoal()
198 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getExerciseType()
210 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in getExerciseCategory()
[all …]
DExerciseLapTest.java28 import android.health.connect.datatypes.units.Length;
43 .setLength(Length.fromMeters(12)) in testExerciseLap_buildLap_buildCorrectObject()
47 assertThat(lap.getLength()).isEqualTo(Length.fromMeters(12)); in testExerciseLap_buildLap_buildCorrectObject()
63 new ExerciseLap.Builder(START_TIME, END_TIME).setLength(Length.fromMeters(-10)).build(); in testExerciseLap_lengthIsNegative_throwsException()
68 new ExerciseLap.Builder(START_TIME, END_TIME).setLength(Length.fromMeters(1e10)).build(); in testExerciseLap_lengthIsHuge_throwsException()
DElevationGainedRecordTest.java42 import android.health.connect.datatypes.units.Length;
357 AggregateRecordsResponse<Length> oldResponse = in testAggregation_ElevationTotal()
359 new AggregateRecordsRequest.Builder<Length>( in testAggregation_ElevationTotal()
369 AggregateRecordsResponse<Length> newResponse = in testAggregation_ElevationTotal()
371 new AggregateRecordsRequest.Builder<Length>( in testAggregation_ElevationTotal()
379 Length newElevation = newResponse.get(ELEVATION_GAINED_TOTAL); in testAggregation_ElevationTotal()
380 Length oldElevation = oldResponse.get(ELEVATION_GAINED_TOTAL); in testAggregation_ElevationTotal()
405 Length.fromMeters(10.0)); in testZoneOffsets()
423 Length.fromMeters(1000001.0)) in testCreateElevationGainedRecord_invalidValue()
609 Length.fromMeters(20.0)) in getElevationGainedRecord_update()
[all …]
DPlannedExerciseBlockTest.java25 import android.health.connect.datatypes.units.Length;
74 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in hashCodeAndEquals_sensitiveToAllFields()
100 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))); in clearSteps_removesAllExistingSteps()
122 new ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(100))) in addStep()
DDistanceRecordTest.java42 import android.health.connect.datatypes.units.Length;
350 Length.fromMeters(distance)) in getBaseDistanceRecordWithSameStartAndEndTime()
365 Length.fromMeters(10.0)); in testZoneOffsets()
539 Length.fromMeters(1000001.0)) in testCreateDistanceRecord_invalidValue()
558 Length.fromMeters(20.0)) in getDistanceRecord_update()
572 AggregateRecordsResponse<Length> response = in testAggregation_DistanceTotal_AtOverlapStartAndEndTime()
574 new AggregateRecordsRequest.Builder<Length>( in testAggregation_DistanceTotal_AtOverlapStartAndEndTime()
590 Length.fromMeters(10.0)) in getBaseDistanceRecord()
600 Length.fromMeters(distance)) in getBaseDistanceRecord()
621 Length.fromMeters(10.0)) in getCompleteDistanceRecord()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/units/
DLength.java24 public final class Length implements Comparable<Length> { class
27 private Length(double value) { in Length() method in Length
37 public static Length fromMeters(double value) { in fromMeters()
38 return new Length(value); in fromMeters()
59 public int compareTo(@NonNull Length other) { in compareTo()
73 if (object instanceof Length) { in equals()
74 Length other = (Length) object; in equals()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/
DExerciseRoute.java22 import android.health.connect.datatypes.units.Length;
119 private final Length mHorizontalAccuracy;
120 private final Length mVerticalAccuracy;
121 private final Length mAltitude;
133 builder.setHorizontalAccuracy(Length.fromMeters(source.readDouble()));
136 builder.setVerticalAccuracy(Length.fromMeters(source.readDouble()));
139 builder.setAltitude(Length.fromMeters(source.readDouble()));
172 @Nullable Length horizontalAccuracy, in Location()
173 @Nullable Length verticalAccuracy, in Location()
174 @Nullable Length altitude, in Location()
[all …]
DHeightRecord.java22 import android.health.connect.datatypes.units.Length;
34 private final Length mHeight;
40 public static final AggregationType<Length> HEIGHT_AVG =
45 Length.class);
51 public static final AggregationType<Length> HEIGHT_MIN =
56 Length.class);
62 public static final AggregationType<Length> HEIGHT_MAX =
67 Length.class);
80 @NonNull Length height, in HeightRecord()
96 public Length getHeight() { in getHeight()
[all …]
DExerciseLap.java21 import android.health.connect.datatypes.units.Length;
40 private final Length mLength;
44 @NonNull TimeInterval interval, @Nullable Length length, boolean skipValidation) { in ExerciseLap()
49 Length.fromMeters(0.0), in ExerciseLap()
50 Length.fromMeters(MAX_LAP_LENGTH_METRES), in ExerciseLap()
61 public Length getLength() { in getLength()
123 private Length mLength;
137 public ExerciseLap.Builder setLength(@NonNull Length length) { in setLength()
DElevationGainedRecord.java22 import android.health.connect.datatypes.units.Length;
40 private final Length mElevation;
53 @NonNull Length elevation) { in Builder()
135 public static final AggregationType<Length> ELEVATION_GAINED_TOTAL =
141 Length.class);
143 private final Length mElevation;
160 @NonNull Length elevation, in ElevationGainedRecord()
182 public Length getElevation() { in getElevation()
DDistanceRecord.java22 import android.health.connect.datatypes.units.Length;
48 private final Length mDistance;
61 @NonNull Length distance) { in Builder()
142 public static final AggregationType<Length> DISTANCE_TOTAL =
147 Length.class);
149 private final Length mDistance;
166 @NonNull Length distance, in DistanceRecord()
188 public Length getDistance() { in getDistance()
DExerciseCompletionGoal.java23 import android.health.connect.datatypes.units.Length;
34 private final Length mDistance;
39 public DistanceGoal(@NonNull Length distance) { in DistanceGoal()
46 public Length getDistance() { in getDistance()
75 private final Length mDistance;
82 public DistanceWithVariableRestGoal(@NonNull Length distance, @NonNull Duration duration) { in DistanceWithVariableRestGoal()
91 public Length getDistance() { in getDistance()
/packages/modules/HealthFitness/tests/cts/route/src/android/healthconnect/cts/route/
DExerciseRouteTestHelper.java41 import android.health.connect.datatypes.units.Length;
119 .setAltitude(Length.fromMeters(14)) in getRoute()
120 .setHorizontalAccuracy(Length.fromMeters(3)) in getRoute()
121 .setVerticalAccuracy(Length.fromMeters(5)) in getRoute()
129 .setAltitude(Length.fromMeters(123)) in getAnotherRoute()
130 .setHorizontalAccuracy(Length.fromMeters(7)) in getAnotherRoute()
131 .setVerticalAccuracy(Length.fromMeters(11)) in getAnotherRoute()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/
DPlannedExerciseBlockFormatterTest.kt22 import android.health.connect.datatypes.units.Length
75 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
100 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
110 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
137 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
147 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
163 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
187 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(3500.0)), in <lambda>()
DPlannedExerciseSessionRecordFormatterTest.kt22 import android.health.connect.datatypes.units.Length
77 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
93 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
121 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
137 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
168 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(1000.0)), in <lambda>()
199 ExerciseCompletionGoal.DistanceGoal(Length.fromMeters(4000.0)), in <lambda>()
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/
DExerciseCompletionGoalInternal.java22 import android.health.connect.datatypes.units.Length;
127 return new DistanceGoalInternal(Length.fromMeters(parcel.readDouble())); in readFieldsFromParcel()
130 private final Length mDistance;
132 public DistanceGoalInternal(@NonNull Length distance) { in DistanceGoalInternal()
137 public Length getDistance() { in getDistance()
353 Length.fromMeters(parcel.readDouble()), Duration.ofMillis(parcel.readLong())); in readFieldsFromParcel()
356 private final Length mDistance;
361 @NonNull Length distance, @NonNull Duration duration) { in DistanceWithVariableRestGoalInternal()
367 public Length getDistance() { in getDistance()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DDistanceFormatter.kt20 import android.health.connect.datatypes.units.Length
30 EntryFormatter<DistanceRecord>(context), UnitFormatter<Length> {
46 override fun formatUnit(unit: Length): String { in formatUnit()
50 override fun formatA11yUnit(unit: Length): String { in formatA11yUnit()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/shared/
DLengthFormatter.kt22 import android.health.connect.datatypes.units.Length
32 fun formatValue(context: Context, length: Length?, unitPreferences: UnitPreferences): String { in formatValue()
46 length: Length?, in formatA11yValue()
63 length: Length, in formatSample()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/api/
DLoadDataAggregationsUseCaseTest.kt9 import android.health.connect.datatypes.units.Length in <lambda>()
109 .aggregate<Length>( in <lambda>()
183 (InvocationOnMock) -> AggregateRecordsResponse<Length> { in <lambda>()
185 val receiver = args.arguments[2] as OutcomeReceiver<AggregateRecordsResponse<Length>, *> in <lambda>()
221 private fun getDistanceAggregationResponse(): AggregateRecordsResponse<Length> { in <lambda>()
222 val aggregationResult = AggregateResult(Length.fromMeters(1000.0)) in <lambda>()
224 return AggregateRecordsResponse<Length>( in <lambda>()
/packages/modules/HealthFitness/tests/unittests/src/android/healthconnect/internal/datatypes/
DExerciseCompletionGoalInternalTest.java22 import android.health.connect.datatypes.units.Length;
42 DistanceGoalInternal original = new DistanceGoalInternal(Length.fromMeters(800)); in distanceGoal_writeToParcelThenRestore_objectsAreIdentical()
55 DistanceGoalInternal original = new DistanceGoalInternal(Length.fromMeters(800)); in distanceGoal_convertToExternalAndBack_objectsAreIdentical()
200 Length.fromMeters(100), Duration.ofMinutes(2)); in distanceWithVariableRestGoal_writeToParcelThenRestore_objectsAreIdentical()
216 Length.fromMeters(100), Duration.ofMinutes(2)); in distanceWithVariableRestGoal_convertToExternalAndBack_objectsAreIdentical()

1234