/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/ |
D | NutritionRecord.java | 26 import android.health.connect.datatypes.units.Mass; 37 private static final Mass MASS_0_0 = Mass.fromGrams(0.0); 38 private static final Mass MASS_100 = Mass.fromGrams(100.0); 39 private static final Mass MASS_100000 = Mass.fromGrams(100000.0); 48 private Mass mUnsaturatedFat; 49 private Mass mPotassium; 50 private Mass mThiamin; 52 private Mass mTransFat; 53 private Mass mManganese; 55 private Mass mCaffeine; [all …]
|
D | WeightRecord.java | 22 import android.health.connect.datatypes.units.Mass; 33 private final Mass mWeight; 39 public static final AggregationType<Mass> WEIGHT_AVG = 44 Mass.class); 50 public static final AggregationType<Mass> WEIGHT_MAX = 55 Mass.class); 61 public static final AggregationType<Mass> WEIGHT_MIN = 66 Mass.class); 79 @NonNull Mass weight, in WeightRecord() 95 public Mass getWeight() { in getWeight() [all …]
|
D | LeanBodyMassRecord.java | 19 import android.health.connect.datatypes.units.Mass; 33 private final Mass mMass; 46 @NonNull Mass mass, in LeanBodyMassRecord() 62 public Mass getMass() { in getMass() 92 private final Mass mMass; 99 public Builder(@NonNull Metadata metadata, @NonNull Instant time, @NonNull Mass mass) { in Builder()
|
D | BodyWaterMassRecord.java | 22 import android.health.connect.datatypes.units.Mass; 34 private final Mass mBodyWaterMass; 47 @NonNull Mass bodyWaterMass, in BodyWaterMassRecord() 59 public Mass getBodyWaterMass() { in getBodyWaterMass() 88 private final Mass mBodyWaterMass; 97 @NonNull Metadata metadata, @NonNull Instant time, @NonNull Mass bodyWaterMass) { in Builder()
|
D | BoneMassRecord.java | 19 import android.health.connect.datatypes.units.Mass; 31 private final Mass mMass; 44 @NonNull Mass mass, in BoneMassRecord() 60 public Mass getMass() { in getMass() 90 private final Mass mMass; 97 public Builder(@NonNull Metadata metadata, @NonNull Instant time, @NonNull Mass mass) { in Builder()
|
D | ExercisePerformanceGoal.java | 22 import android.health.connect.datatypes.units.Mass; 232 private final Mass mMass; 237 public WeightGoal(@NonNull Mass mass) { in WeightGoal() 246 public Mass getMass() { in getMass()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/units/ |
D | MassTest.java | 21 import android.health.connect.datatypes.units.Mass; 34 assertThat(Mass.fromGrams(10.0)).isInstanceOf(Mass.class); in testCreate() 35 assertThat(Mass.fromGrams(10.0).getInGrams()).isEqualTo(10.0); in testCreate() 40 Mass Mass1 = Mass.fromGrams(10.0); in testEquals() 41 Mass Mass2 = Mass.fromGrams(10.0); in testEquals() 42 Mass Mass3 = Mass.fromGrams(20.0); in testEquals() 50 Mass Mass1 = Mass.fromGrams(10.0); in testCompare() 51 Mass Mass2 = Mass.fromGrams(10.0); in testCompare() 52 Mass Mass3 = Mass.fromGrams(20.0); in testCompare()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/ |
D | NutritionRecordTest.java | 85 import android.health.connect.datatypes.units.Mass; 114 private List<AggregationType<Mass>> mMassAggregateTypesList = 439 AggregateRecordsResponse<Mass> oldResponse = in testAggregation_NutritionValuesTotal() 441 new AggregateRecordsRequest.Builder<Mass>( in testAggregation_NutritionValuesTotal() 490 AggregateRecordsResponse<Mass> newResponse = in testAggregation_NutritionValuesTotal() 492 new AggregateRecordsRequest.Builder<Mass>( in testAggregation_NutritionValuesTotal() 539 for (AggregationType<Mass> type : mMassAggregateTypesList) { in testAggregation_NutritionValuesTotal() 540 Mass newTotal = newResponse.get(type); in testAggregation_NutritionValuesTotal() 541 Mass oldTotal = oldResponse.get(type); in testAggregation_NutritionValuesTotal() 809 .setUnsaturatedFat(Mass.fromGrams(0.1)) in getNutritionRecord_update() [all …]
|
D | WeightRecordTest.java | 55 import android.health.connect.datatypes.units.Mass; 252 return new WeightRecord.Builder(new Metadata.Builder().build(), time, Mass.fromGrams(50)) in getBaseWeightRecord() 366 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(10.0)); in testZoneOffsets() 550 List<AggregateRecordsGroupedByPeriodResponse<Mass>> responses = in testAggregatePeriodForZoneOffset() 552 new AggregateRecordsRequest.Builder<Mass>(filter) in testAggregatePeriodForZoneOffset() 560 assertThat(responses.get(i).get(WEIGHT_MIN)).isEqualTo(Mass.fromGrams(10.0)); in testAggregatePeriodForZoneOffset() 602 new WeightRecord.Builder(metadata, t1, Mass.fromGrams(50000)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 606 new WeightRecord.Builder(metadata, t2, Mass.fromGrams(100000)) in testAggregateDuration_differentTimeZones_correctBucketTimes() 613 List<AggregateRecordsGroupedByDurationResponse<Mass>> result = in testAggregateDuration_differentTimeZones_correctBucketTimes() 615 new AggregateRecordsRequest.Builder<Mass>( in testAggregateDuration_differentTimeZones_correctBucketTimes() [all …]
|
D | ExercisePerformanceGoalTest.java | 36 import android.health.connect.datatypes.units.Mass; 269 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))) in weightGoal_equalsAndHashCode() 270 .isNotEqualTo(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(200_000))); in weightGoal_equalsAndHashCode() 271 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))) in weightGoal_equalsAndHashCode() 272 .isEqualTo(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000))); in weightGoal_equalsAndHashCode() 274 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()) in weightGoal_equalsAndHashCode() 276 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(200_000)).hashCode()); in weightGoal_equalsAndHashCode() 277 assertThat(new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()) in weightGoal_equalsAndHashCode() 279 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(100_000)).hashCode()); in weightGoal_equalsAndHashCode() 286 new ExercisePerformanceGoal.WeightGoal(Mass.fromGrams(80_000))); in weightGoal_insertAndRead() [all …]
|
D | BodyWaterMassRecordTest.java | 39 import android.health.connect.datatypes.units.Mass; 312 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1)); in testZoneOffsets() 321 new BodyWaterMassRecord.Builder(generateMetadata(), TIME, Mass.fromGrams(40)) in testBodyWaterMass_buildSession_buildCorrectObject() 330 new BodyWaterMassRecord.Builder(metadata, TIME, Mass.fromGrams(40)).build(); in testBodyWaterMass_buildEqualSessions_equalsReturnsTrue() 332 new BodyWaterMassRecord.Builder(metadata, TIME, Mass.fromGrams(40)).build(); in testBodyWaterMass_buildEqualSessions_equalsReturnsTrue() 339 new BodyWaterMassRecord.Builder(generateMetadata(), TIME, Mass.fromGrams(40)) in testBodyWaterMass_buildSessionWithAllFields_buildCorrectObject() 343 assertThat(record.getBodyWaterMass()).isEqualTo(Mass.fromGrams(40)); in testBodyWaterMass_buildSessionWithAllFields_buildCorrectObject() 539 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(1001000.0)) in testCreateBodyWaterMassRecord_invalidValue() 555 return new BodyWaterMassRecord.Builder(metadataWithId, Instant.now(), Mass.fromGrams(20.0)) in getBodyWaterMassRecord_update() 562 new Metadata.Builder().build(), Instant.now(), Mass.fromGrams(100.0)) in getBaseBodyWaterMassRecord() [all …]
|
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/ |
D | NutritionRecordInternal.java | 27 import android.health.connect.datatypes.units.Mass; 573 .setUnsaturatedFat(Mass.fromGrams(getUnsaturatedFat())) in toExternalRecord() 574 .setPotassium(Mass.fromGrams(getPotassium())) in toExternalRecord() 575 .setThiamin(Mass.fromGrams(getThiamin())) in toExternalRecord() 577 .setTransFat(Mass.fromGrams(getTransFat())) in toExternalRecord() 578 .setManganese(Mass.fromGrams(getManganese())) in toExternalRecord() 580 .setCaffeine(Mass.fromGrams(getCaffeine())) in toExternalRecord() 581 .setDietaryFiber(Mass.fromGrams(getDietaryFiber())) in toExternalRecord() 582 .setSelenium(Mass.fromGrams(getSelenium())) in toExternalRecord() 583 .setVitaminB6(Mass.fromGrams(getVitaminB6())) in toExternalRecord() [all …]
|
D | ExercisePerformanceGoalInternal.java | 20 import android.health.connect.datatypes.units.Mass; 326 return new WeightGoalInternal(Mass.fromGrams(parcel.readDouble())); in readFieldsFromParcel() 334 private final Mass mMass; 336 public WeightGoalInternal(Mass mass) { in WeightGoalInternal() 340 public Mass getMass() { in getMass()
|
D | BodyWaterMassRecordInternal.java | 23 import android.health.connect.datatypes.units.Mass; 53 buildMetaData(), getTime(), Mass.fromGrams(getBodyWaterMass())) in toExternalRecord()
|
D | LeanBodyMassRecordInternal.java | 22 import android.health.connect.datatypes.units.Mass; 47 return new LeanBodyMassRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getMass())) in toExternalRecord()
|
D | WeightRecordInternal.java | 22 import android.health.connect.datatypes.units.Mass; 47 return new WeightRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getWeight())) in toExternalRecord()
|
D | BoneMassRecordInternal.java | 22 import android.health.connect.datatypes.units.Mass; 47 return new BoneMassRecord.Builder(buildMetaData(), getTime(), Mass.fromGrams(getMass())) in toExternalRecord()
|
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/units/ |
D | Mass.java | 24 public final class Mass implements Comparable<Mass> { class 28 private Mass(double value) { in Mass() method in Mass 38 public static Mass fromGrams(double value) { in fromGrams() 39 return new Mass(value); in fromGrams() 60 public int compareTo(@NonNull Mass other) { in compareTo() 74 if (object instanceof Mass) { in equals() 75 Mass other = (Mass) object; in equals()
|
/packages/modules/HealthFitness/framework/api/ |
D | current.txt | 527 method @NonNull public android.health.connect.datatypes.units.Mass getBodyWaterMass(); 531 …atypes.Metadata, @NonNull java.time.Instant, @NonNull android.health.connect.datatypes.units.Mass); 538 method @NonNull public android.health.connect.datatypes.units.Mass getMass(); 542 …atypes.Metadata, @NonNull java.time.Instant, @NonNull android.health.connect.datatypes.units.Mass); 760 …or public ExercisePerformanceGoal.WeightGoal(@NonNull android.health.connect.datatypes.units.Mass); 761 method @NonNull public android.health.connect.datatypes.units.Mass getMass(); 1067 method @NonNull public android.health.connect.datatypes.units.Mass getMass(); 1071 …atypes.Metadata, @NonNull java.time.Instant, @NonNull android.health.connect.datatypes.units.Mass); 1211 method @Nullable public android.health.connect.datatypes.units.Mass getBiotin(); 1212 method @Nullable public android.health.connect.datatypes.units.Mass getCaffeine(); [all …]
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/ |
D | AggregationApisTest.java | 67 import android.health.connect.datatypes.units.Mass; 262 AggregateRecordsRequest<Mass> request = in groupByPeriod_weightAvg() 263 new AggregateRecordsRequest.Builder<Mass>(getTimeFilter(startTime, localTime)) in groupByPeriod_weightAvg() 267 List<AggregateRecordsGroupedByPeriodResponse<Mass>> responses = in groupByPeriod_weightAvg() 300 AggregateRecordsRequest<Mass> aggregateRecordsRequest = in aggregateWithInstantFilter_weightMax() 301 new AggregateRecordsRequest.Builder<Mass>(timeFilter) in aggregateWithInstantFilter_weightMax() 305 AggregateRecordsResponse<Mass> response = getAggregateResponse(aggregateRecordsRequest); in aggregateWithInstantFilter_weightMax() 318 List<AggregateRecordsGroupedByDurationResponse<Mass>> responses = in groupByDurationWithInstantFilter_weightMin() 320 new AggregateRecordsRequest.Builder<Mass>(timeFilter) in groupByDurationWithInstantFilter_weightMin() 409 AggregateRecordsRequest<Mass> request = in groupByPeriod_zeroPeriod_throws() [all …]
|
D | DataFactory.java | 31 import android.health.connect.datatypes.units.Mass; 108 return new LeanBodyMassRecord.Builder(getEmptyMetadata(), time, Mass.fromGrams(grams)) in getBaseLeanBodyMassRecord() 118 return new WeightRecord.Builder(getEmptyMetadata(), time, Mass.fromGrams(weightKg * 1000)) in getBaseWeightRecord()
|
D | Utils.java | 23 import android.health.connect.datatypes.units.Mass; 36 static void assertMassWithTolerance(Mass mass, double expected) { in assertMassWithTolerance()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/ |
D | MassFormatter.kt | 4 import android.health.connect.datatypes.units.Mass 17 fun formatValue(context: Context, mass: Mass, weightUnit: WeightUnit): String { in formatValue() 29 fun formatA11yValue(context: Context, mass: Mass, weightUnit: WeightUnit): String { in formatA11yValue() 42 mass: Mass, in getMassString()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/ |
D | TestConstants.kt | 44 import android.health.connect.datatypes.units.Mass in <lambda>() 106 fun getWeightRecord(time: Instant = NOW, weight: Mass): WeightRecord { in getWeightRecord() 130 fun getBodyWaterMassRecord(time: Instant, bodyWaterMass: Mass): BodyWaterMassRecord { in getBodyWaterMassRecord() 365 val WEIGHT_DAY_100: WeightRecord = getWeightRecord(INSTANT_DAY, Mass.fromGrams(100000.0)) 366 val WEIGHT_WEEK_100: WeightRecord = getWeightRecord(INSTANT_WEEK, Mass.fromGrams(100000.0)) 367 val WEIGHT_MONTH_100: WeightRecord = getWeightRecord(INSTANT_MONTH3, Mass.fromGrams(100000.0)) 368 val WEIGHT_STARTDATE_100: WeightRecord = getWeightRecord(START_TIME, Mass.fromGrams(100000.0)) 380 getBodyWaterMassRecord(INSTANT_WEEK, Mass.fromGrams(1000.0)) 398 getWeightRecord(instantTwoDaysAgo, Mass.fromGrams(95000.0)), in getMixedRecordsAcrossThreeDays()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/historicaccess/ |
D | HistoricAccessLimitTest.java | 44 import android.health.connect.datatypes.units.Mass; 251 AggregateRecordsResponse<Mass> averageWeightAggregation = in testAggregateInstantRecords_expectCorrectResponse() 253 new AggregateRecordsRequest.Builder<Mass>(timeFilter) in testAggregateInstantRecords_expectCorrectResponse() 371 AggregateRecordsResponse<Mass> response = in testAggregateAnotherAppsRecords_recordsAreAfterCutOff_expectCorrectAggregation() 373 new AggregateRecordsRequest.Builder<Mass>(timeFilter) in testAggregateAnotherAppsRecords_recordsAreAfterCutOff_expectCorrectAggregation() 392 AggregateRecordsResponse<Mass> response = in testAggregateAnotherAppsRecords_recordsAreBeforeCutOff_expectNoAggregation() 394 new AggregateRecordsRequest.Builder<Mass>(timeFilter) in testAggregateAnotherAppsRecords_recordsAreBeforeCutOff_expectNoAggregation()
|