Home
last modified time | relevance | path

Searched refs:Energy (Results 1 – 25 of 44) sorted by relevance

12

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/units/
DEnergyTest.java21 import android.health.connect.datatypes.units.Energy;
34 assertThat(Energy.fromCalories(10.0)).isInstanceOf(Energy.class); in testCreate()
35 assertThat(Energy.fromCalories(10.0).getInCalories()).isEqualTo(10.0); in testCreate()
40 Energy Energy1 = Energy.fromCalories(10.0); in testEquals()
41 Energy Energy2 = Energy.fromCalories(10.0); in testEquals()
42 Energy Energy3 = Energy.fromCalories(20.0); in testEquals()
50 Energy Energy1 = Energy.fromCalories(10.0); in testCompare()
51 Energy Energy2 = Energy.fromCalories(10.0); in testCompare()
52 Energy Energy3 = Energy.fromCalories(20.0); in testCompare()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/
DBasalCaloriesAggregationTest.java44 import android.health.connect.datatypes.units.Energy;
86 AggregateRecordsResponse<Energy> response = in testAggregation_BasalCaloriesBurntTotal_noRecord()
88 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_BasalCaloriesBurntTotal_noRecord()
103 AggregateRecordsResponse<Energy> response = in testAggregation_BasalCaloriesBurntTotal_lbm()
105 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_BasalCaloriesBurntTotal_lbm()
117 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_BasalCaloriesBurntTotal_lbm()
136 List<AggregateRecordsGroupedByDurationResponse<Energy>> responses = in testAggregation_BasalCaloriesBurntTotal_lbm_group()
138 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_BasalCaloriesBurntTotal_lbm_group()
151 AggregateRecordsResponse<Energy> response = in testAggregation_BasalCaloriesBurntTotal_lbm_group()
153 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_BasalCaloriesBurntTotal_lbm_group()
[all …]
DTotalCaloriesAggregationTest.java52 import android.health.connect.datatypes.units.Energy;
98 AggregateRecordsRequest<Energy> request = in totalCaloriesBurned_derivedFromDefaultBasalCalories()
99 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromDefaultBasalCalories()
102 AggregateRecordsResponse<Energy> response = getAggregateResponse(request); in totalCaloriesBurned_derivedFromDefaultBasalCalories()
117 AggregateRecordsRequest<Energy> request = in totalCaloriesBurned_derivedFromWeightAndHeight()
118 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromWeightAndHeight()
121 AggregateRecordsResponse<Energy> response = getAggregateResponse(request); in totalCaloriesBurned_derivedFromWeightAndHeight()
133 AggregateRecordsRequest<Energy> request = in totalCaloriesBurned_derivedFromLbm()
134 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromLbm()
137 AggregateRecordsResponse<Energy> response = getAggregateResponse(request); in totalCaloriesBurned_derivedFromLbm()
[all …]
DUtils.java21 import android.health.connect.datatypes.units.Energy;
26 static void assertEnergyWithTolerance(Energy energy, double expected) { in assertEnergyWithTolerance()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/units/
DEnergy.java24 public final class Energy implements Comparable<Energy> { class
28 private Energy(double value) { in Energy() method in Energy
38 public static Energy fromCalories(double value) { in fromCalories()
39 return new Energy(value); in fromCalories()
60 public int compareTo(@NonNull Energy other) { in compareTo()
74 if (object instanceof Energy) { in equals()
75 Energy other = (Energy) object; in equals()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DExerciseCompletionGoalTest.java34 import android.health.connect.datatypes.units.Energy;
212 assertThat(new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(100))) in totalCaloriesBurnedGoal_equalsAndHashCode()
215 Energy.fromCalories(200))); in totalCaloriesBurnedGoal_equalsAndHashCode()
216 assertThat(new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(100))) in totalCaloriesBurnedGoal_equalsAndHashCode()
219 Energy.fromCalories(100))); in totalCaloriesBurnedGoal_equalsAndHashCode()
222 new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(100)) in totalCaloriesBurnedGoal_equalsAndHashCode()
225 new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(200)) in totalCaloriesBurnedGoal_equalsAndHashCode()
228 new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(100)) in totalCaloriesBurnedGoal_equalsAndHashCode()
231 new ExerciseCompletionGoal.TotalCaloriesBurnedGoal(Energy.fromCalories(100)) in totalCaloriesBurnedGoal_equalsAndHashCode()
240 Energy.fromCalories(260))); in totalCaloriesBurnedGoal_insertionAndRead()
[all …]
DNutritionRecordTest.java84 import android.health.connect.datatypes.units.Energy;
560 AggregateRecordsResponse<Energy> oldResponse = in testAggregation_NutritionEnergyValuesTotal()
562 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_NutritionEnergyValuesTotal()
572 AggregateRecordsResponse<Energy> newResponse = in testAggregation_NutritionEnergyValuesTotal()
574 new AggregateRecordsRequest.Builder<Energy>( in testAggregation_NutritionEnergyValuesTotal()
583 Energy newEnergy = newResponse.get(ENERGY_TOTAL); in testAggregation_NutritionEnergyValuesTotal()
584 Energy oldEnergy = oldResponse.get(ENERGY_TOTAL); in testAggregation_NutritionEnergyValuesTotal()
585 Energy newFatEnergy = newResponse.get(ENERGY_FROM_FAT_TOTAL); in testAggregation_NutritionEnergyValuesTotal()
586 Energy oldFatEnergy = oldResponse.get(ENERGY_FROM_FAT_TOTAL); in testAggregation_NutritionEnergyValuesTotal()
815 .setEnergyFromFat(Energy.fromCalories(0.1)) in getNutritionRecord_update()
[all …]
DActiveCaloriesBurnedRecordTest.java37 import android.health.connect.datatypes.units.Energy;
94 Energy.fromCalories(1000000001.0)) in testCreateActiveCaloriesBurnedRecord_invalidValue()
355 Energy.fromCalories(10.0)); in testZoneOffsets()
579 Energy.fromCalories(20.0)) in getActiveCaloriesBurnedRecord_update()
590 Energy.fromCalories(10.0)) in getBaseActiveCaloriesBurnedRecord()
599 Energy.fromCalories(energy)) in getBaseActiveCaloriesBurnedRecord()
621 Energy.fromCalories(10.0)) in getCompleteActiveCaloriesBurnedRecord()
DTotalCaloriesBurnedRecordTest.java36 import android.health.connect.datatypes.units.Energy;
244 Energy.fromCalories(10.0)); in testZoneOffsets()
455 Energy.fromCalories(1000000001.0)) in testCreateTotalCaloriesBurnedRecord_invalidValue()
475 Energy.fromCalories(20.0)) in getTotalCaloriesBurnedRecord_update()
499 Energy.fromCalories(10.0)) in getCompleteTotalCaloriesBurnedRecord()
510 Energy.fromCalories(10.0)) in getBaseTotalCaloriesBurnedRecord()
/packages/modules/HealthFitness/framework/java/android/health/connect/datatypes/
DActiveCaloriesBurnedRecord.java22 import android.health.connect.datatypes.units.Energy;
43 private final Energy mEnergy;
55 @NonNull Energy energy) { in Builder()
137 public static final AggregationType<Energy> ACTIVE_CALORIES_TOTAL =
143 Energy.class);
145 private final Energy mEnergy;
162 @NonNull Energy energy, in ActiveCaloriesBurnedRecord()
183 public Energy getEnergy() { in getEnergy()
DTotalCaloriesBurnedRecord.java23 import android.health.connect.datatypes.units.Energy;
38 private final Energy mEnergy;
45 public static final AggregationType<Energy> ENERGY_TOTAL =
51 Energy.class);
68 @NonNull Energy energy, in TotalCaloriesBurnedRecord()
94 public Energy getEnergy() { in getEnergy()
127 private final Energy mEnergy;
140 @NonNull Energy energy) { in Builder()
DExerciseCompletionGoal.java22 import android.health.connect.datatypes.units.Energy;
220 private final Energy mTotalCalories;
225 public TotalCaloriesBurnedGoal(@NonNull Energy totalCalories) { in TotalCaloriesBurnedGoal()
232 public Energy getTotalCalories() { in getTotalCalories()
256 private final Energy mActiveCalories;
261 public ActiveCaloriesBurnedGoal(@NonNull Energy activeCalories) { in ActiveCaloriesBurnedGoal()
268 public Energy getActiveCalories() { in getActiveCalories()
DNutritionRecord.java25 import android.health.connect.datatypes.units.Energy;
36 private static final Energy ENERGY_0_0 = Energy.fromCalories(0.0);
54 private Energy mEnergyFromFat;
67 private Energy mEnergy;
221 public Builder setEnergyFromFat(@Nullable Energy energyFromFat) { in setEnergyFromFat()
377 public Builder setEnergy(@Nullable Energy energy) { in setEnergy()
881 public static final AggregationType<Energy> ENERGY_TOTAL =
886 Energy.class);
893 public static final AggregationType<Energy> ENERGY_FROM_FAT_TOTAL =
899 Energy.class);
[all …]
DBasalMetabolicRateRecord.java22 import android.health.connect.datatypes.units.Energy;
159 public static final AggregationType<Energy> BASAL_CALORIES_TOTAL =
164 Energy.class);
/packages/modules/HealthFitness/framework/java/android/health/connect/internal/datatypes/
DExerciseCompletionGoalInternal.java21 import android.health.connect.datatypes.units.Energy;
274 return new TotalCaloriesBurnedGoalInternal(Energy.fromCalories(parcel.readDouble())); in readFieldsFromParcel()
277 private final Energy mTotalCalories;
279 public TotalCaloriesBurnedGoalInternal(@NonNull Energy totalCalories) { in TotalCaloriesBurnedGoalInternal()
284 public Energy getTotalCalories() { in getTotalCalories()
312 return new ActiveCaloriesBurnedGoalInternal(Energy.fromCalories(parcel.readDouble())); in readFieldsFromParcel()
315 private final Energy mActiveCalories;
317 public ActiveCaloriesBurnedGoalInternal(@NonNull Energy activeCalories) { in ActiveCaloriesBurnedGoalInternal()
322 public Energy getActiveCalories() { in getActiveCalories()
DTotalCaloriesBurnedRecordInternal.java22 import android.health.connect.datatypes.units.Energy;
52 Energy.fromCalories(getEnergy())) in toExternalRecord()
DActiveCaloriesBurnedRecordInternal.java22 import android.health.connect.datatypes.units.Energy;
52 Energy.fromCalories(getEnergy())) in toExternalRecord()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DTotalCaloriesBurnedFormatter.kt20 import android.health.connect.datatypes.units.Energy
34 EntryFormatter<TotalCaloriesBurnedRecord>(context), UnitFormatter<Energy> {
49 override fun formatUnit(unit: Energy): String { in formatUnit()
53 override fun formatA11yUnit(unit: Energy): String { in formatA11yUnit()
DEnergyFormatter.kt19 import android.health.connect.datatypes.units.Energy
34 energy: Energy, in formatEnergyValue()
47 energy: Energy, in formatEnergyA11yValue()
61 energy: Energy, in formatEnergy()
DNutritionFormatter.kt21 import android.health.connect.datatypes.units.Energy in <lambda>()
72 formatEnergy: (energy: Energy) -> String, in <lambda>()
142 private fun Energy.addAggregation( in <lambda>() method
145 formatEnergy: (energy: Energy) -> String in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/api/
DLoadDataAggregationsUseCaseTest.kt8 import android.health.connect.datatypes.units.Energy in <lambda>()
131 .aggregate<Energy>( in <lambda>()
193 (InvocationOnMock) -> AggregateRecordsResponse<Energy> { in <lambda>()
195 val receiver = args.arguments[2] as OutcomeReceiver<AggregateRecordsResponse<Energy>, *> in <lambda>()
230 private fun getCaloriesAggregationResponse(): AggregateRecordsResponse<Energy> { in <lambda>()
231 val aggregationResult = AggregateResult(Energy.fromCalories(1500000.0)) in <lambda>()
233 return AggregateRecordsResponse<Energy>( in <lambda>()
/packages/modules/HealthFitness/tests/unittests/src/android/healthconnect/internal/datatypes/
DExerciseCompletionGoalInternalTest.java21 import android.health.connect.datatypes.units.Energy;
143 new TotalCaloriesBurnedGoalInternal(Energy.fromCalories(400.0)); in totalCaloriesBurnedGoal_writeToParcelThenRestore_objectsAreIdentical()
158 new TotalCaloriesBurnedGoalInternal(Energy.fromCalories(500)); in totalCaloriesBurnedGoal_convertToExternalAndBack_objectsAreIdentical()
171 new ActiveCaloriesBurnedGoalInternal(Energy.fromCalories(400.0)); in activeCaloriesBurnedGoal_writeToParcelThenRestore_objectsAreIdentical()
186 new ActiveCaloriesBurnedGoalInternal(Energy.fromCalories(500)); in activeCaloriesBurnedGoal_convertToExternalAndBack_objectsAreIdentical()
/packages/modules/Bluetooth/pandora/interfaces/pandora_experimental/
Dasha.proto49 // Low Energy connection.
62 // Low Energy connection.
71 // Low Energy connection.
84 // Low Energy connection.
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/
DLoadDataAggregationsUseCase.kt32 import android.health.connect.datatypes.units.Energy in <lambda>()
85 readAggregations<Energy>( in <lambda>()
140 totalCaloriesBurnedFormatter.formatUnit(aggregationResult as Energy), in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/formatters/
DActiveCaloriesBurnedFormatterTest.kt19 import android.health.connect.datatypes.units.Energy
87 getMetaData(), NOW, NOW.plusSeconds(1), Energy.fromCalories(calories)) in getActiveCaloriesBurnedRecord()

12