Repackage health data library.
Bug: 228936116, 194169229
Relnote: N/A
Test: :health:health-connect-client:test
Change-Id: I8c56915e5b50546aed41896589134b90551cfd81
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index 135facb..0671125 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -147,7 +147,7 @@
docs(project(":glance:glance-appwidget"))
docs(project(":glance:glance-wear-tiles"))
docs(project(":gridlayout:gridlayout"))
- docs(project(":health:health-data-client"))
+ docs(project(":health:health-connect-client"))
docs(project(":health:health-services-client"))
docs(project(":heifwriter:heifwriter"))
docs(project(":hilt:hilt-common"))
diff --git a/health/health-data-client/OWNERS b/health/health-connect-client/OWNERS
similarity index 100%
rename from health/health-data-client/OWNERS
rename to health/health-connect-client/OWNERS
diff --git a/health/health-data-client/api/current.txt b/health/health-connect-client/api/current.txt
similarity index 65%
rename from health/health-data-client/api/current.txt
rename to health/health-connect-client/api/current.txt
index d8d0caf..aea504e 100644
--- a/health/health-data-client/api/current.txt
+++ b/health/health-connect-client/api/current.txt
@@ -1,46 +1,46 @@
// Signature format: 4.0
-package androidx.health.data.client {
+package androidx.health.connect.client {
- public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, androidx.health.data.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.ChangesResponse>);
- method public suspend Object? getChangesToken(androidx.health.data.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
+ public interface HealthConnectClient {
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ChangesResponse>);
+ method public suspend Object? getChangesToken(androidx.health.connect.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.connect.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
- field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
+ field public static final androidx.health.connect.client.HealthConnectClient.Companion Companion;
}
- public static final class HealthDataClient.Companion {
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
+ public static final class HealthConnectClient.Companion {
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
method public boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public boolean isAvailable(android.content.Context context);
}
}
-package androidx.health.data.client.changes {
+package androidx.health.connect.client.changes {
public interface Change {
}
- public final class DeletionChange implements androidx.health.data.client.changes.Change {
+ public final class DeletionChange implements androidx.health.connect.client.changes.Change {
method public String getDeletedUid();
property public final String deletedUid;
}
- public final class UpsertionChange implements androidx.health.data.client.changes.Change {
- method public androidx.health.data.client.records.Record getRecord();
- property public final androidx.health.data.client.records.Record record;
+ public final class UpsertionChange implements androidx.health.connect.client.changes.Change {
+ method public androidx.health.connect.client.records.Record getRecord();
+ property public final androidx.health.connect.client.records.Record record;
}
}
-package androidx.health.data.client.metadata {
+package androidx.health.connect.client.metadata {
public final class DataOrigin {
ctor public DataOrigin(String packageName);
@@ -64,7 +64,7 @@
field public static final String CHEST_STRAP = "CHEST_STRAP";
field public static final String FITNESS_BAND = "FITNESS_BAND";
field public static final String HEAD_MOUNTED = "HEAD_MOUNTED";
- field public static final androidx.health.data.client.metadata.DeviceTypes INSTANCE;
+ field public static final androidx.health.connect.client.metadata.DeviceTypes INSTANCE;
field public static final String PHONE = "PHONE";
field public static final String RING = "RING";
field public static final String SCALE = "SCALE";
@@ -74,24 +74,24 @@
}
public final class Metadata {
- ctor public Metadata(optional String? uid, optional androidx.health.data.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.data.client.metadata.Device? device);
+ ctor public Metadata(optional String? uid, optional androidx.health.connect.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.connect.client.metadata.Device? device);
method public String? getClientId();
method public long getClientVersion();
- method public androidx.health.data.client.metadata.DataOrigin getDataOrigin();
- method public androidx.health.data.client.metadata.Device? getDevice();
+ method public androidx.health.connect.client.metadata.DataOrigin getDataOrigin();
+ method public androidx.health.connect.client.metadata.Device? getDevice();
method public java.time.Instant getLastModifiedTime();
method public String? getUid();
property public final String? clientId;
property public final long clientVersion;
- property public final androidx.health.data.client.metadata.DataOrigin dataOrigin;
- property public final androidx.health.data.client.metadata.Device? device;
+ property public final androidx.health.connect.client.metadata.DataOrigin dataOrigin;
+ property public final androidx.health.connect.client.metadata.Device? device;
property public final java.time.Instant lastModifiedTime;
property public final String? uid;
}
}
-package androidx.health.data.client.records {
+package androidx.health.connect.client.records {
public final class ActivityTypes {
field public static final String BACK_EXTENSION = "back_extension";
@@ -133,7 +133,7 @@
field public static final String HIKING = "hiking";
field public static final String ICE_HOCKEY = "ice_hockey";
field public static final String ICE_SKATING = "ice_skating";
- field public static final androidx.health.data.client.records.ActivityTypes INSTANCE;
+ field public static final androidx.health.connect.client.records.ActivityTypes INSTANCE;
field public static final String JUMPING_JACK = "jumping_jack";
field public static final String JUMP_ROPE = "jump_rope";
field public static final String LAT_PULL_DOWN = "lat_pull_down";
@@ -181,7 +181,7 @@
}
public final class BloodPressureMeasurementLocations {
- field public static final androidx.health.data.client.records.BloodPressureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BloodPressureMeasurementLocations INSTANCE;
field public static final String LEFT_UPPER_ARM = "left_upper_arm";
field public static final String LEFT_WRIST = "left_wrist";
field public static final String RIGHT_UPPER_ARM = "right_upper_arm";
@@ -189,22 +189,22 @@
}
public final class BodyPositions {
- field public static final androidx.health.data.client.records.BodyPositions INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyPositions INSTANCE;
field public static final String LYING_DOWN = "lying_down";
field public static final String RECLINING = "reclining";
field public static final String SITTING_DOWN = "sitting_down";
field public static final String STANDING_UP = "standing_up";
}
- public final class BodyTemperature implements androidx.health.data.client.records.Record {
- ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class BodyTemperature implements androidx.health.connect.client.records.Record {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public String? getMeasurementLocation();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public double getTemperatureDegreesCelsius();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final String? measurementLocation;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public final double temperatureDegreesCelsius;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
@@ -215,7 +215,7 @@
field public static final String EAR = "ear";
field public static final String FINGER = "finger";
field public static final String FOREHEAD = "forehead";
- field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyTemperatureMeasurementLocations INSTANCE;
field public static final String MOUTH = "mouth";
field public static final String RECTUM = "rectum";
field public static final String TEMPORAL_ARTERY = "temporal_artery";
@@ -224,96 +224,96 @@
field public static final String WRIST = "wrist";
}
- public final class Distance implements androidx.health.data.client.records.Record {
- ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Distance implements androidx.health.connect.client.records.Record {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getDistanceMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double distanceMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class ElevationGained implements androidx.health.data.client.records.Record {
- ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class ElevationGained implements androidx.health.connect.client.records.Record {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getElevationMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double elevationMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Height implements androidx.health.data.client.records.Record {
- ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Height implements androidx.health.connect.client.records.Record {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getHeightMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double heightMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
- public final class HipCircumference implements androidx.health.data.client.records.Record {
- ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class HipCircumference implements androidx.health.connect.client.records.Record {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getCircumferenceMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double circumferenceMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
public final class OvulationTestResults {
- field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
+ field public static final androidx.health.connect.client.records.OvulationTestResults INSTANCE;
field public static final String NEGATIVE = "negative";
field public static final String POSITIVE = "positive";
}
public interface Record {
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- property public abstract androidx.health.data.client.metadata.Metadata metadata;
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
+ property public abstract androidx.health.connect.client.metadata.Metadata metadata;
}
- public final class Steps implements androidx.health.data.client.records.Record {
- ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Steps implements androidx.health.connect.client.records.Record {
+ ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public long getCount();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final long count;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Weight implements androidx.health.data.client.records.Record {
- ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ public final class Weight implements androidx.health.connect.client.records.Record {
+ ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public double getWeightKg();
method public java.time.ZoneOffset? getZoneOffset();
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public final double weightKg;
property public java.time.ZoneOffset? zoneOffset;
@@ -321,22 +321,22 @@
}
-package androidx.health.data.client.request {
+package androidx.health.connect.client.request {
public final class ChangesTokenRequest {
- ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.data.client.metadata.DataOrigin> dataOriginFilters);
+ ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.connect.client.metadata.DataOrigin> dataOriginFilters);
}
}
-package androidx.health.data.client.response {
+package androidx.health.connect.client.response {
public final class ChangesResponse {
- method public java.util.List<androidx.health.data.client.changes.Change> getChanges();
+ method public java.util.List<androidx.health.connect.client.changes.Change> getChanges();
method public boolean getChangesTokenExpired();
method public boolean getHasMore();
method public String getNextChangesToken();
- property public final java.util.List<androidx.health.data.client.changes.Change> changes;
+ property public final java.util.List<androidx.health.connect.client.changes.Change> changes;
property public final boolean changesTokenExpired;
property public final boolean hasMore;
property public final String nextChangesToken;
@@ -349,25 +349,25 @@
}
-package androidx.health.data.client.time {
+package androidx.health.connect.client.time {
public final class TimeRangeFilter {
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
- field public static final androidx.health.data.client.time.TimeRangeFilter.Companion Companion;
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ field public static final androidx.health.connect.client.time.TimeRangeFilter.Companion Companion;
}
public static final class TimeRangeFilter.Companion {
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
}
}
diff --git a/health/health-data-client/api/current.txt b/health/health-connect-client/api/public_plus_experimental_current.txt
similarity index 65%
copy from health/health-data-client/api/current.txt
copy to health/health-connect-client/api/public_plus_experimental_current.txt
index d8d0caf..aea504e 100644
--- a/health/health-data-client/api/current.txt
+++ b/health/health-connect-client/api/public_plus_experimental_current.txt
@@ -1,46 +1,46 @@
// Signature format: 4.0
-package androidx.health.data.client {
+package androidx.health.connect.client {
- public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, androidx.health.data.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.ChangesResponse>);
- method public suspend Object? getChangesToken(androidx.health.data.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
+ public interface HealthConnectClient {
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ChangesResponse>);
+ method public suspend Object? getChangesToken(androidx.health.connect.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.connect.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
- field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
+ field public static final androidx.health.connect.client.HealthConnectClient.Companion Companion;
}
- public static final class HealthDataClient.Companion {
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
+ public static final class HealthConnectClient.Companion {
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
method public boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public boolean isAvailable(android.content.Context context);
}
}
-package androidx.health.data.client.changes {
+package androidx.health.connect.client.changes {
public interface Change {
}
- public final class DeletionChange implements androidx.health.data.client.changes.Change {
+ public final class DeletionChange implements androidx.health.connect.client.changes.Change {
method public String getDeletedUid();
property public final String deletedUid;
}
- public final class UpsertionChange implements androidx.health.data.client.changes.Change {
- method public androidx.health.data.client.records.Record getRecord();
- property public final androidx.health.data.client.records.Record record;
+ public final class UpsertionChange implements androidx.health.connect.client.changes.Change {
+ method public androidx.health.connect.client.records.Record getRecord();
+ property public final androidx.health.connect.client.records.Record record;
}
}
-package androidx.health.data.client.metadata {
+package androidx.health.connect.client.metadata {
public final class DataOrigin {
ctor public DataOrigin(String packageName);
@@ -64,7 +64,7 @@
field public static final String CHEST_STRAP = "CHEST_STRAP";
field public static final String FITNESS_BAND = "FITNESS_BAND";
field public static final String HEAD_MOUNTED = "HEAD_MOUNTED";
- field public static final androidx.health.data.client.metadata.DeviceTypes INSTANCE;
+ field public static final androidx.health.connect.client.metadata.DeviceTypes INSTANCE;
field public static final String PHONE = "PHONE";
field public static final String RING = "RING";
field public static final String SCALE = "SCALE";
@@ -74,24 +74,24 @@
}
public final class Metadata {
- ctor public Metadata(optional String? uid, optional androidx.health.data.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.data.client.metadata.Device? device);
+ ctor public Metadata(optional String? uid, optional androidx.health.connect.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.connect.client.metadata.Device? device);
method public String? getClientId();
method public long getClientVersion();
- method public androidx.health.data.client.metadata.DataOrigin getDataOrigin();
- method public androidx.health.data.client.metadata.Device? getDevice();
+ method public androidx.health.connect.client.metadata.DataOrigin getDataOrigin();
+ method public androidx.health.connect.client.metadata.Device? getDevice();
method public java.time.Instant getLastModifiedTime();
method public String? getUid();
property public final String? clientId;
property public final long clientVersion;
- property public final androidx.health.data.client.metadata.DataOrigin dataOrigin;
- property public final androidx.health.data.client.metadata.Device? device;
+ property public final androidx.health.connect.client.metadata.DataOrigin dataOrigin;
+ property public final androidx.health.connect.client.metadata.Device? device;
property public final java.time.Instant lastModifiedTime;
property public final String? uid;
}
}
-package androidx.health.data.client.records {
+package androidx.health.connect.client.records {
public final class ActivityTypes {
field public static final String BACK_EXTENSION = "back_extension";
@@ -133,7 +133,7 @@
field public static final String HIKING = "hiking";
field public static final String ICE_HOCKEY = "ice_hockey";
field public static final String ICE_SKATING = "ice_skating";
- field public static final androidx.health.data.client.records.ActivityTypes INSTANCE;
+ field public static final androidx.health.connect.client.records.ActivityTypes INSTANCE;
field public static final String JUMPING_JACK = "jumping_jack";
field public static final String JUMP_ROPE = "jump_rope";
field public static final String LAT_PULL_DOWN = "lat_pull_down";
@@ -181,7 +181,7 @@
}
public final class BloodPressureMeasurementLocations {
- field public static final androidx.health.data.client.records.BloodPressureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BloodPressureMeasurementLocations INSTANCE;
field public static final String LEFT_UPPER_ARM = "left_upper_arm";
field public static final String LEFT_WRIST = "left_wrist";
field public static final String RIGHT_UPPER_ARM = "right_upper_arm";
@@ -189,22 +189,22 @@
}
public final class BodyPositions {
- field public static final androidx.health.data.client.records.BodyPositions INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyPositions INSTANCE;
field public static final String LYING_DOWN = "lying_down";
field public static final String RECLINING = "reclining";
field public static final String SITTING_DOWN = "sitting_down";
field public static final String STANDING_UP = "standing_up";
}
- public final class BodyTemperature implements androidx.health.data.client.records.Record {
- ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class BodyTemperature implements androidx.health.connect.client.records.Record {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public String? getMeasurementLocation();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public double getTemperatureDegreesCelsius();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final String? measurementLocation;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public final double temperatureDegreesCelsius;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
@@ -215,7 +215,7 @@
field public static final String EAR = "ear";
field public static final String FINGER = "finger";
field public static final String FOREHEAD = "forehead";
- field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyTemperatureMeasurementLocations INSTANCE;
field public static final String MOUTH = "mouth";
field public static final String RECTUM = "rectum";
field public static final String TEMPORAL_ARTERY = "temporal_artery";
@@ -224,96 +224,96 @@
field public static final String WRIST = "wrist";
}
- public final class Distance implements androidx.health.data.client.records.Record {
- ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Distance implements androidx.health.connect.client.records.Record {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getDistanceMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double distanceMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class ElevationGained implements androidx.health.data.client.records.Record {
- ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class ElevationGained implements androidx.health.connect.client.records.Record {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getElevationMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double elevationMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Height implements androidx.health.data.client.records.Record {
- ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Height implements androidx.health.connect.client.records.Record {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getHeightMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double heightMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
- public final class HipCircumference implements androidx.health.data.client.records.Record {
- ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class HipCircumference implements androidx.health.connect.client.records.Record {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getCircumferenceMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double circumferenceMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
public final class OvulationTestResults {
- field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
+ field public static final androidx.health.connect.client.records.OvulationTestResults INSTANCE;
field public static final String NEGATIVE = "negative";
field public static final String POSITIVE = "positive";
}
public interface Record {
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- property public abstract androidx.health.data.client.metadata.Metadata metadata;
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
+ property public abstract androidx.health.connect.client.metadata.Metadata metadata;
}
- public final class Steps implements androidx.health.data.client.records.Record {
- ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Steps implements androidx.health.connect.client.records.Record {
+ ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public long getCount();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final long count;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Weight implements androidx.health.data.client.records.Record {
- ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ public final class Weight implements androidx.health.connect.client.records.Record {
+ ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public double getWeightKg();
method public java.time.ZoneOffset? getZoneOffset();
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public final double weightKg;
property public java.time.ZoneOffset? zoneOffset;
@@ -321,22 +321,22 @@
}
-package androidx.health.data.client.request {
+package androidx.health.connect.client.request {
public final class ChangesTokenRequest {
- ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.data.client.metadata.DataOrigin> dataOriginFilters);
+ ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.connect.client.metadata.DataOrigin> dataOriginFilters);
}
}
-package androidx.health.data.client.response {
+package androidx.health.connect.client.response {
public final class ChangesResponse {
- method public java.util.List<androidx.health.data.client.changes.Change> getChanges();
+ method public java.util.List<androidx.health.connect.client.changes.Change> getChanges();
method public boolean getChangesTokenExpired();
method public boolean getHasMore();
method public String getNextChangesToken();
- property public final java.util.List<androidx.health.data.client.changes.Change> changes;
+ property public final java.util.List<androidx.health.connect.client.changes.Change> changes;
property public final boolean changesTokenExpired;
property public final boolean hasMore;
property public final String nextChangesToken;
@@ -349,25 +349,25 @@
}
-package androidx.health.data.client.time {
+package androidx.health.connect.client.time {
public final class TimeRangeFilter {
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
- field public static final androidx.health.data.client.time.TimeRangeFilter.Companion Companion;
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ field public static final androidx.health.connect.client.time.TimeRangeFilter.Companion Companion;
}
public static final class TimeRangeFilter.Companion {
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
}
}
diff --git a/health/health-data-client/api/res-current.txt b/health/health-connect-client/api/res-current.txt
similarity index 100%
rename from health/health-data-client/api/res-current.txt
rename to health/health-connect-client/api/res-current.txt
diff --git a/health/health-data-client/api/restricted_current.txt b/health/health-connect-client/api/restricted_current.txt
similarity index 66%
rename from health/health-data-client/api/restricted_current.txt
rename to health/health-connect-client/api/restricted_current.txt
index 0cb9a6f..0cc077d 100644
--- a/health/health-data-client/api/restricted_current.txt
+++ b/health/health-connect-client/api/restricted_current.txt
@@ -1,46 +1,46 @@
// Signature format: 4.0
-package androidx.health.data.client {
+package androidx.health.connect.client {
- public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, androidx.health.data.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.ChangesResponse>);
- method public suspend Object? getChangesToken(androidx.health.data.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
+ public interface HealthConnectClient {
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record> recordType, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
+ method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.ChangesResponse>);
+ method public suspend Object? getChangesToken(androidx.health.connect.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public default static androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
+ method public suspend Object? insertRecords(java.util.List<? extends androidx.health.connect.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.connect.client.response.InsertRecordsResponse>);
method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public default static boolean isAvailable(android.content.Context context);
- field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
+ field public static final androidx.health.connect.client.HealthConnectClient.Companion Companion;
}
- public static final class HealthDataClient.Companion {
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
+ public static final class HealthConnectClient.Companion {
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
+ method public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context);
method public boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
method public boolean isAvailable(android.content.Context context);
}
}
-package androidx.health.data.client.changes {
+package androidx.health.connect.client.changes {
public interface Change {
}
- public final class DeletionChange implements androidx.health.data.client.changes.Change {
+ public final class DeletionChange implements androidx.health.connect.client.changes.Change {
method public String getDeletedUid();
property public final String deletedUid;
}
- public final class UpsertionChange implements androidx.health.data.client.changes.Change {
- method public androidx.health.data.client.records.Record getRecord();
- property public final androidx.health.data.client.records.Record record;
+ public final class UpsertionChange implements androidx.health.connect.client.changes.Change {
+ method public androidx.health.connect.client.records.Record getRecord();
+ property public final androidx.health.connect.client.records.Record record;
}
}
-package androidx.health.data.client.metadata {
+package androidx.health.connect.client.metadata {
public final class DataOrigin {
ctor public DataOrigin(String packageName);
@@ -64,7 +64,7 @@
field public static final String CHEST_STRAP = "CHEST_STRAP";
field public static final String FITNESS_BAND = "FITNESS_BAND";
field public static final String HEAD_MOUNTED = "HEAD_MOUNTED";
- field public static final androidx.health.data.client.metadata.DeviceTypes INSTANCE;
+ field public static final androidx.health.connect.client.metadata.DeviceTypes INSTANCE;
field public static final String PHONE = "PHONE";
field public static final String RING = "RING";
field public static final String SCALE = "SCALE";
@@ -74,24 +74,24 @@
}
public final class Metadata {
- ctor public Metadata(optional String? uid, optional androidx.health.data.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.data.client.metadata.Device? device);
+ ctor public Metadata(optional String? uid, optional androidx.health.connect.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.connect.client.metadata.Device? device);
method public String? getClientId();
method public long getClientVersion();
- method public androidx.health.data.client.metadata.DataOrigin getDataOrigin();
- method public androidx.health.data.client.metadata.Device? getDevice();
+ method public androidx.health.connect.client.metadata.DataOrigin getDataOrigin();
+ method public androidx.health.connect.client.metadata.Device? getDevice();
method public java.time.Instant getLastModifiedTime();
method public String? getUid();
property public final String? clientId;
property public final long clientVersion;
- property public final androidx.health.data.client.metadata.DataOrigin dataOrigin;
- property public final androidx.health.data.client.metadata.Device? device;
+ property public final androidx.health.connect.client.metadata.DataOrigin dataOrigin;
+ property public final androidx.health.connect.client.metadata.Device? device;
property public final java.time.Instant lastModifiedTime;
property public final String? uid;
}
}
-package androidx.health.data.client.records {
+package androidx.health.connect.client.records {
public final class ActivityTypes {
field public static final String BACK_EXTENSION = "back_extension";
@@ -133,7 +133,7 @@
field public static final String HIKING = "hiking";
field public static final String ICE_HOCKEY = "ice_hockey";
field public static final String ICE_SKATING = "ice_skating";
- field public static final androidx.health.data.client.records.ActivityTypes INSTANCE;
+ field public static final androidx.health.connect.client.records.ActivityTypes INSTANCE;
field public static final String JUMPING_JACK = "jumping_jack";
field public static final String JUMP_ROPE = "jump_rope";
field public static final String LAT_PULL_DOWN = "lat_pull_down";
@@ -181,7 +181,7 @@
}
public final class BloodPressureMeasurementLocations {
- field public static final androidx.health.data.client.records.BloodPressureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BloodPressureMeasurementLocations INSTANCE;
field public static final String LEFT_UPPER_ARM = "left_upper_arm";
field public static final String LEFT_WRIST = "left_wrist";
field public static final String RIGHT_UPPER_ARM = "right_upper_arm";
@@ -189,22 +189,22 @@
}
public final class BodyPositions {
- field public static final androidx.health.data.client.records.BodyPositions INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyPositions INSTANCE;
field public static final String LYING_DOWN = "lying_down";
field public static final String RECLINING = "reclining";
field public static final String SITTING_DOWN = "sitting_down";
field public static final String STANDING_UP = "standing_up";
}
- public final class BodyTemperature implements androidx.health.data.client.records.InstantaneousRecord {
- ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class BodyTemperature implements androidx.health.connect.client.records.InstantaneousRecord {
+ ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public String? getMeasurementLocation();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public double getTemperatureDegreesCelsius();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final String? measurementLocation;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public final double temperatureDegreesCelsius;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
@@ -215,7 +215,7 @@
field public static final String EAR = "ear";
field public static final String FINGER = "finger";
field public static final String FOREHEAD = "forehead";
- field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
+ field public static final androidx.health.connect.client.records.BodyTemperatureMeasurementLocations INSTANCE;
field public static final String MOUTH = "mouth";
field public static final String RECTUM = "rectum";
field public static final String TEMPORAL_ARTERY = "temporal_artery";
@@ -224,70 +224,70 @@
field public static final String WRIST = "wrist";
}
- public final class Distance implements androidx.health.data.client.records.IntervalRecord {
- ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Distance implements androidx.health.connect.client.records.IntervalRecord {
+ ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getDistanceMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double distanceMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class ElevationGained implements androidx.health.data.client.records.IntervalRecord {
- ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class ElevationGained implements androidx.health.connect.client.records.IntervalRecord {
+ ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getElevationMeters();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final double elevationMeters;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Height implements androidx.health.data.client.records.InstantaneousRecord {
- ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Height implements androidx.health.connect.client.records.InstantaneousRecord {
+ ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getHeightMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double heightMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
- public final class HipCircumference implements androidx.health.data.client.records.InstantaneousRecord {
- ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class HipCircumference implements androidx.health.connect.client.records.InstantaneousRecord {
+ ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public double getCircumferenceMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public final double circumferenceMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public java.time.ZoneOffset? zoneOffset;
}
- @kotlin.PublishedApi internal interface InstantaneousRecord extends androidx.health.data.client.records.Record {
+ @kotlin.PublishedApi internal interface InstantaneousRecord extends androidx.health.connect.client.records.Record {
method public java.time.Instant getTime();
method public java.time.ZoneOffset? getZoneOffset();
property public abstract java.time.Instant time;
property public abstract java.time.ZoneOffset? zoneOffset;
}
- @kotlin.PublishedApi internal interface IntervalRecord extends androidx.health.data.client.records.Record {
+ @kotlin.PublishedApi internal interface IntervalRecord extends androidx.health.connect.client.records.Record {
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
method public java.time.Instant getStartTime();
@@ -299,39 +299,39 @@
}
public final class OvulationTestResults {
- field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
+ field public static final androidx.health.connect.client.records.OvulationTestResults INSTANCE;
field public static final String NEGATIVE = "negative";
field public static final String POSITIVE = "positive";
}
public interface Record {
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- property public abstract androidx.health.data.client.metadata.Metadata metadata;
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
+ property public abstract androidx.health.connect.client.metadata.Metadata metadata;
}
- public final class Steps implements androidx.health.data.client.records.IntervalRecord {
- ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
+ public final class Steps implements androidx.health.connect.client.records.IntervalRecord {
+ ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
method public long getCount();
method public java.time.Instant getEndTime();
method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getStartTime();
method public java.time.ZoneOffset? getStartZoneOffset();
property public final long count;
property public java.time.Instant endTime;
property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant startTime;
property public java.time.ZoneOffset? startZoneOffset;
}
- public final class Weight implements androidx.health.data.client.records.InstantaneousRecord {
- ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public androidx.health.data.client.metadata.Metadata getMetadata();
+ public final class Weight implements androidx.health.connect.client.records.InstantaneousRecord {
+ ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.connect.client.metadata.Metadata metadata);
+ method public androidx.health.connect.client.metadata.Metadata getMetadata();
method public java.time.Instant getTime();
method public double getWeightKg();
method public java.time.ZoneOffset? getZoneOffset();
- property public androidx.health.data.client.metadata.Metadata metadata;
+ property public androidx.health.connect.client.metadata.Metadata metadata;
property public java.time.Instant time;
property public final double weightKg;
property public java.time.ZoneOffset? zoneOffset;
@@ -339,22 +339,22 @@
}
-package androidx.health.data.client.request {
+package androidx.health.connect.client.request {
public final class ChangesTokenRequest {
- ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.data.client.metadata.DataOrigin> dataOriginFilters);
+ ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.connect.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.connect.client.metadata.DataOrigin> dataOriginFilters);
}
}
-package androidx.health.data.client.response {
+package androidx.health.connect.client.response {
public final class ChangesResponse {
- method public java.util.List<androidx.health.data.client.changes.Change> getChanges();
+ method public java.util.List<androidx.health.connect.client.changes.Change> getChanges();
method public boolean getChangesTokenExpired();
method public boolean getHasMore();
method public String getNextChangesToken();
- property public final java.util.List<androidx.health.data.client.changes.Change> changes;
+ property public final java.util.List<androidx.health.connect.client.changes.Change> changes;
property public final boolean changesTokenExpired;
property public final boolean hasMore;
property public final String nextChangesToken;
@@ -367,25 +367,25 @@
}
-package androidx.health.data.client.time {
+package androidx.health.connect.client.time {
public final class TimeRangeFilter {
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
- field public static final androidx.health.data.client.time.TimeRangeFilter.Companion Companion;
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public static androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ field public static final androidx.health.connect.client.time.TimeRangeFilter.Companion Companion;
}
public static final class TimeRangeFilter.Companion {
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.Instant startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
+ method public androidx.health.connect.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
}
}
diff --git a/health/health-data-client/build.gradle b/health/health-connect-client/build.gradle
similarity index 93%
rename from health/health-data-client/build.gradle
rename to health/health-connect-client/build.gradle
index f410180..ef4bf1d 100644
--- a/health/health-data-client/build.gradle
+++ b/health/health-connect-client/build.gradle
@@ -57,7 +57,7 @@
aidl = true
}
testOptions.unitTests.includeAndroidResources = true
- namespace "androidx.health.data.client"
+ namespace "androidx.health.connect.client"
}
protobuf {
@@ -80,11 +80,11 @@
}
androidx {
- name = "AndroidX Health Data Client Library"
+ name = "AndroidX Health Connect Client Library"
type = LibraryType.PUBLISHED_LIBRARY
- mavenVersion = LibraryVersions.HEALTH_DATA_CLIENT
+ mavenVersion = LibraryVersions.HEALTH_CONNECT_CLIENT
mavenGroup = LibraryGroups.HEALTH
- inceptionYear = "2021"
+ inceptionYear = "2022"
description = "read or write user's health and fitness records."
}
diff --git a/health/health-data-client/lint-baseline.xml b/health/health-connect-client/lint-baseline.xml
similarity index 100%
rename from health/health-data-client/lint-baseline.xml
rename to health/health-connect-client/lint-baseline.xml
diff --git a/health/health-data-client/src/androidTest/AndroidManifest.xml b/health/health-connect-client/src/androidTest/AndroidManifest.xml
similarity index 100%
rename from health/health-data-client/src/androidTest/AndroidManifest.xml
rename to health/health-connect-client/src/androidTest/AndroidManifest.xml
diff --git a/health/health-data-client/src/main/AndroidManifest.xml b/health/health-connect-client/src/main/AndroidManifest.xml
similarity index 100%
rename from health/health-data-client/src/main/AndroidManifest.xml
rename to health/health-connect-client/src/main/AndroidManifest.xml
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/changes/ChangesEvent.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/changes/ChangesEvent.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/changes/ChangesEvent.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/changes/ChangesEvent.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/error/ErrorStatus.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/error/ErrorStatus.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/error/ErrorStatus.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/error/ErrorStatus.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetIsInForegroundCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetIsInForegroundCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetIsInForegroundCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetIsInForegroundCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetPermissionTokenCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetPermissionTokenCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetPermissionTokenCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IGetPermissionTokenCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IHealthDataSdkService.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IHealthDataSdkService.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IHealthDataSdkService.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/IHealthDataSdkService.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/ISetPermissionTokenCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/ISetPermissionTokenCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/ISetPermissionTokenCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/impl/sdkservice/ISetPermissionTokenCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/permission/Permission.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/permission/Permission.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/permission/Permission.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/permission/Permission.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/AggregateDataRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/AggregateDataRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/AggregateDataRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/AggregateDataRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRangeRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRangeRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRangeRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRangeRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/DeleteDataRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/GetChangesRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/GetChangesRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/GetChangesRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/GetChangesRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/GetChangesTokenRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/GetChangesTokenRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/GetChangesTokenRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/GetChangesTokenRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRangeRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRangeRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRangeRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRangeRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/ReadDataRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/RequestContext.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/RequestContext.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/RequestContext.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/RequestContext.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/request/UpsertDataRequest.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/UpsertDataRequest.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/request/UpsertDataRequest.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/request/UpsertDataRequest.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/AggregateDataResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/AggregateDataResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/AggregateDataResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/AggregateDataResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/GetChangesResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/GetChangesResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/GetChangesResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/GetChangesResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/GetChangesTokenResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/GetChangesTokenResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/GetChangesTokenResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/GetChangesTokenResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/InsertDataResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/InsertDataResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/InsertDataResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/InsertDataResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/ReadDataRangeResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/ReadDataRangeResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/ReadDataRangeResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/ReadDataRangeResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/response/ReadDataResponse.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/ReadDataResponse.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/response/ReadDataResponse.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/response/ReadDataResponse.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IAggregateDataCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IAggregateDataCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IAggregateDataCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IAggregateDataCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IClearOnChangesListenerCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IClearOnChangesListenerCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IClearOnChangesListenerCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IClearOnChangesListenerCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataRangeCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataRangeCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataRangeCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IDeleteDataRangeCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesTokenCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesTokenCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesTokenCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetChangesTokenCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetGrantedPermissionsCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetGrantedPermissionsCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IGetGrantedPermissionsCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IGetGrantedPermissionsCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IHealthDataService.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IHealthDataService.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IHealthDataService.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IHealthDataService.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IInsertDataCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IInsertDataCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IInsertDataCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IInsertDataCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IOnChangesListener.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IOnChangesListener.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IOnChangesListener.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IOnChangesListener.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IReadDataCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IReadDataCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IReadDataCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IReadDataCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IReadDataRangeCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IReadDataRangeCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IReadDataRangeCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IReadDataRangeCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IRevokeAllPermissionsCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IRevokeAllPermissionsCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IRevokeAllPermissionsCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IRevokeAllPermissionsCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/ISetOnChangesListenerCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/ISetOnChangesListenerCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/ISetOnChangesListenerCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/ISetOnChangesListenerCallback.aidl
diff --git a/health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IUpdateDataCallback.aidl b/health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IUpdateDataCallback.aidl
similarity index 100%
rename from health/health-data-client/src/main/aidl/androidx/health/platform/client/service/IUpdateDataCallback.aidl
rename to health/health-connect-client/src/main/aidl/androidx/health/platform/client/service/IUpdateDataCallback.aidl
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/HealthConnectClient.kt
similarity index 90%
rename from health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/HealthConnectClient.kt
index 647c275..98c47a3 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/HealthDataClient.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/HealthConnectClient.kt
@@ -13,37 +13,37 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client
+package androidx.health.connect.client
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.AggregateDataRow
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByPeriod
-import androidx.health.data.client.aggregate.AggregateMetric
-import androidx.health.data.client.impl.HealthDataClientImpl
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.permission.Permission
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.request.AggregateGroupByDurationRequest
-import androidx.health.data.client.request.AggregateGroupByPeriodRequest
-import androidx.health.data.client.request.AggregateRequest
-import androidx.health.data.client.request.ChangesTokenRequest
-import androidx.health.data.client.request.ReadRecordsRequest
-import androidx.health.data.client.response.ChangesResponse
-import androidx.health.data.client.response.InsertRecordsResponse
-import androidx.health.data.client.response.ReadRecordResponse
-import androidx.health.data.client.response.ReadRecordsResponse
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.aggregate.AggregateDataRow
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByPeriod
+import androidx.health.connect.client.aggregate.AggregateMetric
+import androidx.health.connect.client.impl.HealthConnectClientImpl
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.permission.Permission
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.request.AggregateGroupByDurationRequest
+import androidx.health.connect.client.request.AggregateGroupByPeriodRequest
+import androidx.health.connect.client.request.AggregateRequest
+import androidx.health.connect.client.request.ChangesTokenRequest
+import androidx.health.connect.client.request.ReadRecordsRequest
+import androidx.health.connect.client.response.ChangesResponse
+import androidx.health.connect.client.response.InsertRecordsResponse
+import androidx.health.connect.client.response.ReadRecordResponse
+import androidx.health.connect.client.response.ReadRecordsResponse
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.HealthDataService
import java.lang.IllegalStateException
import kotlin.reflect.KClass
/** Interface to access health and fitness records. */
-interface HealthDataClient {
+interface HealthConnectClient {
/**
* Returns a set of [Permission] granted by the user to this app, out of the input [permissions]
* set.
@@ -306,7 +306,7 @@
public fun getOrCreate(
context: Context,
packageNames: List<String> = listOf(DEFAULT_PROVIDER_PACKAGE_NAME),
- ): HealthDataClient {
+ ): HealthConnectClient {
if (!isSdkVersionSufficient()) {
throw UnsupportedOperationException("SDK version too low")
}
@@ -315,7 +315,7 @@
}
val enabledPackage =
packageNames.first { isPackageInstalled(context.packageManager, it) }
- return HealthDataClientImpl(HealthDataService.getClient(context, enabledPackage))
+ return HealthConnectClientImpl(HealthDataService.getClient(context, enabledPackage))
}
@ChecksSdkIntAtLeast
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRow.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRow.kt
index 9af5c4e..42aabf7 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRow.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRow.kt
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.connect.client.metadata.DataOrigin
import java.time.Duration
/**
* Represents an aggregation result row.
*
- * @see [androidx.health.data.client.HealthDataClient.aggregate]
+ * @see [androidx.health.connect.client.HealthConnectClient.aggregate]
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class AggregateDataRow
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByDuration.kt
similarity index 88%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByDuration.kt
index ae36daf..e032c46 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByDuration.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByDuration.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
import java.time.Instant
@@ -22,7 +22,7 @@
/**
* Represents an aggregation result row.
*
- * @see [androidx.health.data.client.HealthDataClient.aggregateGroupByDuration]
+ * @see [androidx.health.connect.client.HealthConnectClient.aggregateGroupByDuration]
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class AggregateDataRowGroupByDuration
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriod.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriod.kt
similarity index 88%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriod.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriod.kt
index 349f37c..e8d7d73 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriod.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriod.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
import java.time.LocalDateTime
@@ -21,7 +21,7 @@
/**
* Represents an aggregation result row.
*
- * @see [androidx.health.data.client.HealthDataClient.aggregateGroupByPeriod]
+ * @see [androidx.health.connect.client.HealthConnectClient.aggregateGroupByPeriod]
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class AggregateDataRowGroupByPeriod
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateMetric.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateMetric.kt
index 94decdf..3691144 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/AggregateMetric.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/AggregateMetric.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DoubleAggregateMetric.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DoubleAggregateMetric.kt
index e16de76..ab7694d 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DoubleAggregateMetric.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DoubleAggregateMetric.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DurationAggregateMetric.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DurationAggregateMetric.kt
index ac50645..6a91c5e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/DurationAggregateMetric.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/DurationAggregateMetric.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/LongAggregateMetric.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/LongAggregateMetric.kt
index 41f16ef..5a2623c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/LongAggregateMetric.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/LongAggregateMetric.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/aggregate/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/aggregate/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/aggregate/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/changes/Change.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/Change.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/changes/Change.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/changes/Change.kt
index aa65dc9..c5e0f6f 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/changes/Change.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/Change.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.changes
+package androidx.health.connect.client.changes
/**
* Abstraction to represent a change to Android Health Platform.
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/changes/ChangesEvent.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/ChangesEvent.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/changes/ChangesEvent.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/changes/ChangesEvent.kt
index c8ab7e1..63b8a73 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/changes/ChangesEvent.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/ChangesEvent.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.changes
+package androidx.health.connect.client.changes
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/changes/DeletionChange.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/DeletionChange.kt
similarity index 86%
rename from health/health-data-client/src/main/java/androidx/health/data/client/changes/DeletionChange.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/changes/DeletionChange.kt
index 9dd38e3..d18ed9c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/changes/DeletionChange.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/DeletionChange.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.changes
+package androidx.health.connect.client.changes
-import androidx.health.data.client.metadata.Metadata
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.metadata.Metadata
+import androidx.health.connect.client.records.Record
/**
* A [Change] with [Metadata.uid] of deleted [Record]. For privacy, only unique identifiers of the
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/changes/UpsertionChange.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/UpsertionChange.kt
similarity index 88%
rename from health/health-data-client/src/main/java/androidx/health/data/client/changes/UpsertionChange.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/changes/UpsertionChange.kt
index b29c37f..a0b877a 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/changes/UpsertionChange.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/changes/UpsertionChange.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.changes
+package androidx.health.connect.client.changes
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
/**
* A [Change] with inserted or updated [Record].
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/health-data-client-documentation.md b/health/health-connect-client/src/main/java/androidx/health/connect/client/health-data-client-documentation.md
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/health-data-client-documentation.md
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/health-data-client-documentation.md
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/HealthConnectClientImpl.kt
similarity index 67%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/HealthConnectClientImpl.kt
index 1782b14..25e449a 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/HealthDataClientImpl.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/HealthConnectClientImpl.kt
@@ -13,39 +13,39 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl
+package androidx.health.connect.client.impl
-import androidx.health.data.client.HealthDataClient
-import androidx.health.data.client.aggregate.AggregateDataRow
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByPeriod
-import androidx.health.data.client.impl.converters.aggregate.retrieveAggregateDataRow
-import androidx.health.data.client.impl.converters.aggregate.toAggregateDataRowGroupByDuration
-import androidx.health.data.client.impl.converters.aggregate.toAggregateDataRowGroupByPeriod
-import androidx.health.data.client.impl.converters.datatype.toDataTypeIdPairProtoList
-import androidx.health.data.client.impl.converters.datatype.toDataTypeName
-import androidx.health.data.client.impl.converters.permission.toJetpackPermission
-import androidx.health.data.client.impl.converters.permission.toProtoPermission
-import androidx.health.data.client.impl.converters.records.toProto
-import androidx.health.data.client.impl.converters.records.toRecord
-import androidx.health.data.client.impl.converters.request.toDeleteDataRangeRequestProto
-import androidx.health.data.client.impl.converters.request.toProto
-import androidx.health.data.client.impl.converters.request.toReadDataRangeRequestProto
-import androidx.health.data.client.impl.converters.request.toReadDataRequestProto
-import androidx.health.data.client.impl.converters.response.toChangesResponse
-import androidx.health.data.client.impl.converters.response.toReadRecordsResponse
-import androidx.health.data.client.permission.Permission
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.request.AggregateGroupByDurationRequest
-import androidx.health.data.client.request.AggregateGroupByPeriodRequest
-import androidx.health.data.client.request.AggregateRequest
-import androidx.health.data.client.request.ChangesTokenRequest
-import androidx.health.data.client.request.ReadRecordsRequest
-import androidx.health.data.client.response.ChangesResponse
-import androidx.health.data.client.response.InsertRecordsResponse
-import androidx.health.data.client.response.ReadRecordResponse
-import androidx.health.data.client.response.ReadRecordsResponse
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.HealthConnectClient
+import androidx.health.connect.client.aggregate.AggregateDataRow
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByPeriod
+import androidx.health.connect.client.impl.converters.aggregate.retrieveAggregateDataRow
+import androidx.health.connect.client.impl.converters.aggregate.toAggregateDataRowGroupByDuration
+import androidx.health.connect.client.impl.converters.aggregate.toAggregateDataRowGroupByPeriod
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeIdPairProtoList
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeName
+import androidx.health.connect.client.impl.converters.permission.toJetpackPermission
+import androidx.health.connect.client.impl.converters.permission.toProtoPermission
+import androidx.health.connect.client.impl.converters.records.toProto
+import androidx.health.connect.client.impl.converters.records.toRecord
+import androidx.health.connect.client.impl.converters.request.toDeleteDataRangeRequestProto
+import androidx.health.connect.client.impl.converters.request.toProto
+import androidx.health.connect.client.impl.converters.request.toReadDataRangeRequestProto
+import androidx.health.connect.client.impl.converters.request.toReadDataRequestProto
+import androidx.health.connect.client.impl.converters.response.toChangesResponse
+import androidx.health.connect.client.impl.converters.response.toReadRecordsResponse
+import androidx.health.connect.client.permission.Permission
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.request.AggregateGroupByDurationRequest
+import androidx.health.connect.client.request.AggregateGroupByPeriodRequest
+import androidx.health.connect.client.request.AggregateRequest
+import androidx.health.connect.client.request.ChangesTokenRequest
+import androidx.health.connect.client.request.ReadRecordsRequest
+import androidx.health.connect.client.response.ChangesResponse
+import androidx.health.connect.client.response.InsertRecordsResponse
+import androidx.health.connect.client.response.ReadRecordResponse
+import androidx.health.connect.client.response.ReadRecordsResponse
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.HealthDataAsyncClient
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
@@ -58,9 +58,9 @@
*
* @suppress
*/
-class HealthDataClientImpl(
+class HealthConnectClientImpl(
private val delegate: HealthDataAsyncClient,
-) : HealthDataClient {
+) : HealthConnectClient {
override suspend fun getGrantedPermissions(permissions: Set<Permission>): Set<Permission> {
return delegate
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricToProto.kt
similarity index 87%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricToProto.kt
index c2d0811..c1e1663 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricToProto.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricToProto.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.aggregate
+package androidx.health.connect.client.impl.converters.aggregate
-import androidx.health.data.client.aggregate.AggregateMetric
+import androidx.health.connect.client.aggregate.AggregateMetric
import androidx.health.platform.client.proto.RequestProto
fun AggregateMetric.toProto(): RequestProto.AggregateMetricSpec =
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
similarity index 85%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
index 7ba1fe4..b46beb6 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/aggregate/ProtoToAggregateDataRow.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.aggregate
+package androidx.health.connect.client.impl.converters.aggregate
-import androidx.health.data.client.aggregate.AggregateDataRow
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByPeriod
-import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.connect.client.aggregate.AggregateDataRow
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByPeriod
+import androidx.health.connect.client.metadata.DataOrigin
import androidx.health.platform.client.proto.DataProto
import java.time.Instant
import java.time.LocalDateTime
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/changes/ChangesEventConverter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/changes/ChangesEventConverter.kt
similarity index 77%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/changes/ChangesEventConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/changes/ChangesEventConverter.kt
index 5f2f9bc..d101792 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/changes/ChangesEventConverter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/changes/ChangesEventConverter.kt
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.changes
+package androidx.health.connect.client.impl.converters.changes
-import androidx.health.data.client.changes.Change
-import androidx.health.data.client.changes.ChangesEvent
-import androidx.health.data.client.changes.DeletionChange
-import androidx.health.data.client.changes.UpsertionChange
-import androidx.health.data.client.impl.converters.records.toRecord
+import androidx.health.connect.client.changes.Change
+import androidx.health.connect.client.changes.ChangesEvent
+import androidx.health.connect.client.changes.DeletionChange
+import androidx.health.connect.client.changes.UpsertionChange
+import androidx.health.connect.client.impl.converters.records.toRecord
import androidx.health.platform.client.proto.ChangeProto
/** Converts proto response to public API object. */
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeConverter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeConverter.kt
similarity index 89%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeConverter.kt
index 52ef73c..66f971c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeConverter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeConverter.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.datatype
+package androidx.health.connect.client.impl.converters.datatype
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
import kotlin.reflect.KClass
/** Converts public API object into internal proto for ipc. */
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeIdPairConverter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeIdPairConverter.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeIdPairConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeIdPairConverter.kt
index 1b1c87e..c943e5e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/DataTypeIdPairConverter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/DataTypeIdPairConverter.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.datatype
+package androidx.health.connect.client.impl.converters.datatype
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
import kotlin.reflect.KClass
diff --git a/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/RecordsTypeNameMap.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/RecordsTypeNameMap.kt
new file mode 100644
index 0000000..0882ee3
--- /dev/null
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/datatype/RecordsTypeNameMap.kt
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package androidx.health.connect.client.impl.converters.datatype
+
+import androidx.health.connect.client.records.ActiveCaloriesBurned
+import androidx.health.connect.client.records.ActivityEvent
+import androidx.health.connect.client.records.ActivityLap
+import androidx.health.connect.client.records.ActivitySession
+import androidx.health.connect.client.records.BasalBodyTemperature
+import androidx.health.connect.client.records.BasalMetabolicRate
+import androidx.health.connect.client.records.BloodGlucose
+import androidx.health.connect.client.records.BloodPressure
+import androidx.health.connect.client.records.BodyFat
+import androidx.health.connect.client.records.BodyTemperature
+import androidx.health.connect.client.records.BodyWaterMass
+import androidx.health.connect.client.records.BoneMass
+import androidx.health.connect.client.records.CervicalMucus
+import androidx.health.connect.client.records.CervicalPosition
+import androidx.health.connect.client.records.CyclingPedalingCadence
+import androidx.health.connect.client.records.Distance
+import androidx.health.connect.client.records.ElevationGained
+import androidx.health.connect.client.records.FloorsClimbed
+import androidx.health.connect.client.records.HeartRateSeries
+import androidx.health.connect.client.records.HeartRateVariabilityDifferentialIndex
+import androidx.health.connect.client.records.HeartRateVariabilityRmssd
+import androidx.health.connect.client.records.HeartRateVariabilityS
+import androidx.health.connect.client.records.HeartRateVariabilitySd2
+import androidx.health.connect.client.records.HeartRateVariabilitySdann
+import androidx.health.connect.client.records.HeartRateVariabilitySdnn
+import androidx.health.connect.client.records.HeartRateVariabilitySdnnIndex
+import androidx.health.connect.client.records.HeartRateVariabilitySdsd
+import androidx.health.connect.client.records.HeartRateVariabilityTinn
+import androidx.health.connect.client.records.Height
+import androidx.health.connect.client.records.HipCircumference
+import androidx.health.connect.client.records.Hydration
+import androidx.health.connect.client.records.LeanBodyMass
+import androidx.health.connect.client.records.Menstruation
+import androidx.health.connect.client.records.Nutrition
+import androidx.health.connect.client.records.OvulationTest
+import androidx.health.connect.client.records.OxygenSaturation
+import androidx.health.connect.client.records.Power
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.records.Repetitions
+import androidx.health.connect.client.records.RespiratoryRate
+import androidx.health.connect.client.records.RestingHeartRate
+import androidx.health.connect.client.records.SexualActivity
+import androidx.health.connect.client.records.SleepSession
+import androidx.health.connect.client.records.SleepStage
+import androidx.health.connect.client.records.Speed
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.records.StepsCadence
+import androidx.health.connect.client.records.SwimmingStrokes
+import androidx.health.connect.client.records.TotalCaloriesBurned
+import androidx.health.connect.client.records.TotalEnergyBurned
+import androidx.health.connect.client.records.Vo2Max
+import androidx.health.connect.client.records.WaistCircumference
+import androidx.health.connect.client.records.Weight
+import androidx.health.connect.client.records.WheelchairPushes
+import kotlin.reflect.KClass
+
+private val ALL_RECORDS_TYPES =
+ setOf(
+ ActiveCaloriesBurned::class,
+ ActivityEvent::class,
+ ActivityLap::class,
+ ActivitySession::class,
+ BasalBodyTemperature::class,
+ BasalMetabolicRate::class,
+ BloodGlucose::class,
+ BloodPressure::class,
+ BodyFat::class,
+ BodyTemperature::class,
+ BodyWaterMass::class,
+ BoneMass::class,
+ CervicalMucus::class,
+ CervicalPosition::class,
+ CyclingPedalingCadence::class,
+ Distance::class,
+ ElevationGained::class,
+ FloorsClimbed::class,
+ HeartRateSeries::class,
+ HeartRateVariabilityDifferentialIndex::class,
+ HeartRateVariabilityRmssd::class,
+ HeartRateVariabilityS::class,
+ HeartRateVariabilitySd2::class,
+ HeartRateVariabilitySdann::class,
+ HeartRateVariabilitySdnn::class,
+ HeartRateVariabilitySdnnIndex::class,
+ HeartRateVariabilitySdsd::class,
+ HeartRateVariabilityTinn::class,
+ Height::class,
+ HipCircumference::class,
+ Hydration::class,
+ LeanBodyMass::class,
+ Menstruation::class,
+ Nutrition::class,
+ OvulationTest::class,
+ OxygenSaturation::class,
+ Power::class,
+ Repetitions::class,
+ RespiratoryRate::class,
+ RestingHeartRate::class,
+ SexualActivity::class,
+ SleepSession::class,
+ SleepStage::class,
+ Speed::class,
+ Steps::class,
+ StepsCadence::class,
+ SwimmingStrokes::class,
+ TotalCaloriesBurned::class,
+ TotalEnergyBurned::class,
+ Vo2Max::class,
+ WaistCircumference::class,
+ WheelchairPushes::class,
+ Weight::class,
+ )
+
+val RECORDS_TYPE_NAME_MAP: Map<String, KClass<out Record>> =
+ ALL_RECORDS_TYPES.associateBy { it.simpleName!! }
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/permission/PermissionConverter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/permission/PermissionConverter.kt
similarity index 84%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/permission/PermissionConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/permission/PermissionConverter.kt
index 9c17b4a..ec24cbc 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/permission/PermissionConverter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/permission/PermissionConverter.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.permission
+package androidx.health.connect.client.impl.converters.permission
-import androidx.health.data.client.impl.converters.datatype.toDataTypeKClass
-import androidx.health.data.client.impl.converters.datatype.toDataTypeName
-import androidx.health.data.client.permission.AccessTypes
-import androidx.health.data.client.permission.Permission
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeKClass
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeName
+import androidx.health.connect.client.permission.AccessTypes
+import androidx.health.connect.client.permission.Permission
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.PermissionProto
import java.lang.IllegalStateException
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordConverters.kt
similarity index 83%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordConverters.kt
index bfefa93..e1af71d 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordConverters.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordConverters.kt
@@ -13,62 +13,63 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
-import androidx.health.data.client.records.ActiveCaloriesBurned
-import androidx.health.data.client.records.ActivityEvent
-import androidx.health.data.client.records.ActivityLap
-import androidx.health.data.client.records.ActivitySession
-import androidx.health.data.client.records.BasalBodyTemperature
-import androidx.health.data.client.records.BasalMetabolicRate
-import androidx.health.data.client.records.BloodGlucose
-import androidx.health.data.client.records.BloodPressure
-import androidx.health.data.client.records.BodyFat
-import androidx.health.data.client.records.BodyTemperature
-import androidx.health.data.client.records.BodyWaterMass
-import androidx.health.data.client.records.BoneMass
-import androidx.health.data.client.records.CervicalMucus
-import androidx.health.data.client.records.CervicalPosition
-import androidx.health.data.client.records.CyclingPedalingCadence
-import androidx.health.data.client.records.Distance
-import androidx.health.data.client.records.ElevationGained
-import androidx.health.data.client.records.FloorsClimbed
-import androidx.health.data.client.records.HeartRate
-import androidx.health.data.client.records.HeartRateSeries
-import androidx.health.data.client.records.HeartRateVariabilityDifferentialIndex
-import androidx.health.data.client.records.HeartRateVariabilityRmssd
-import androidx.health.data.client.records.HeartRateVariabilityS
-import androidx.health.data.client.records.HeartRateVariabilitySd2
-import androidx.health.data.client.records.HeartRateVariabilitySdann
-import androidx.health.data.client.records.HeartRateVariabilitySdnn
-import androidx.health.data.client.records.HeartRateVariabilitySdnnIndex
-import androidx.health.data.client.records.HeartRateVariabilitySdsd
-import androidx.health.data.client.records.HeartRateVariabilityTinn
-import androidx.health.data.client.records.Height
-import androidx.health.data.client.records.HipCircumference
-import androidx.health.data.client.records.Hydration
-import androidx.health.data.client.records.LeanBodyMass
-import androidx.health.data.client.records.Menstruation
-import androidx.health.data.client.records.Nutrition
-import androidx.health.data.client.records.OvulationTest
-import androidx.health.data.client.records.OxygenSaturation
-import androidx.health.data.client.records.Power
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.records.Repetitions
-import androidx.health.data.client.records.RespiratoryRate
-import androidx.health.data.client.records.RestingHeartRate
-import androidx.health.data.client.records.SexualActivity
-import androidx.health.data.client.records.SleepSession
-import androidx.health.data.client.records.SleepStage
-import androidx.health.data.client.records.Speed
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.records.StepsCadence
-import androidx.health.data.client.records.SwimmingStrokes
-import androidx.health.data.client.records.TotalCaloriesBurned
-import androidx.health.data.client.records.Vo2Max
-import androidx.health.data.client.records.WaistCircumference
-import androidx.health.data.client.records.Weight
-import androidx.health.data.client.records.WheelchairPushes
+import androidx.health.connect.client.records.ActiveCaloriesBurned
+import androidx.health.connect.client.records.ActivityEvent
+import androidx.health.connect.client.records.ActivityLap
+import androidx.health.connect.client.records.ActivitySession
+import androidx.health.connect.client.records.BasalBodyTemperature
+import androidx.health.connect.client.records.BasalMetabolicRate
+import androidx.health.connect.client.records.BloodGlucose
+import androidx.health.connect.client.records.BloodPressure
+import androidx.health.connect.client.records.BodyFat
+import androidx.health.connect.client.records.BodyTemperature
+import androidx.health.connect.client.records.BodyWaterMass
+import androidx.health.connect.client.records.BoneMass
+import androidx.health.connect.client.records.CervicalMucus
+import androidx.health.connect.client.records.CervicalPosition
+import androidx.health.connect.client.records.CyclingPedalingCadence
+import androidx.health.connect.client.records.Distance
+import androidx.health.connect.client.records.ElevationGained
+import androidx.health.connect.client.records.FloorsClimbed
+import androidx.health.connect.client.records.HeartRate
+import androidx.health.connect.client.records.HeartRateSeries
+import androidx.health.connect.client.records.HeartRateVariabilityDifferentialIndex
+import androidx.health.connect.client.records.HeartRateVariabilityRmssd
+import androidx.health.connect.client.records.HeartRateVariabilityS
+import androidx.health.connect.client.records.HeartRateVariabilitySd2
+import androidx.health.connect.client.records.HeartRateVariabilitySdann
+import androidx.health.connect.client.records.HeartRateVariabilitySdnn
+import androidx.health.connect.client.records.HeartRateVariabilitySdnnIndex
+import androidx.health.connect.client.records.HeartRateVariabilitySdsd
+import androidx.health.connect.client.records.HeartRateVariabilityTinn
+import androidx.health.connect.client.records.Height
+import androidx.health.connect.client.records.HipCircumference
+import androidx.health.connect.client.records.Hydration
+import androidx.health.connect.client.records.LeanBodyMass
+import androidx.health.connect.client.records.Menstruation
+import androidx.health.connect.client.records.Nutrition
+import androidx.health.connect.client.records.OvulationTest
+import androidx.health.connect.client.records.OxygenSaturation
+import androidx.health.connect.client.records.Power
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.records.Repetitions
+import androidx.health.connect.client.records.RespiratoryRate
+import androidx.health.connect.client.records.RestingHeartRate
+import androidx.health.connect.client.records.SexualActivity
+import androidx.health.connect.client.records.SleepSession
+import androidx.health.connect.client.records.SleepStage
+import androidx.health.connect.client.records.Speed
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.records.StepsCadence
+import androidx.health.connect.client.records.SwimmingStrokes
+import androidx.health.connect.client.records.TotalCaloriesBurned
+import androidx.health.connect.client.records.TotalEnergyBurned
+import androidx.health.connect.client.records.Vo2Max
+import androidx.health.connect.client.records.WaistCircumference
+import androidx.health.connect.client.records.Weight
+import androidx.health.connect.client.records.WheelchairPushes
import androidx.health.platform.client.proto.DataProto
import java.time.Instant
@@ -530,6 +531,15 @@
endZoneOffset = endZoneOffset,
metadata = metadata
)
+ "TotalEnergyBurned" ->
+ TotalEnergyBurned(
+ energyKcal = getDouble("energy"),
+ startTime = startTime,
+ startZoneOffset = startZoneOffset,
+ endTime = endTime,
+ endZoneOffset = endZoneOffset,
+ metadata = metadata
+ )
"WheelchairPushes" ->
WheelchairPushes(
count = getLong("count"),
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordUtils.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordUtils.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordUtils.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordUtils.kt
index bbd4a24..081d281 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ProtoToRecordUtils.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ProtoToRecordUtils.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.metadata.Device
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.metadata.Device
+import androidx.health.connect.client.metadata.Metadata
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.DataProto.DataPointOrBuilder
import androidx.health.platform.client.proto.DataProto.SeriesValueOrBuilder
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoConverters.kt
similarity index 84%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoConverters.kt
index 0d59e11..eb883bb 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoConverters.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoConverters.kt
@@ -13,62 +13,63 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
-import androidx.health.data.client.records.ActiveCaloriesBurned
-import androidx.health.data.client.records.ActivityEvent
-import androidx.health.data.client.records.ActivityLap
-import androidx.health.data.client.records.ActivitySession
-import androidx.health.data.client.records.BasalBodyTemperature
-import androidx.health.data.client.records.BasalMetabolicRate
-import androidx.health.data.client.records.BloodGlucose
-import androidx.health.data.client.records.BloodPressure
-import androidx.health.data.client.records.BodyFat
-import androidx.health.data.client.records.BodyTemperature
-import androidx.health.data.client.records.BodyWaterMass
-import androidx.health.data.client.records.BoneMass
-import androidx.health.data.client.records.CervicalMucus
-import androidx.health.data.client.records.CervicalPosition
-import androidx.health.data.client.records.CyclingPedalingCadence
-import androidx.health.data.client.records.Distance
-import androidx.health.data.client.records.ElevationGained
-import androidx.health.data.client.records.FloorsClimbed
-import androidx.health.data.client.records.HeartRateSeries
-import androidx.health.data.client.records.HeartRateVariabilityDifferentialIndex
-import androidx.health.data.client.records.HeartRateVariabilityRmssd
-import androidx.health.data.client.records.HeartRateVariabilityS
-import androidx.health.data.client.records.HeartRateVariabilitySd2
-import androidx.health.data.client.records.HeartRateVariabilitySdann
-import androidx.health.data.client.records.HeartRateVariabilitySdnn
-import androidx.health.data.client.records.HeartRateVariabilitySdnnIndex
-import androidx.health.data.client.records.HeartRateVariabilitySdsd
-import androidx.health.data.client.records.HeartRateVariabilityTinn
-import androidx.health.data.client.records.Height
-import androidx.health.data.client.records.HipCircumference
-import androidx.health.data.client.records.Hydration
-import androidx.health.data.client.records.LeanBodyMass
-import androidx.health.data.client.records.Menstruation
-import androidx.health.data.client.records.Nutrition
-import androidx.health.data.client.records.OvulationTest
-import androidx.health.data.client.records.OxygenSaturation
-import androidx.health.data.client.records.Power
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.records.Repetitions
-import androidx.health.data.client.records.RespiratoryRate
-import androidx.health.data.client.records.RestingHeartRate
-import androidx.health.data.client.records.SeriesRecord
-import androidx.health.data.client.records.SexualActivity
-import androidx.health.data.client.records.SleepSession
-import androidx.health.data.client.records.SleepStage
-import androidx.health.data.client.records.Speed
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.records.StepsCadence
-import androidx.health.data.client.records.SwimmingStrokes
-import androidx.health.data.client.records.TotalCaloriesBurned
-import androidx.health.data.client.records.Vo2Max
-import androidx.health.data.client.records.WaistCircumference
-import androidx.health.data.client.records.Weight
-import androidx.health.data.client.records.WheelchairPushes
+import androidx.health.connect.client.records.ActiveCaloriesBurned
+import androidx.health.connect.client.records.ActivityEvent
+import androidx.health.connect.client.records.ActivityLap
+import androidx.health.connect.client.records.ActivitySession
+import androidx.health.connect.client.records.BasalBodyTemperature
+import androidx.health.connect.client.records.BasalMetabolicRate
+import androidx.health.connect.client.records.BloodGlucose
+import androidx.health.connect.client.records.BloodPressure
+import androidx.health.connect.client.records.BodyFat
+import androidx.health.connect.client.records.BodyTemperature
+import androidx.health.connect.client.records.BodyWaterMass
+import androidx.health.connect.client.records.BoneMass
+import androidx.health.connect.client.records.CervicalMucus
+import androidx.health.connect.client.records.CervicalPosition
+import androidx.health.connect.client.records.CyclingPedalingCadence
+import androidx.health.connect.client.records.Distance
+import androidx.health.connect.client.records.ElevationGained
+import androidx.health.connect.client.records.FloorsClimbed
+import androidx.health.connect.client.records.HeartRateSeries
+import androidx.health.connect.client.records.HeartRateVariabilityDifferentialIndex
+import androidx.health.connect.client.records.HeartRateVariabilityRmssd
+import androidx.health.connect.client.records.HeartRateVariabilityS
+import androidx.health.connect.client.records.HeartRateVariabilitySd2
+import androidx.health.connect.client.records.HeartRateVariabilitySdann
+import androidx.health.connect.client.records.HeartRateVariabilitySdnn
+import androidx.health.connect.client.records.HeartRateVariabilitySdnnIndex
+import androidx.health.connect.client.records.HeartRateVariabilitySdsd
+import androidx.health.connect.client.records.HeartRateVariabilityTinn
+import androidx.health.connect.client.records.Height
+import androidx.health.connect.client.records.HipCircumference
+import androidx.health.connect.client.records.Hydration
+import androidx.health.connect.client.records.LeanBodyMass
+import androidx.health.connect.client.records.Menstruation
+import androidx.health.connect.client.records.Nutrition
+import androidx.health.connect.client.records.OvulationTest
+import androidx.health.connect.client.records.OxygenSaturation
+import androidx.health.connect.client.records.Power
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.records.Repetitions
+import androidx.health.connect.client.records.RespiratoryRate
+import androidx.health.connect.client.records.RestingHeartRate
+import androidx.health.connect.client.records.SeriesRecord
+import androidx.health.connect.client.records.SexualActivity
+import androidx.health.connect.client.records.SleepSession
+import androidx.health.connect.client.records.SleepStage
+import androidx.health.connect.client.records.Speed
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.records.StepsCadence
+import androidx.health.connect.client.records.SwimmingStrokes
+import androidx.health.connect.client.records.TotalCaloriesBurned
+import androidx.health.connect.client.records.TotalEnergyBurned
+import androidx.health.connect.client.records.Vo2Max
+import androidx.health.connect.client.records.WaistCircumference
+import androidx.health.connect.client.records.Weight
+import androidx.health.connect.client.records.WheelchairPushes
import androidx.health.platform.client.proto.DataProto
/** Converts public API object into internal proto for ipc. */
@@ -502,6 +503,11 @@
.setDataType(protoDataType("TotalCaloriesBurned"))
.apply { putValues("energy", doubleVal(energyKcal)) }
.build()
+ is TotalEnergyBurned ->
+ intervalProto()
+ .setDataType(protoDataType("TotalEnergyBurned"))
+ .apply { putValues("energy", doubleVal(energyKcal)) }
+ .build()
is WheelchairPushes ->
intervalProto()
.setDataType(protoDataType("WheelchairPushes"))
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoUtils.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoUtils.kt
similarity index 90%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoUtils.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoUtils.kt
index bb2802b..89bc9ec 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/RecordToProtoUtils.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/RecordToProtoUtils.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
-import androidx.health.data.client.metadata.Device
-import androidx.health.data.client.metadata.Metadata
-import androidx.health.data.client.records.InstantaneousRecord
-import androidx.health.data.client.records.IntervalRecord
+import androidx.health.connect.client.metadata.Device
+import androidx.health.connect.client.metadata.Metadata
+import androidx.health.connect.client.records.InstantaneousRecord
+import androidx.health.connect.client.records.IntervalRecord
import androidx.health.platform.client.proto.DataProto
import java.time.Instant
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ValueExt.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ValueExt.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ValueExt.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ValueExt.kt
index 554ac83..be01808 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/records/ValueExt.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/records/ValueExt.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
import androidx.health.platform.client.proto.DataProto
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/AggregateRequestToProto.kt
similarity index 80%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/AggregateRequestToProto.kt
index b5ace22..41d58b6 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/AggregateRequestToProto.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/AggregateRequestToProto.kt
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.request
+package androidx.health.connect.client.impl.converters.request
-import androidx.health.data.client.impl.converters.aggregate.toProto
-import androidx.health.data.client.impl.converters.time.toProto
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.request.AggregateGroupByDurationRequest
-import androidx.health.data.client.request.AggregateGroupByPeriodRequest
-import androidx.health.data.client.request.AggregateRequest
+import androidx.health.connect.client.impl.converters.aggregate.toProto
+import androidx.health.connect.client.impl.converters.time.toProto
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.request.AggregateGroupByDurationRequest
+import androidx.health.connect.client.request.AggregateGroupByPeriodRequest
+import androidx.health.connect.client.request.AggregateRequest
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/DeleteDataRangeRequestToProto.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/DeleteDataRangeRequestToProto.kt
similarity index 78%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/DeleteDataRangeRequestToProto.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/DeleteDataRangeRequestToProto.kt
index d605e2e..9e640b4 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/DeleteDataRangeRequestToProto.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/DeleteDataRangeRequestToProto.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.request
+package androidx.health.connect.client.impl.converters.request
-import androidx.health.data.client.impl.converters.datatype.toDataTypeName
-import androidx.health.data.client.impl.converters.time.toProto
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeName
+import androidx.health.connect.client.impl.converters.time.toProto
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
import kotlin.reflect.KClass
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRangeRequestToProto.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRangeRequestToProto.kt
similarity index 81%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRangeRequestToProto.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRangeRequestToProto.kt
index fa38d639..a8d4b74 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRangeRequestToProto.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRangeRequestToProto.kt
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.request
+package androidx.health.connect.client.impl.converters.request
-import androidx.health.data.client.impl.converters.datatype.toDataTypeName
-import androidx.health.data.client.impl.converters.time.toProto
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.request.ReadRecordsRequest
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeName
+import androidx.health.connect.client.impl.converters.time.toProto
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.request.ReadRecordsRequest
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRequestToProto.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRequestToProto.kt
similarity index 83%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRequestToProto.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRequestToProto.kt
index d404d97..80a7a47 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/request/ReadDataRequestToProto.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/request/ReadDataRequestToProto.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.request
+package androidx.health.connect.client.impl.converters.request
-import androidx.health.data.client.impl.converters.datatype.toDataTypeIdPairProto
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.impl.converters.datatype.toDataTypeIdPairProto
+import androidx.health.connect.client.records.Record
import androidx.health.platform.client.proto.RequestProto
import kotlin.reflect.KClass
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToChangesResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToChangesResponse.kt
similarity index 78%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToChangesResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToChangesResponse.kt
index 338eb4c..9def251 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToChangesResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToChangesResponse.kt
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.response
+package androidx.health.connect.client.impl.converters.response
-import androidx.health.data.client.changes.Change
-import androidx.health.data.client.changes.DeletionChange
-import androidx.health.data.client.changes.UpsertionChange
-import androidx.health.data.client.impl.converters.records.toRecord
-import androidx.health.data.client.response.ChangesResponse
+import androidx.health.connect.client.changes.Change
+import androidx.health.connect.client.changes.DeletionChange
+import androidx.health.connect.client.changes.UpsertionChange
+import androidx.health.connect.client.impl.converters.records.toRecord
+import androidx.health.connect.client.response.ChangesResponse
import androidx.health.platform.client.proto.ChangeProto
import androidx.health.platform.client.proto.ResponseProto
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToReadRecordsResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToReadRecordsResponse.kt
similarity index 80%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToReadRecordsResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToReadRecordsResponse.kt
index ccd8f1d..e0394f0 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/response/ProtoToReadRecordsResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/response/ProtoToReadRecordsResponse.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.response
+package androidx.health.connect.client.impl.converters.response
-import androidx.health.data.client.impl.converters.records.toRecord
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.response.ReadRecordsResponse
+import androidx.health.connect.client.impl.converters.records.toRecord
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.response.ReadRecordsResponse
import androidx.health.platform.client.proto.ResponseProto
/** Converts public API object into internal proto for ipc. */
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/time/TimeRangeFilterConverter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/time/TimeRangeFilterConverter.kt
similarity index 91%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/time/TimeRangeFilterConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/time/TimeRangeFilterConverter.kt
index 7dd84ff..b54e758 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/time/TimeRangeFilterConverter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/converters/time/TimeRangeFilterConverter.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.time
+package androidx.health.connect.client.impl.converters.time
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.proto.TimeProto
/** Converts public API object into internal proto for ipc. */
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/impl/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/impl/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/impl/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/DataOrigin.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DataOrigin.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/metadata/DataOrigin.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DataOrigin.kt
index ad487ac..bdd1281 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/DataOrigin.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DataOrigin.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.metadata
+package androidx.health.connect.client.metadata
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
/**
* Specifies the original source of any [Record]: application that inserted it and device on which
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/Device.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Device.kt
similarity index 97%
rename from health/health-data-client/src/main/java/androidx/health/data/client/metadata/Device.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Device.kt
index 6316884..d13ba61 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/Device.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Device.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.metadata
+package androidx.health.connect.client.metadata
/**
* A physical device (such as phone, watch, scale, or chest strap) which captured associated health
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/DeviceType.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DeviceType.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/metadata/DeviceType.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DeviceType.kt
index e02c630..b0736cc 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/DeviceType.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/DeviceType.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.metadata
+package androidx.health.connect.client.metadata
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/Metadata.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Metadata.kt
similarity index 97%
rename from health/health-data-client/src/main/java/androidx/health/data/client/metadata/Metadata.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Metadata.kt
index 9e5e745..42cc0bb 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/Metadata.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/Metadata.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.metadata
+package androidx.health.connect.client.metadata
import java.time.Instant
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/metadata/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/metadata/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/metadata/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/permission/AccessTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/AccessTypes.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/permission/AccessTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/permission/AccessTypes.kt
index 838e731..f2b9b94 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/permission/AccessTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/AccessTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.permission
+package androidx.health.connect.client.permission
import androidx.annotation.IntDef
import androidx.annotation.RestrictTo
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/permission/HealthDataRequestPermissions.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/HealthDataRequestPermissions.kt
similarity index 87%
rename from health/health-data-client/src/main/java/androidx/health/data/client/permission/HealthDataRequestPermissions.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/permission/HealthDataRequestPermissions.kt
index 148e6bc..c215b9e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/permission/HealthDataRequestPermissions.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/HealthDataRequestPermissions.kt
@@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.permission
+package androidx.health.connect.client.permission
import android.content.Context
import android.content.Intent
import androidx.activity.result.contract.ActivityResultContract
import androidx.annotation.RestrictTo
-import androidx.health.data.client.HealthDataClient.Companion.DEFAULT_PROVIDER_PACKAGE_NAME
-import androidx.health.data.client.impl.converters.permission.toJetpackPermission
-import androidx.health.data.client.impl.converters.permission.toProtoPermission
+import androidx.health.connect.client.HealthConnectClient.Companion.DEFAULT_PROVIDER_PACKAGE_NAME
+import androidx.health.connect.client.impl.converters.permission.toJetpackPermission
+import androidx.health.connect.client.impl.converters.permission.toProtoPermission
import androidx.health.platform.client.permission.Permission as ProtoPermission
import androidx.health.platform.client.service.HealthDataServiceConstants.ACTION_REQUEST_PERMISSIONS
import androidx.health.platform.client.service.HealthDataServiceConstants.KEY_GRANTED_PERMISSIONS_JETPACK
import androidx.health.platform.client.service.HealthDataServiceConstants.KEY_REQUESTED_PERMISSIONS_JETPACK
/**
- * An [ActivityResultContract] to request Health Data permissions.
+ * An [ActivityResultContract] to request Health Connect permissions.
*
* @param providerPackageName Optional provider package name for the backing implementation of
* choice.
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/permission/Permission.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/Permission.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/permission/Permission.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/permission/Permission.kt
index 49c0193..bf42e71 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/permission/Permission.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/Permission.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.permission
+package androidx.health.connect.client.permission
import androidx.annotation.RestrictTo
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
import kotlin.reflect.KClass
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/permission/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/permission/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/permission/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/permission/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActiveCaloriesBurned.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActiveCaloriesBurned.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActiveCaloriesBurned.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActiveCaloriesBurned.kt
index c26a4d6..cb4f524 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActiveCaloriesBurned.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActiveCaloriesBurned.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEvent.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEvent.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEvent.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEvent.kt
index 1e4acfb..1819cf8 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEvent.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEvent.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEventTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEventTypes.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEventTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEventTypes.kt
index 3ec8d8c..3e6a5cb 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityEventTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityEventTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityLap.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityLap.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityLap.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityLap.kt
index 956fdb3..4794730 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityLap.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityLap.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivitySession.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivitySession.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActivitySession.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivitySession.kt
index ad2a5b8..57282f2 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivitySession.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivitySession.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityTypes.kt
similarity index 99%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityTypes.kt
index c51ac08..185b2f3 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ActivityTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ActivityTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BasalBodyTemperature.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalBodyTemperature.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BasalBodyTemperature.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalBodyTemperature.kt
index 4d1fa5c..9fdf165 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BasalBodyTemperature.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalBodyTemperature.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BasalMetabolicRate.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalMetabolicRate.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BasalMetabolicRate.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalMetabolicRate.kt
index adf5806..5220c57 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BasalMetabolicRate.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BasalMetabolicRate.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodGlucose.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodGlucose.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BloodGlucose.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodGlucose.kt
index ac4e53d..bd8b5e7 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodGlucose.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodGlucose.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressure.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressure.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressure.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressure.kt
index 820fd3a..32361fe 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressure.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressure.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressureMeasurementLocations.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressureMeasurementLocations.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressureMeasurementLocations.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressureMeasurementLocations.kt
index b9b9d6e..ac2b63d 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BloodPressureMeasurementLocations.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BloodPressureMeasurementLocations.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyFat.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyFat.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BodyFat.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyFat.kt
index 86d315b..c74a861 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyFat.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyFat.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyPositions.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyPositions.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BodyPositions.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyPositions.kt
index 76a9e6c..03b1882 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyPositions.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyPositions.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperature.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperature.kt
index a7dc556..e77344c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperature.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperature.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperatureMeasurementLocations.kt
similarity index 97%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperatureMeasurementLocations.kt
index 707ad7f..32eca43 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyTemperatureMeasurementLocations.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyTemperatureMeasurementLocations.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyWaterMass.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyWaterMass.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BodyWaterMass.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyWaterMass.kt
index befc04e..a37b647 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BodyWaterMass.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BodyWaterMass.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/BoneMass.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BoneMass.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/BoneMass.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/BoneMass.kt
index 5b26c0e..02462b7 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/BoneMass.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/BoneMass.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalDilations.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalDilations.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalDilations.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalDilations.kt
index 7002953..41c3b89 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalDilations.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalDilations.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalFirmnesses.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalFirmnesses.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalFirmnesses.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalFirmnesses.kt
index 4168585..55b714e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalFirmnesses.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalFirmnesses.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucus.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucus.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucus.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucus.kt
index f48bb39..c6476e3 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucus.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucus.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusAmounts.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusAmounts.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusAmounts.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusAmounts.kt
index f5ab667..4f6caa5 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusAmounts.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusAmounts.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusTextures.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusTextures.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusTextures.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusTextures.kt
index aead46d..d5173dd5 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalMucusTextures.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalMucusTextures.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPosition.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPosition.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPosition.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPosition.kt
index dd89502..fd0ef33 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPosition.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPosition.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPositionValues.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPositionValues.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPositionValues.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPositionValues.kt
index 5ca0f16..9560f97 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CervicalPositionValues.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CervicalPositionValues.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/CyclingPedalingCadence.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CyclingPedalingCadence.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/CyclingPedalingCadence.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/CyclingPedalingCadence.kt
index b25059d..a66cf182 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/CyclingPedalingCadence.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/CyclingPedalingCadence.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Distance.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Distance.kt
index 2fe3c53..d3d8d63 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Distance.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Distance.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ElevationGained.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/ElevationGained.kt
index f0731db8..6a26e81 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/ElevationGained.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/ElevationGained.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/FloorsClimbed.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/FloorsClimbed.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/FloorsClimbed.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/FloorsClimbed.kt
index b6c5785d..5b16ebb 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/FloorsClimbed.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/FloorsClimbed.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateSeries.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateSeries.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateSeries.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateSeries.kt
index e810ff5b..d1f1827 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateSeries.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateSeries.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.LongAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.LongAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityDifferentialIndex.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityDifferentialIndex.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityDifferentialIndex.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityDifferentialIndex.kt
index 9ef4404..a762ef2 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityDifferentialIndex.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityDifferentialIndex.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityRmssd.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityRmssd.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityRmssd.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityRmssd.kt
index 7d6ed10..c053a57 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityRmssd.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityRmssd.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityS.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityS.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityS.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityS.kt
index 986def2..3f0864b 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityS.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityS.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySd2.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySd2.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySd2.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySd2.kt
index 2e68c95..bb2ede8 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySd2.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySd2.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdann.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdann.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdann.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdann.kt
index ab0e8c4..0c43270 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdann.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdann.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnn.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnn.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnn.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnn.kt
index 76181dc..f88c6e8 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnn.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnn.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnnIndex.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnnIndex.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnnIndex.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnnIndex.kt
index 3973853..26e1cf8 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdnnIndex.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdnnIndex.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdsd.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdsd.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdsd.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdsd.kt
index 2389a17..726684a 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilitySdsd.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilitySdsd.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityTinn.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityTinn.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityTinn.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityTinn.kt
index 57bba14..44253d0 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HeartRateVariabilityTinn.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HeartRateVariabilityTinn.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Height.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Height.kt
index 36f3f4c..ce2ad32 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Height.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Height.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HipCircumference.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/HipCircumference.kt
index e82d523..66742d8 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/HipCircumference.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/HipCircumference.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Hydration.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Hydration.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Hydration.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Hydration.kt
index 0229889..ce53f8e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Hydration.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Hydration.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/InstantaneousRecord.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/InstantaneousRecord.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/InstantaneousRecord.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/InstantaneousRecord.kt
index ef549f0..822b760 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/InstantaneousRecord.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/InstantaneousRecord.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/IntervalRecord.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/IntervalRecord.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/IntervalRecord.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/IntervalRecord.kt
index 7ead665..7d621df 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/IntervalRecord.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/IntervalRecord.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/LeanBodyMass.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/LeanBodyMass.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/LeanBodyMass.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/LeanBodyMass.kt
index d2e730f..a735cd7 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/LeanBodyMass.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/LeanBodyMass.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/MealTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/MealTypes.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/MealTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/MealTypes.kt
index fa49b5f..81e934c 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/MealTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/MealTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Menstruation.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Menstruation.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Menstruation.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Menstruation.kt
index 0753441..c9e0125 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Menstruation.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Menstruation.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/MenstruationFlows.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/MenstruationFlows.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/MenstruationFlows.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/MenstruationFlows.kt
index c2a8f3c..f95e66f 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/MenstruationFlows.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/MenstruationFlows.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Nutrition.kt
similarity index 98%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Nutrition.kt
index 0bd018c..c431f44 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Nutrition.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Nutrition.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTest.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTest.kt
index d98bb8b..02a0e2e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTest.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTestResults.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTestResults.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTestResults.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTestResults.kt
index 236f3f2..5e8fff9 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/OvulationTestResults.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OvulationTestResults.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/OxygenSaturation.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OxygenSaturation.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/OxygenSaturation.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/OxygenSaturation.kt
index eebe476..6b76045 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/OxygenSaturation.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/OxygenSaturation.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Power.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Power.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Power.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Power.kt
index 5e729bd..7b69957 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Power.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Power.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Record.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Record.kt
similarity index 88%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Record.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Record.kt
index ba8099d..db2cc2f 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Record.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Record.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
/** Common interface shared by readable or writable records. */
public interface Record {
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/RelationToMeals.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RelationToMeals.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/RelationToMeals.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/RelationToMeals.kt
index 67b4930..94b4156 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/RelationToMeals.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RelationToMeals.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Repetitions.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Repetitions.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Repetitions.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Repetitions.kt
index efb033c..da712fd 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Repetitions.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Repetitions.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/RespiratoryRate.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RespiratoryRate.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/RespiratoryRate.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/RespiratoryRate.kt
index ed3c6d5..ddfea29 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/RespiratoryRate.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RespiratoryRate.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/RestingHeartRate.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RestingHeartRate.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/RestingHeartRate.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/RestingHeartRate.kt
index 828e1d9..05601c0 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/RestingHeartRate.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/RestingHeartRate.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SeriesRecord.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SeriesRecord.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SeriesRecord.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SeriesRecord.kt
index e3c3a81..9fb8ee6 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SeriesRecord.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SeriesRecord.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
/** A record that contains a series of measurements. */
// Consider exposing this one and other similar interfaces!
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivity.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivity.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivity.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivity.kt
index 565cceb..512c35b 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivity.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivity.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivityProtections.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivityProtections.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivityProtections.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivityProtections.kt
index bef5417..f495471 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SexualActivityProtections.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SexualActivityProtections.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepSession.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepSession.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SleepSession.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepSession.kt
index 43c3dc8..043531ee 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepSession.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepSession.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStage.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStage.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStage.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStage.kt
index e257212..e409064 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStage.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStage.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStageTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStageTypes.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStageTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStageTypes.kt
index 909b48f..de32752 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SleepStageTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SleepStageTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SpecimenSources.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SpecimenSources.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SpecimenSources.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SpecimenSources.kt
index 0e34611..a24ef839 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SpecimenSources.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SpecimenSources.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Speed.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Speed.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Speed.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Speed.kt
index e0b0077..b36d366 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Speed.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Speed.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Steps.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Steps.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Steps.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Steps.kt
index 1b0c7c5..0028d35 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Steps.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Steps.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.aggregate.LongAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.LongAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/StepsCadence.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/StepsCadence.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/StepsCadence.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/StepsCadence.kt
index b51799a..894619e 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/StepsCadence.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/StepsCadence.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingStrokes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingStrokes.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingStrokes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingStrokes.kt
index 6e20230..2675b05 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingStrokes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingStrokes.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingTypes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingTypes.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingTypes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingTypes.kt
index be332f1..15225a1 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/SwimmingTypes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/SwimmingTypes.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalCaloriesBurned.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalCaloriesBurned.kt
index 87ef22f..9056e1b 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalCaloriesBurned.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalEnergyBurned.kt
similarity index 88%
copy from health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt
copy to health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalEnergyBurned.kt
index 87ef22f..ad463e4 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/TotalCaloriesBurned.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/TotalEnergyBurned.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
@@ -26,7 +26,7 @@
* Each record represents the total kilocalories burned over a time interval.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
-public class TotalCaloriesBurned(
+public class TotalEnergyBurned(
/** Energy in kilocalories. Required field. Valid range: 0-1000000. */
public val energyKcal: Double,
override val startTime: Instant,
@@ -37,7 +37,7 @@
) : IntervalRecord {
override fun equals(other: Any?): Boolean {
if (this === other) return true
- if (other !is TotalCaloriesBurned) return false
+ if (other !is TotalEnergyBurned) return false
if (energyKcal != other.energyKcal) return false
if (startTime != other.startTime) return false
@@ -61,7 +61,7 @@
companion object {
/** Metric identifier to retrieve total energy from [AggregateDataRow]. */
- @JvmField
+ @JvmStatic
val ENERGY_BURNED_TOTAL: DoubleAggregateMetric =
DoubleAggregateMetric("TotalEnergyBurned", "total", "energy")
}
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2Max.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2Max.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2Max.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2Max.kt
index b215fcf..327700d 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2Max.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2Max.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2MaxMeasurementMethods.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2MaxMeasurementMethods.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2MaxMeasurementMethods.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2MaxMeasurementMethods.kt
index 92943ac..2e42004 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Vo2MaxMeasurementMethods.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Vo2MaxMeasurementMethods.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
import androidx.annotation.StringDef
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/WaistCircumference.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/WaistCircumference.kt
similarity index 94%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/WaistCircumference.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/WaistCircumference.kt
index 9b60dd2..c3ab62f3 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/WaistCircumference.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/WaistCircumference.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/Weight.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Weight.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/Weight.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/Weight.kt
index a07b814..adb6b53 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/Weight.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/Weight.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
-import androidx.health.data.client.aggregate.DoubleAggregateMetric
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.aggregate.DoubleAggregateMetric
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/WheelchairPushes.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/WheelchairPushes.kt
similarity index 95%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/WheelchairPushes.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/WheelchairPushes.kt
index 000cd1b..ca85d18 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/records/WheelchairPushes.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/WheelchairPushes.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.records
+package androidx.health.connect.client.records
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.Metadata
+import androidx.health.connect.client.metadata.Metadata
import java.time.Instant
import java.time.ZoneOffset
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/records/package-info.java b/health/health-connect-client/src/main/java/androidx/health/connect/client/records/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/data/client/records/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/records/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByDurationRequest.kt
similarity index 86%
rename from health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByDurationRequest.kt
index a1552c8..4557844 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByDurationRequest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByDurationRequest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.AggregateMetric
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.aggregate.AggregateMetric
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Duration
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByPeriodRequest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByPeriodRequest.kt
similarity index 86%
rename from health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByPeriodRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByPeriodRequest.kt
index 9084849..27ffee4 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateGroupByPeriodRequest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateGroupByPeriodRequest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.AggregateMetric
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.aggregate.AggregateMetric
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Period
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateRequest.kt
similarity index 84%
rename from health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateRequest.kt
index 895e1d2..2f895e2 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/AggregateRequest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/AggregateRequest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
import androidx.annotation.RestrictTo
-import androidx.health.data.client.aggregate.AggregateMetric
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.aggregate.AggregateMetric
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.time.TimeRangeFilter
/**
* Request object to read aggregations for given [AggregateMetric]s in Android Health Platform.
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/ChangesTokenRequest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/ChangesTokenRequest.kt
similarity index 86%
rename from health/health-data-client/src/main/java/androidx/health/data/client/request/ChangesTokenRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/request/ChangesTokenRequest.kt
index fc469ff..25a92e4 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/ChangesTokenRequest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/ChangesTokenRequest.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.records.Record
import kotlin.reflect.KClass
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/request/ReadRecordsRequest.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/ReadRecordsRequest.kt
similarity index 92%
rename from health/health-data-client/src/main/java/androidx/health/data/client/request/ReadRecordsRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/request/ReadRecordsRequest.kt
index 93d6b51..7c7314f 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/request/ReadRecordsRequest.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/request/ReadRecordsRequest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
import androidx.annotation.RestrictTo
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.records.Record
+import androidx.health.connect.client.time.TimeRangeFilter
import kotlin.reflect.KClass
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/response/ChangesResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ChangesResponse.kt
similarity index 93%
rename from health/health-data-client/src/main/java/androidx/health/data/client/response/ChangesResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/response/ChangesResponse.kt
index bc06095..386db68 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/response/ChangesResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ChangesResponse.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.response
+package androidx.health.connect.client.response
-import androidx.health.data.client.changes.Change
+import androidx.health.connect.client.changes.Change
/**
* Response to clients fetching changes.
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/response/InsertRecordsResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/InsertRecordsResponse.kt
similarity index 74%
rename from health/health-data-client/src/main/java/androidx/health/data/client/response/InsertRecordsResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/response/InsertRecordsResponse.kt
index 3806ef6..3cad7d7 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/response/InsertRecordsResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/InsertRecordsResponse.kt
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.response
+package androidx.health.connect.client.response
/**
* Response to record insertion.
*
- * @see [HealthDataClient.insertRecord]
+ * @see [HealthConnectClient.insertRecord]
*/
public class InsertRecordsResponse
internal constructor(
/*
* Contains
- * [androidx.health.data.client.metadata.Metadata.uid] of inserted [Record] in same order as
- * passed to [androidx.health.data.client.HealthDataClient.insertRecords].
+ * [androidx.health.connect.client.metadata.Metadata.uid] of inserted [Record] in same order as
+ * passed to [androidx.health.connect.client.HealthDataClient.insertRecords].
*/
val recordUidsList: List<String>
)
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordResponse.kt
similarity index 84%
rename from health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordResponse.kt
index 9aa14b4..52259fd 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordResponse.kt
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.response
+package androidx.health.connect.client.response
import androidx.annotation.RestrictTo
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
/**
* Response to record read.
*
- * @see [HealthDataClient.readRecord]
+ * @see [HealthConnectClient.readRecord]
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class ReadRecordResponse<T : Record> internal constructor(val record: T)
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordsResponse.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordsResponse.kt
similarity index 85%
rename from health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordsResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordsResponse.kt
index 566d3b2..0565e97 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/response/ReadRecordsResponse.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/response/ReadRecordsResponse.kt
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.response
+package androidx.health.connect.client.response
import androidx.annotation.RestrictTo
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
/**
* Response to records read.
*
- * @see [HealthDataClient.readRecords]
+ * @see [HealthConnectClient.readRecords]
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
class ReadRecordsResponse<T : Record>
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/time/TimeRangeFilter.kt b/health/health-connect-client/src/main/java/androidx/health/connect/client/time/TimeRangeFilter.kt
similarity index 98%
rename from health/health-data-client/src/main/java/androidx/health/data/client/time/TimeRangeFilter.kt
rename to health/health-connect-client/src/main/java/androidx/health/connect/client/time/TimeRangeFilter.kt
index 8bd1300..5032399 100644
--- a/health/health-data-client/src/main/java/androidx/health/data/client/time/TimeRangeFilter.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/connect/client/time/TimeRangeFilter.kt
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.time
+package androidx.health.connect.client.time
-import androidx.health.data.client.records.Record
+import androidx.health.connect.client.records.Record
import java.time.Instant
import java.time.LocalDateTime
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt
similarity index 96%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt
index 5d56706..a9cb225 100644
--- a/health/health-data-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt
+++ b/health/health-connect-client/src/main/java/androidx/health/platform/client/HealthDataAsyncClient.kt
@@ -25,7 +25,7 @@
/**
* Interface to access health and fitness records.
*
- * Like [HealthDataClient] but expose ListenableFuture instead of kotlin coroutines.
+ * Like [HealthConnectClient] but expose ListenableFuture instead of kotlin coroutines.
*/
interface HealthDataAsyncClient {
/**
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/HealthDataService.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/HealthDataService.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/HealthDataService.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/HealthDataService.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/SdkConfig.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/SdkConfig.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/SdkConfig.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/SdkConfig.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/changes/ChangesEvent.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/changes/ChangesEvent.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/changes/ChangesEvent.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/changes/ChangesEvent.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/error/ErrorCode.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/error/ErrorCode.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/error/ErrorCode.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/error/ErrorCode.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/error/ErrorStatus.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/error/ErrorStatus.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/error/ErrorStatus.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/error/ErrorStatus.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/AggregateDataCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/AggregateDataCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/AggregateDataCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/AggregateDataCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ClearOnChangesListenerCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ClearOnChangesListenerCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ClearOnChangesListenerCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ClearOnChangesListenerCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/DeleteDataCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/DeleteDataCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/DeleteDataCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/DeleteDataCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/DeleteDataRangeCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/DeleteDataRangeCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/DeleteDataRangeCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/DeleteDataRangeCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetChangesCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetChangesCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetChangesCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetChangesCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetChangesTokenCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetChangesTokenCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetChangesTokenCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetChangesTokenCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetGrantedPermissionsCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetGrantedPermissionsCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/GetGrantedPermissionsCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/GetGrantedPermissionsCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/InsertDataCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/InsertDataCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/InsertDataCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/InsertDataCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/OnChangesListenerProxy.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/OnChangesListenerProxy.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/OnChangesListenerProxy.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/OnChangesListenerProxy.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ReadDataCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ReadDataCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ReadDataCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ReadDataCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ReadDataRangeCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ReadDataRangeCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ReadDataRangeCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ReadDataRangeCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/RevokeAllPermissionsCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/RevokeAllPermissionsCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/RevokeAllPermissionsCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/RevokeAllPermissionsCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClient.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClient.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClient.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClient.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/SetOnChangesListenerCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/SetOnChangesListenerCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/SetOnChangesListenerCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/SetOnChangesListenerCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/UpdateDataCallback.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/UpdateDataCallback.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/UpdateDataCallback.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/UpdateDataCallback.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/ProtoData.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/ProtoData.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/ProtoData.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/ProtoData.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/ProtoParcelable.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/ProtoParcelable.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/ProtoParcelable.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/ProtoParcelable.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/data/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/data/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/error/ErrorStatusConverter.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/error/ErrorStatusConverter.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/error/ErrorStatusConverter.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/error/ErrorStatusConverter.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/error/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/error/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/error/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/error/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/internal/ProviderConnectionManager.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/internal/ProviderConnectionManager.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/internal/ProviderConnectionManager.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/internal/ProviderConnectionManager.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ApiVersionException.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ApiVersionException.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ApiVersionException.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ApiVersionException.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/Client.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/Client.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/Client.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/Client.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ClientConfiguration.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ClientConfiguration.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ClientConfiguration.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ClientConfiguration.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteFutureOperation.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteFutureOperation.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteFutureOperation.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteFutureOperation.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteOperation.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteOperation.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteOperation.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/RemoteOperation.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ServiceOperation.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ServiceOperation.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/ServiceOperation.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/ServiceOperation.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/BaseQueueOperation.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/BaseQueueOperation.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/BaseQueueOperation.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/BaseQueueOperation.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionConfiguration.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionConfiguration.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionConfiguration.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionConfiguration.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionManager.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionManager.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionManager.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ConnectionManager.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/DefaultExecutionTracker.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/DefaultExecutionTracker.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/DefaultExecutionTracker.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/DefaultExecutionTracker.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ExecutionTracker.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ExecutionTracker.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ExecutionTracker.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ExecutionTracker.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ListenerKey.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ListenerKey.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ListenerKey.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ListenerKey.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/QueueOperation.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/QueueOperation.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/QueueOperation.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/QueueOperation.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnection.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnection.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnection.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnection.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/ipc/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/ipc/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/permission/foregroundstate/ForegroundStateChecker.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/permission/foregroundstate/ForegroundStateChecker.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/permission/foregroundstate/ForegroundStateChecker.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/permission/foregroundstate/ForegroundStateChecker.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManager.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManager.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManager.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManager.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkService.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkService.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkService.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkService.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImpl.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImpl.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImpl.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImpl.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/permission/Permission.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/permission/Permission.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/permission/Permission.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/permission/Permission.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/permission/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/permission/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/permission/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/permission/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/proto/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/proto/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/proto/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/proto/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/AggregateDataRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/AggregateDataRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/AggregateDataRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/AggregateDataRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/DeleteDataRangeRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/DeleteDataRangeRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/DeleteDataRangeRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/DeleteDataRangeRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/DeleteDataRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/DeleteDataRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/DeleteDataRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/DeleteDataRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/GetChangesRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/GetChangesRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/GetChangesRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/GetChangesRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/GetChangesTokenRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/GetChangesTokenRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/GetChangesTokenRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/GetChangesTokenRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/ReadDataRangeRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/ReadDataRangeRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/ReadDataRangeRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/ReadDataRangeRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/ReadDataRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/ReadDataRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/ReadDataRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/ReadDataRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/RequestContext.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/RequestContext.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/RequestContext.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/RequestContext.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/UpsertDataRequest.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/UpsertDataRequest.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/UpsertDataRequest.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/UpsertDataRequest.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/request/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/request/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/request/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/request/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/AggregateDataResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/AggregateDataResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/AggregateDataResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/AggregateDataResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/GetChangesResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/GetChangesResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/GetChangesResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/GetChangesResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/GetChangesTokenResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/GetChangesTokenResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/GetChangesTokenResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/GetChangesTokenResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/InsertDataResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/InsertDataResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/InsertDataResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/InsertDataResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/ReadDataRangeResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/ReadDataRangeResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/ReadDataRangeResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/ReadDataRangeResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/ReadDataResponse.kt b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/ReadDataResponse.kt
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/ReadDataResponse.kt
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/ReadDataResponse.kt
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/response/package-info.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/response/package-info.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/response/package-info.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/response/package-info.java
diff --git a/health/health-data-client/src/main/java/androidx/health/platform/client/service/HealthDataServiceConstants.java b/health/health-connect-client/src/main/java/androidx/health/platform/client/service/HealthDataServiceConstants.java
similarity index 100%
rename from health/health-data-client/src/main/java/androidx/health/platform/client/service/HealthDataServiceConstants.java
rename to health/health-connect-client/src/main/java/androidx/health/platform/client/service/HealthDataServiceConstants.java
diff --git a/health/health-data-client/src/main/proto/change.proto b/health/health-connect-client/src/main/proto/change.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/change.proto
rename to health/health-connect-client/src/main/proto/change.proto
diff --git a/health/health-data-client/src/main/proto/data.proto b/health/health-connect-client/src/main/proto/data.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/data.proto
rename to health/health-connect-client/src/main/proto/data.proto
diff --git a/health/health-data-client/src/main/proto/error.proto b/health/health-connect-client/src/main/proto/error.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/error.proto
rename to health/health-connect-client/src/main/proto/error.proto
diff --git a/health/health-data-client/src/main/proto/permission.proto b/health/health-connect-client/src/main/proto/permission.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/permission.proto
rename to health/health-connect-client/src/main/proto/permission.proto
diff --git a/health/health-data-client/src/main/proto/request.proto b/health/health-connect-client/src/main/proto/request.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/request.proto
rename to health/health-connect-client/src/main/proto/request.proto
diff --git a/health/health-data-client/src/main/proto/response.proto b/health/health-connect-client/src/main/proto/response.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/response.proto
rename to health/health-connect-client/src/main/proto/response.proto
diff --git a/health/health-data-client/src/main/proto/time.proto b/health/health-connect-client/src/main/proto/time.proto
similarity index 100%
rename from health/health-data-client/src/main/proto/time.proto
rename to health/health-connect-client/src/main/proto/time.proto
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/HealthDataClientTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/HealthConnectClientTest.kt
similarity index 75%
rename from health/health-data-client/src/test/java/androidx/health/data/client/HealthDataClientTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/HealthConnectClientTest.kt
index 201b5ed..ec02294 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/HealthDataClientTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/HealthConnectClientTest.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client
+package androidx.health.connect.client
import android.content.Context
import android.content.pm.ApplicationInfo
@@ -34,7 +34,7 @@
private const val PROVIDER_PACKAGE_NAME = "com.example.fake.provider"
@RunWith(AndroidJUnit4::class)
-class HealthDataClientTest {
+class HealthConnectClientTest {
private lateinit var context: Context
@@ -47,34 +47,37 @@
fun noBackingImplementation_unavailable() {
val packageManager = context.packageManager
Shadows.shadowOf(packageManager).removePackage(PROVIDER_PACKAGE_NAME)
- assertThat(HealthDataClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME))).isFalse()
+ assertThat(HealthConnectClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME)))
+ .isFalse()
assertThrows(IllegalStateException::class.java) {
- HealthDataClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
+ HealthConnectClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
}
}
@Test
fun backingImplementation_notEnabled_unavailable() {
installPackage(context, PROVIDER_PACKAGE_NAME, enabled = false)
- assertThat(HealthDataClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME))).isFalse()
+ assertThat(HealthConnectClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME)))
+ .isFalse()
assertThrows(IllegalStateException::class.java) {
- HealthDataClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
+ HealthConnectClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
}
}
@Test
fun backingImplementation_enabled_isAvailable() {
installPackage(context, PROVIDER_PACKAGE_NAME, enabled = true)
- assertThat(HealthDataClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME))).isTrue()
- HealthDataClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
+ assertThat(HealthConnectClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME))).isTrue()
+ HealthConnectClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
}
@Test
@Config(sdk = [Build.VERSION_CODES.O_MR1])
fun sdkVersionTooOld_unavailable() {
- assertThat(HealthDataClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME))).isFalse()
+ assertThat(HealthConnectClient.isAvailable(context, listOf(PROVIDER_PACKAGE_NAME)))
+ .isFalse()
assertThrows(UnsupportedOperationException::class.java) {
- HealthDataClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
+ HealthConnectClient.getOrCreate(context, listOf(PROVIDER_PACKAGE_NAME))
}
}
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriodTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriodTest.kt
similarity index 97%
rename from health/health-data-client/src/test/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriodTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriodTest.kt
index 94fe449..f658a92 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/aggregate/AggregateDataRowGroupByPeriodTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/aggregate/AggregateDataRowGroupByPeriodTest.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.aggregate
+package androidx.health.connect.client.aggregate
import androidx.test.ext.junit.runners.AndroidJUnit4
import java.lang.IllegalArgumentException
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/HealthConnectClientImplTest.kt
similarity index 91%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/HealthConnectClientImplTest.kt
index fb98adf..c0c5fae 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/HealthDataClientImplTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/HealthConnectClientImplTest.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl
+package androidx.health.connect.client.impl
import android.app.Application
import android.content.ComponentName
@@ -22,30 +22,30 @@
import android.content.pm.ApplicationInfo
import android.content.pm.PackageInfo
import android.os.Looper
-import androidx.health.data.client.HealthDataClient
-import androidx.health.data.client.aggregate.AggregateDataRow
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByPeriod
-import androidx.health.data.client.changes.DeletionChange
-import androidx.health.data.client.changes.UpsertionChange
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.metadata.Device
-import androidx.health.data.client.metadata.Metadata
-import androidx.health.data.client.permission.AccessTypes
-import androidx.health.data.client.permission.Permission
-import androidx.health.data.client.records.ActiveCaloriesBurned
-import androidx.health.data.client.records.Nutrition
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.records.Steps.Companion.STEPS_COUNT_TOTAL
-import androidx.health.data.client.records.Weight
-import androidx.health.data.client.request.AggregateGroupByDurationRequest
-import androidx.health.data.client.request.AggregateGroupByPeriodRequest
-import androidx.health.data.client.request.AggregateRequest
-import androidx.health.data.client.request.ChangesTokenRequest
-import androidx.health.data.client.request.ReadRecordsRequest
-import androidx.health.data.client.response.ReadRecordResponse
-import androidx.health.data.client.response.ReadRecordsResponse
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.HealthConnectClient
+import androidx.health.connect.client.aggregate.AggregateDataRow
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByPeriod
+import androidx.health.connect.client.changes.DeletionChange
+import androidx.health.connect.client.changes.UpsertionChange
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.metadata.Device
+import androidx.health.connect.client.metadata.Metadata
+import androidx.health.connect.client.permission.AccessTypes
+import androidx.health.connect.client.permission.Permission
+import androidx.health.connect.client.records.ActiveCaloriesBurned
+import androidx.health.connect.client.records.Nutrition
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.records.Steps.Companion.STEPS_COUNT_TOTAL
+import androidx.health.connect.client.records.Weight
+import androidx.health.connect.client.request.AggregateGroupByDurationRequest
+import androidx.health.connect.client.request.AggregateGroupByPeriodRequest
+import androidx.health.connect.client.request.AggregateRequest
+import androidx.health.connect.client.request.ChangesTokenRequest
+import androidx.health.connect.client.request.ReadRecordsRequest
+import androidx.health.connect.client.response.ReadRecordResponse
+import androidx.health.connect.client.response.ReadRecordsResponse
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.impl.ServiceBackedHealthDataClient
import androidx.health.platform.client.impl.error.errorCodeExceptionMap
import androidx.health.platform.client.impl.ipc.ClientConfiguration
@@ -86,7 +86,7 @@
private const val PROVIDER_PACKAGE_NAME = "com.google.fake.provider"
private val API_METHOD_LIST =
- listOf<suspend HealthDataClient.() -> Unit>(
+ listOf<suspend HealthConnectClient.() -> Unit>(
{ getGrantedPermissions(setOf()) },
{ insertRecords(listOf()) },
{ updateRecords(listOf()) },
@@ -122,9 +122,9 @@
@Suppress("GoodTime") // Safe to use in test setup
@RunWith(AndroidJUnit4::class)
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
-class HealthDataClientImplTest {
+class HealthConnectClientImplTest {
- private lateinit var healthDataClient: HealthDataClientImpl
+ private lateinit var healthConnectClient: HealthConnectClientImpl
private lateinit var fakeAhpServiceStub: FakeHealthDataService
@Before
@@ -132,8 +132,8 @@
val clientConfig =
ClientConfiguration("FakeAHPProvider", PROVIDER_PACKAGE_NAME, "FakeProvider")
- healthDataClient =
- HealthDataClientImpl(
+ healthConnectClient =
+ HealthConnectClientImpl(
ServiceBackedHealthDataClient(
ApplicationProvider.getApplicationContext(),
clientConfig,
@@ -169,7 +169,7 @@
val responseList = mutableListOf<Deferred<Any>>()
for (method in API_METHOD_LIST) {
responseList.add(
- async { assertFailsWith(error.value) { healthDataClient.method() } }
+ async { assertFailsWith(error.value) { healthConnectClient.method() } }
)
}
advanceUntilIdle()
@@ -183,7 +183,7 @@
@Test
fun getGrantedPermissions_none() = runTest {
val deferred = async {
- healthDataClient.getGrantedPermissions(
+ healthConnectClient.getGrantedPermissions(
setOf(Permission.create<Steps>(AccessTypes.READ))
)
}
@@ -206,7 +206,7 @@
)
)
val deferred = async {
- healthDataClient.getGrantedPermissions(
+ healthConnectClient.getGrantedPermissions(
setOf(Permission.create<Steps>(AccessTypes.READ))
)
}
@@ -222,7 +222,7 @@
fun insertRecords_steps() = runTest {
fakeAhpServiceStub.insertDataResponse = InsertDataResponse(listOf("0"))
val deferred = async {
- healthDataClient.insertRecords(
+ healthConnectClient.insertRecords(
listOf(
Steps(
count = 100,
@@ -255,7 +255,7 @@
fun insertRecords_weight() = runTest {
fakeAhpServiceStub.insertDataResponse = InsertDataResponse(listOf("0"))
val deferred = async {
- healthDataClient.insertRecords(
+ healthConnectClient.insertRecords(
listOf(
Weight(
weightKg = 45.8,
@@ -285,7 +285,7 @@
fun insertRecords_nutrition() = runTest {
fakeAhpServiceStub.insertDataResponse = InsertDataResponse(listOf("0"))
val deferred = async {
- healthDataClient.insertRecords(
+ healthConnectClient.insertRecords(
listOf(
Nutrition(
vitaminEGrams = 10.0,
@@ -335,7 +335,7 @@
.build()
)
val deferred = async {
- healthDataClient.readRecord(
+ healthConnectClient.readRecord(
Steps::class,
uid = "testUid",
)
@@ -392,7 +392,7 @@
.build()
)
val deferred = async {
- healthDataClient.readRecords(
+ healthConnectClient.readRecords(
ReadRecordsRequest(
Steps::class,
timeRangeFilter = TimeRangeFilter.before(endTime = Instant.ofEpochMilli(7890L)),
@@ -435,7 +435,7 @@
@Test
fun deleteRecordsById_steps() = runTest {
val deferred = async {
- healthDataClient.deleteRecords(Steps::class, listOf("myUid"), listOf("myClientId"))
+ healthConnectClient.deleteRecords(Steps::class, listOf("myUid"), listOf("myClientId"))
}
advanceUntilIdle()
@@ -462,7 +462,7 @@
@Test
fun deleteRecordsByRange_steps() = runTest {
val deferred = async {
- healthDataClient.deleteRecords(
+ healthConnectClient.deleteRecords(
Steps::class,
timeRangeFilter = TimeRangeFilter.before(endTime = Instant.ofEpochMilli(7890L)),
)
@@ -484,7 +484,7 @@
@Test
fun updateRecords_steps() = runTest {
val deferred = async {
- healthDataClient.updateRecords(
+ healthConnectClient.updateRecords(
listOf(
Steps(
count = 100,
@@ -531,7 +531,7 @@
val deferred = async {
val startTime = Instant.ofEpochMilli(1234)
val endTime = Instant.ofEpochMilli(4567)
- healthDataClient.aggregate(
+ healthConnectClient.aggregate(
AggregateRequest(
setOf(Steps.STEPS_COUNT_TOTAL),
TimeRangeFilter.between(startTime, endTime)
@@ -595,7 +595,7 @@
val deferred = async {
val startTime = Instant.ofEpochMilli(1234)
val endTime = Instant.ofEpochMilli(4567)
- healthDataClient.aggregateGroupByDuration(
+ healthConnectClient.aggregateGroupByDuration(
AggregateGroupByDurationRequest(
setOf(STEPS_COUNT_TOTAL),
TimeRangeFilter.between(startTime, endTime),
@@ -668,7 +668,7 @@
val deferred = async {
val startTime = LocalDateTime.parse("2022-02-11T20:22:02")
val endTime = LocalDateTime.parse("2022-02-22T20:22:02")
- healthDataClient.aggregateGroupByPeriod(
+ healthConnectClient.aggregateGroupByPeriod(
AggregateGroupByPeriodRequest(
setOf(STEPS_COUNT_TOTAL),
TimeRangeFilter.between(startTime, endTime),
@@ -721,7 +721,7 @@
.build()
)
val deferred = async {
- healthDataClient.getChangesToken(ChangesTokenRequest(setOf(Steps::class)))
+ healthConnectClient.getChangesToken(ChangesTokenRequest(setOf(Steps::class)))
}
advanceUntilIdle()
@@ -762,7 +762,7 @@
.setChangesTokenExpired(false)
.build()
)
- val deferred = async { healthDataClient.getChanges("steps_changes_token") }
+ val deferred = async { healthConnectClient.getChanges("steps_changes_token") }
advanceUntilIdle()
waitForMainLooperIdle()
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
similarity index 95%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
index f1b3512..43ea9ce 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateDataRowConverterTest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.aggregate
+package androidx.health.connect.client.impl.converters.aggregate
-import androidx.health.data.client.aggregate.AggregateDataRow
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByDuration
-import androidx.health.data.client.aggregate.AggregateDataRowGroupByPeriod
-import androidx.health.data.client.metadata.DataOrigin
+import androidx.health.connect.client.aggregate.AggregateDataRow
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByDuration
+import androidx.health.connect.client.aggregate.AggregateDataRowGroupByPeriod
+import androidx.health.connect.client.metadata.DataOrigin
import androidx.health.platform.client.proto.DataProto
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
similarity index 88%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
index 0096887..dac85c1 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/aggregate/AggregateMetricConverterTest.kt
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.aggregate
+package androidx.health.connect.client.impl.converters.aggregate
-import androidx.health.data.client.aggregate.DurationAggregateMetric
-import androidx.health.data.client.records.Distance
-import androidx.health.data.client.records.Steps
+import androidx.health.connect.client.aggregate.DurationAggregateMetric
+import androidx.health.connect.client.records.Distance
+import androidx.health.connect.client.records.Steps
import androidx.health.platform.client.proto.RequestProto
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/AllRecordsConverterTest.kt
similarity index 83%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/AllRecordsConverterTest.kt
index 665c57e..24f4b37 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/AllRecordsConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/AllRecordsConverterTest.kt
@@ -13,73 +13,74 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.metadata.Device
-import androidx.health.data.client.metadata.Metadata
-import androidx.health.data.client.records.ActiveCaloriesBurned
-import androidx.health.data.client.records.ActivityEvent
-import androidx.health.data.client.records.ActivityEventTypes
-import androidx.health.data.client.records.ActivityLap
-import androidx.health.data.client.records.ActivitySession
-import androidx.health.data.client.records.ActivityTypes
-import androidx.health.data.client.records.BasalBodyTemperature
-import androidx.health.data.client.records.BasalMetabolicRate
-import androidx.health.data.client.records.BloodGlucose
-import androidx.health.data.client.records.BloodPressure
-import androidx.health.data.client.records.BodyFat
-import androidx.health.data.client.records.BodyTemperature
-import androidx.health.data.client.records.BodyTemperatureMeasurementLocations
-import androidx.health.data.client.records.BodyWaterMass
-import androidx.health.data.client.records.BoneMass
-import androidx.health.data.client.records.CervicalMucus
-import androidx.health.data.client.records.CervicalMucusAmounts
-import androidx.health.data.client.records.CervicalMucusTextures
-import androidx.health.data.client.records.CervicalPosition
-import androidx.health.data.client.records.CyclingPedalingCadence
-import androidx.health.data.client.records.Distance
-import androidx.health.data.client.records.ElevationGained
-import androidx.health.data.client.records.FloorsClimbed
-import androidx.health.data.client.records.HeartRate
-import androidx.health.data.client.records.HeartRateSeries
-import androidx.health.data.client.records.HeartRateVariabilityDifferentialIndex
-import androidx.health.data.client.records.HeartRateVariabilityRmssd
-import androidx.health.data.client.records.HeartRateVariabilityS
-import androidx.health.data.client.records.HeartRateVariabilitySd2
-import androidx.health.data.client.records.HeartRateVariabilitySdann
-import androidx.health.data.client.records.HeartRateVariabilitySdnn
-import androidx.health.data.client.records.HeartRateVariabilitySdnnIndex
-import androidx.health.data.client.records.HeartRateVariabilitySdsd
-import androidx.health.data.client.records.HeartRateVariabilityTinn
-import androidx.health.data.client.records.Height
-import androidx.health.data.client.records.HipCircumference
-import androidx.health.data.client.records.Hydration
-import androidx.health.data.client.records.LeanBodyMass
-import androidx.health.data.client.records.Menstruation
-import androidx.health.data.client.records.MenstruationFlows
-import androidx.health.data.client.records.Nutrition
-import androidx.health.data.client.records.OvulationTest
-import androidx.health.data.client.records.OvulationTestResults
-import androidx.health.data.client.records.OxygenSaturation
-import androidx.health.data.client.records.Power
-import androidx.health.data.client.records.Repetitions
-import androidx.health.data.client.records.RespiratoryRate
-import androidx.health.data.client.records.RestingHeartRate
-import androidx.health.data.client.records.SexualActivity
-import androidx.health.data.client.records.SleepSession
-import androidx.health.data.client.records.SleepStage
-import androidx.health.data.client.records.SleepStageTypes
-import androidx.health.data.client.records.Speed
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.records.StepsCadence
-import androidx.health.data.client.records.SwimmingStrokes
-import androidx.health.data.client.records.SwimmingTypes
-import androidx.health.data.client.records.TotalCaloriesBurned
-import androidx.health.data.client.records.Vo2Max
-import androidx.health.data.client.records.WaistCircumference
-import androidx.health.data.client.records.Weight
-import androidx.health.data.client.records.WheelchairPushes
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.metadata.Device
+import androidx.health.connect.client.metadata.Metadata
+import androidx.health.connect.client.records.ActiveCaloriesBurned
+import androidx.health.connect.client.records.ActivityEvent
+import androidx.health.connect.client.records.ActivityEventTypes
+import androidx.health.connect.client.records.ActivityLap
+import androidx.health.connect.client.records.ActivitySession
+import androidx.health.connect.client.records.ActivityTypes
+import androidx.health.connect.client.records.BasalBodyTemperature
+import androidx.health.connect.client.records.BasalMetabolicRate
+import androidx.health.connect.client.records.BloodGlucose
+import androidx.health.connect.client.records.BloodPressure
+import androidx.health.connect.client.records.BodyFat
+import androidx.health.connect.client.records.BodyTemperature
+import androidx.health.connect.client.records.BodyTemperatureMeasurementLocations
+import androidx.health.connect.client.records.BodyWaterMass
+import androidx.health.connect.client.records.BoneMass
+import androidx.health.connect.client.records.CervicalMucus
+import androidx.health.connect.client.records.CervicalMucusAmounts
+import androidx.health.connect.client.records.CervicalMucusTextures
+import androidx.health.connect.client.records.CervicalPosition
+import androidx.health.connect.client.records.CyclingPedalingCadence
+import androidx.health.connect.client.records.Distance
+import androidx.health.connect.client.records.ElevationGained
+import androidx.health.connect.client.records.FloorsClimbed
+import androidx.health.connect.client.records.HeartRate
+import androidx.health.connect.client.records.HeartRateSeries
+import androidx.health.connect.client.records.HeartRateVariabilityDifferentialIndex
+import androidx.health.connect.client.records.HeartRateVariabilityRmssd
+import androidx.health.connect.client.records.HeartRateVariabilityS
+import androidx.health.connect.client.records.HeartRateVariabilitySd2
+import androidx.health.connect.client.records.HeartRateVariabilitySdann
+import androidx.health.connect.client.records.HeartRateVariabilitySdnn
+import androidx.health.connect.client.records.HeartRateVariabilitySdnnIndex
+import androidx.health.connect.client.records.HeartRateVariabilitySdsd
+import androidx.health.connect.client.records.HeartRateVariabilityTinn
+import androidx.health.connect.client.records.Height
+import androidx.health.connect.client.records.HipCircumference
+import androidx.health.connect.client.records.Hydration
+import androidx.health.connect.client.records.LeanBodyMass
+import androidx.health.connect.client.records.Menstruation
+import androidx.health.connect.client.records.MenstruationFlows
+import androidx.health.connect.client.records.Nutrition
+import androidx.health.connect.client.records.OvulationTest
+import androidx.health.connect.client.records.OvulationTestResults
+import androidx.health.connect.client.records.OxygenSaturation
+import androidx.health.connect.client.records.Power
+import androidx.health.connect.client.records.Repetitions
+import androidx.health.connect.client.records.RespiratoryRate
+import androidx.health.connect.client.records.RestingHeartRate
+import androidx.health.connect.client.records.SexualActivity
+import androidx.health.connect.client.records.SleepSession
+import androidx.health.connect.client.records.SleepStage
+import androidx.health.connect.client.records.SleepStageTypes
+import androidx.health.connect.client.records.Speed
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.records.StepsCadence
+import androidx.health.connect.client.records.SwimmingStrokes
+import androidx.health.connect.client.records.SwimmingTypes
+import androidx.health.connect.client.records.TotalCaloriesBurned
+import androidx.health.connect.client.records.TotalEnergyBurned
+import androidx.health.connect.client.records.Vo2Max
+import androidx.health.connect.client.records.WaistCircumference
+import androidx.health.connect.client.records.Weight
+import androidx.health.connect.client.records.WheelchairPushes
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import java.time.Instant
@@ -887,6 +888,21 @@
}
@Test
+ fun testTotalEnergyBurned() {
+ val data =
+ TotalEnergyBurned(
+ energyKcal = 1.0,
+ startTime = START_TIME,
+ startZoneOffset = START_ZONE_OFFSET,
+ endTime = END_TIME,
+ endZoneOffset = END_ZONE_OFFSET,
+ metadata = TEST_METADATA
+ )
+
+ assertThat(toRecord(data.toProto())).isEqualTo(data)
+ }
+
+ @Test
fun testWheelchairPushes() {
val data =
WheelchairPushes(
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/RecordsTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/RecordsTest.kt
similarity index 94%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/RecordsTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/RecordsTest.kt
index d4a1f7a..5964919 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/records/RecordsTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/records/RecordsTest.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.records
+package androidx.health.connect.client.impl.converters.records
import androidx.health.platform.client.proto.DataProto
import androidx.test.ext.junit.runners.AndroidJUnit4
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/request/AggregateRequestConverterTest.kt
similarity index 87%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/request/AggregateRequestConverterTest.kt
index 365ede6..c531d57 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/request/AggregateRequestConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/request/AggregateRequestConverterTest.kt
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.request
+package androidx.health.connect.client.impl.converters.request
-import androidx.health.data.client.impl.converters.time.toProto
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.request.AggregateGroupByDurationRequest
-import androidx.health.data.client.request.AggregateGroupByPeriodRequest
-import androidx.health.data.client.request.AggregateRequest
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.impl.converters.time.toProto
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.request.AggregateGroupByDurationRequest
+import androidx.health.connect.client.request.AggregateGroupByPeriodRequest
+import androidx.health.connect.client.request.AggregateRequest
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.RequestProto
import androidx.test.ext.junit.runners.AndroidJUnit4
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/response/ChangesResponseConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/response/ChangesResponseConverterTest.kt
similarity index 90%
rename from health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/response/ChangesResponseConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/response/ChangesResponseConverterTest.kt
index 9ae030b..2919e68 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/impl/converters/response/ChangesResponseConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/impl/converters/response/ChangesResponseConverterTest.kt
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.impl.converters.response
+package androidx.health.connect.client.impl.converters.response
-import androidx.health.data.client.changes.DeletionChange
-import androidx.health.data.client.changes.UpsertionChange
-import androidx.health.data.client.metadata.DataOrigin
-import androidx.health.data.client.metadata.Device
-import androidx.health.data.client.metadata.Metadata
-import androidx.health.data.client.records.Steps
+import androidx.health.connect.client.changes.DeletionChange
+import androidx.health.connect.client.changes.UpsertionChange
+import androidx.health.connect.client.metadata.DataOrigin
+import androidx.health.connect.client.metadata.Device
+import androidx.health.connect.client.metadata.Metadata
+import androidx.health.connect.client.records.Steps
import androidx.health.platform.client.proto.ChangeProto
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.ResponseProto
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/metadata/DeviceTypeTest.java b/health/health-connect-client/src/test/java/androidx/health/connect/client/metadata/DeviceTypeTest.java
similarity index 94%
rename from health/health-data-client/src/test/java/androidx/health/data/client/metadata/DeviceTypeTest.java
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/metadata/DeviceTypeTest.java
index a5d6306..b569ab2 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/metadata/DeviceTypeTest.java
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/metadata/DeviceTypeTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package androidx.health.data.client.metadata;
+package androidx.health.connect.client.metadata;
import static com.google.common.truth.Truth.assertThat;
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/permission/HealthDataRequestPermissionsTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/permission/HealthDataRequestPermissionsTest.kt
similarity index 93%
rename from health/health-data-client/src/test/java/androidx/health/data/client/permission/HealthDataRequestPermissionsTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/permission/HealthDataRequestPermissionsTest.kt
index 254d50d..33b708c 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/permission/HealthDataRequestPermissionsTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/permission/HealthDataRequestPermissionsTest.kt
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.permission
+package androidx.health.connect.client.permission
import android.content.Context
import android.content.Intent
-import androidx.health.data.client.HealthDataClient
-import androidx.health.data.client.records.Steps
+import androidx.health.connect.client.HealthConnectClient
+import androidx.health.connect.client.records.Steps
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.PermissionProto
import androidx.health.platform.client.service.HealthDataServiceConstants
@@ -64,7 +64,7 @@
)
assertThat(intent.action).isEqualTo("androidx.health.ACTION_REQUEST_PERMISSIONS")
- assertThat(intent.`package`).isEqualTo(HealthDataClient.DEFAULT_PROVIDER_PACKAGE_NAME)
+ assertThat(intent.`package`).isEqualTo(HealthConnectClient.DEFAULT_PROVIDER_PACKAGE_NAME)
}
@Test
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/request/ReadRecordsRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/request/ReadRecordsRequestTest.kt
similarity index 95%
rename from health/health-data-client/src/test/java/androidx/health/data/client/request/ReadRecordsRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/request/ReadRecordsRequestTest.kt
index 55fa8cb..2a3bd0c 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/request/ReadRecordsRequestTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/request/ReadRecordsRequestTest.kt
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.request
+package androidx.health.connect.client.request
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.time.TimeRangeFilter
+import androidx.health.connect.client.records.Steps
+import androidx.health.connect.client.time.TimeRangeFilter
import androidx.test.ext.junit.runners.AndroidJUnit4
import java.time.Instant
import org.junit.Assert.assertEquals
diff --git a/health/health-data-client/src/test/java/androidx/health/data/client/time/TimeRangeFilterTest.kt b/health/health-connect-client/src/test/java/androidx/health/connect/client/time/TimeRangeFilterTest.kt
similarity index 98%
rename from health/health-data-client/src/test/java/androidx/health/data/client/time/TimeRangeFilterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/connect/client/time/TimeRangeFilterTest.kt
index 353f050..4b54922 100644
--- a/health/health-data-client/src/test/java/androidx/health/data/client/time/TimeRangeFilterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/connect/client/time/TimeRangeFilterTest.kt
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package androidx.health.data.client.time
+package androidx.health.connect.client.time
import androidx.test.ext.junit.runners.AndroidJUnit4
import java.time.Instant
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/error/ErrorStatusTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/error/ErrorStatusTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/error/ErrorStatusTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/error/ErrorStatusTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClientTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClientTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClientTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/ServiceBackedHealthDataClientTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt
similarity index 90%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt
index 8eb9efd..6900f06 100644
--- a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt
+++ b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/converters/permission/PermissionConverterTest.kt
@@ -15,11 +15,11 @@
*/
package androidx.health.platform.client.impl.converters.permission
-import androidx.health.data.client.impl.converters.permission.toJetpackPermission
-import androidx.health.data.client.impl.converters.permission.toProtoPermission
-import androidx.health.data.client.permission.AccessTypes
-import androidx.health.data.client.permission.Permission
-import androidx.health.data.client.records.Steps
+import androidx.health.connect.client.impl.converters.permission.toJetpackPermission
+import androidx.health.connect.client.impl.converters.permission.toProtoPermission
+import androidx.health.connect.client.permission.AccessTypes
+import androidx.health.connect.client.permission.Permission
+import androidx.health.connect.client.records.Steps
import androidx.health.platform.client.proto.DataProto
import androidx.health.platform.client.proto.PermissionProto
import androidx.test.ext.junit.runners.AndroidJUnit4
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/data/ProtoParcelableTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/data/ProtoParcelableTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/data/ProtoParcelableTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/data/ProtoParcelableTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnectionTest.java b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnectionTest.java
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnectionTest.java
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/ipc/internal/ServiceConnectionTest.java
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManagerTest.java b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManagerTest.java
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManagerTest.java
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/permission/token/PermissionTokenManagerTest.java
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImplTest.java b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImplTest.java
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImplTest.java
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceStubImplTest.java
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceTest.java b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceTest.java
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceTest.java
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/sdkservice/HealthDataSdkServiceTest.java
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/impl/testing/FakeHealthDataService.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/impl/testing/FakeHealthDataService.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/impl/testing/FakeHealthDataService.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/impl/testing/FakeHealthDataService.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/permission/PermissionTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/permission/PermissionTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/permission/PermissionTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/permission/PermissionTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/DeleteDataRangeRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/DeleteDataRangeRequestTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/DeleteDataRangeRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/DeleteDataRangeRequestTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/DeleteDataRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/DeleteDataRequestTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/DeleteDataRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/DeleteDataRequestTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/ReadDataRangeRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/ReadDataRangeRequestTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/ReadDataRangeRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/ReadDataRangeRequestTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/ReadDataRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/ReadDataRequestTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/ReadDataRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/ReadDataRequestTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/RequestContextTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/RequestContextTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/RequestContextTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/RequestContextTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/request/UpsertDataRequestTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/request/UpsertDataRequestTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/request/UpsertDataRequestTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/request/UpsertDataRequestTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/response/InsertDataResponseTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/response/InsertDataResponseTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/response/InsertDataResponseTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/response/InsertDataResponseTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/response/ReadDataRangeResponseTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/response/ReadDataRangeResponseTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/response/ReadDataRangeResponseTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/response/ReadDataRangeResponseTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/response/ReadDataResponseTest.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/response/ReadDataResponseTest.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/response/ReadDataResponseTest.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/response/ReadDataResponseTest.kt
diff --git a/health/health-data-client/src/test/java/androidx/health/platform/client/testing/TestConstants.kt b/health/health-connect-client/src/test/java/androidx/health/platform/client/testing/TestConstants.kt
similarity index 100%
rename from health/health-data-client/src/test/java/androidx/health/platform/client/testing/TestConstants.kt
rename to health/health-connect-client/src/test/java/androidx/health/platform/client/testing/TestConstants.kt
diff --git a/health/health-data-client/api/public_plus_experimental_current.txt b/health/health-data-client/api/public_plus_experimental_current.txt
deleted file mode 100644
index d8d0caf..0000000
--- a/health/health-data-client/api/public_plus_experimental_current.txt
+++ /dev/null
@@ -1,374 +0,0 @@
-// Signature format: 4.0
-package androidx.health.data.client {
-
- public interface HealthDataClient {
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, java.util.List<java.lang.String> uidsList, java.util.List<java.lang.String> clientIdsList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? deleteRecords(kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record> recordType, androidx.health.data.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation<? super kotlin.Unit>);
- method public suspend Object? getChanges(String changesToken, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.ChangesResponse>);
- method public suspend Object? getChangesToken(androidx.health.data.client.request.ChangesTokenRequest request, kotlin.coroutines.Continuation<? super java.lang.String>);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public default static androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public suspend Object? insertRecords(java.util.List<? extends androidx.health.data.client.records.Record> records, kotlin.coroutines.Continuation<? super androidx.health.data.client.response.InsertRecordsResponse>);
- method public default static boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public default static boolean isAvailable(android.content.Context context);
- field public static final androidx.health.data.client.HealthDataClient.Companion Companion;
- }
-
- public static final class HealthDataClient.Companion {
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public androidx.health.data.client.HealthDataClient getOrCreate(android.content.Context context);
- method public boolean isAvailable(android.content.Context context, optional java.util.List<java.lang.String> packageNames);
- method public boolean isAvailable(android.content.Context context);
- }
-
-}
-
-package androidx.health.data.client.changes {
-
- public interface Change {
- }
-
- public final class DeletionChange implements androidx.health.data.client.changes.Change {
- method public String getDeletedUid();
- property public final String deletedUid;
- }
-
- public final class UpsertionChange implements androidx.health.data.client.changes.Change {
- method public androidx.health.data.client.records.Record getRecord();
- property public final androidx.health.data.client.records.Record record;
- }
-
-}
-
-package androidx.health.data.client.metadata {
-
- public final class DataOrigin {
- ctor public DataOrigin(String packageName);
- method public String getPackageName();
- property public final String packageName;
- }
-
- public final class Device {
- ctor public Device(optional String? identifier, optional String? manufacturer, optional String? model, optional String? type);
- method public String? getIdentifier();
- method public String? getManufacturer();
- method public String? getModel();
- method public String? getType();
- property public final String? identifier;
- property public final String? manufacturer;
- property public final String? model;
- property public final String? type;
- }
-
- public final class DeviceTypes {
- field public static final String CHEST_STRAP = "CHEST_STRAP";
- field public static final String FITNESS_BAND = "FITNESS_BAND";
- field public static final String HEAD_MOUNTED = "HEAD_MOUNTED";
- field public static final androidx.health.data.client.metadata.DeviceTypes INSTANCE;
- field public static final String PHONE = "PHONE";
- field public static final String RING = "RING";
- field public static final String SCALE = "SCALE";
- field public static final String SMART_DISPLAY = "SMART_DISPLAY";
- field public static final String UNKNOWN = "UNKNOWN";
- field public static final String WATCH = "WATCH";
- }
-
- public final class Metadata {
- ctor public Metadata(optional String? uid, optional androidx.health.data.client.metadata.DataOrigin dataOrigin, optional java.time.Instant lastModifiedTime, optional String? clientId, optional long clientVersion, optional androidx.health.data.client.metadata.Device? device);
- method public String? getClientId();
- method public long getClientVersion();
- method public androidx.health.data.client.metadata.DataOrigin getDataOrigin();
- method public androidx.health.data.client.metadata.Device? getDevice();
- method public java.time.Instant getLastModifiedTime();
- method public String? getUid();
- property public final String? clientId;
- property public final long clientVersion;
- property public final androidx.health.data.client.metadata.DataOrigin dataOrigin;
- property public final androidx.health.data.client.metadata.Device? device;
- property public final java.time.Instant lastModifiedTime;
- property public final String? uid;
- }
-
-}
-
-package androidx.health.data.client.records {
-
- public final class ActivityTypes {
- field public static final String BACK_EXTENSION = "back_extension";
- field public static final String BADMINTON = "badminton";
- field public static final String BARBELL_SHOULDER_PRESS = "barbell_shoulder_press";
- field public static final String BASEBALL = "baseball";
- field public static final String BASKETBALL = "basketball";
- field public static final String BENCH_PRESS = "bench_press";
- field public static final String BENCH_SIT_UP = "bench_sit_up";
- field public static final String BIKING = "biking";
- field public static final String BIKING_STATIONARY = "biking_stationary";
- field public static final String BOOT_CAMP = "boot_camp";
- field public static final String BOXING = "boxing";
- field public static final String BURPEE = "burpee";
- field public static final String CALISTHENICS = "calisthenics";
- field public static final String CRICKET = "cricket";
- field public static final String CRUNCH = "crunch";
- field public static final String DANCING = "dancing";
- field public static final String DEADLIFT = "deadlift";
- field public static final String DUMBBELL_CURL_LEFT_ARM = "dumbbell_curl_left_arm";
- field public static final String DUMBBELL_CURL_RIGHT_ARM = "dumbbell_curl_right_arm";
- field public static final String DUMBBELL_FRONT_RAISE = "dumbbell_front_raise";
- field public static final String DUMBBELL_LATERAL_RAISE = "dumbbell_lateral_raise";
- field public static final String DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM = "dumbbell_triceps_extension_left_arm";
- field public static final String DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM = "dumbbell_triceps_extension_right_arm";
- field public static final String DUMBBELL_TRICEPS_EXTENSION_TWO_ARM = "dumbbell_triceps_extension_two_arm";
- field public static final String ELLIPTICAL = "elliptical";
- field public static final String EXERCISE_CLASS = "exercise_class";
- field public static final String FENCING = "fencing";
- field public static final String FOOTBALL_AMERICAN = "football_american";
- field public static final String FOOTBALL_AUSTRALIAN = "football_australian";
- field public static final String FORWARD_TWIST = "forward_twist";
- field public static final String FRISBEE_DISC = "frisbee_disc";
- field public static final String GOLF = "golf";
- field public static final String GUIDED_BREATHING = "guided_breathing";
- field public static final String GYMNASTICS = "gymnastics";
- field public static final String HANDBALL = "handball";
- field public static final String HIGH_INTENSITY_INTERVAL_TRAINING = "high_intensity_interval_training";
- field public static final String HIKING = "hiking";
- field public static final String ICE_HOCKEY = "ice_hockey";
- field public static final String ICE_SKATING = "ice_skating";
- field public static final androidx.health.data.client.records.ActivityTypes INSTANCE;
- field public static final String JUMPING_JACK = "jumping_jack";
- field public static final String JUMP_ROPE = "jump_rope";
- field public static final String LAT_PULL_DOWN = "lat_pull_down";
- field public static final String LUNGE = "lunge";
- field public static final String MARTIAL_ARTS = "martial_arts";
- field public static final String MEDITATION = "meditation";
- field public static final String PADDLING = "paddling";
- field public static final String PARA_GLIDING = "para_gliding";
- field public static final String PILATES = "pilates";
- field public static final String PLANK = "plank";
- field public static final String RACQUETBALL = "racquetball";
- field public static final String ROCK_CLIMBING = "rock_climbing";
- field public static final String ROLLER_HOCKEY = "roller_hockey";
- field public static final String ROWING = "rowing";
- field public static final String ROWING_MACHINE = "rowing_machine";
- field public static final String RUGBY = "rugby";
- field public static final String RUNNING = "running";
- field public static final String RUNNING_TREADMILL = "running_treadmill";
- field public static final String SAILING = "sailing";
- field public static final String SCUBA_DIVING = "scuba_diving";
- field public static final String SKATING = "skating";
- field public static final String SKIING = "skiing";
- field public static final String SNOWBOARDING = "snowboarding";
- field public static final String SNOWSHOEING = "snowshoeing";
- field public static final String SOCCER = "soccer";
- field public static final String SOFTBALL = "softball";
- field public static final String SQUASH = "squash";
- field public static final String SQUAT = "squat";
- field public static final String STAIR_CLIMBING = "stair_climbing";
- field public static final String STAIR_CLIMBING_MACHINE = "stair_climbing_machine";
- field public static final String STRENGTH_TRAINING = "strength_training";
- field public static final String STRETCHING = "stretching";
- field public static final String SURFING = "surfing";
- field public static final String SWIMMING_OPEN_WATER = "swimming_open_water";
- field public static final String SWIMMING_POOL = "swimming_pool";
- field public static final String TABLE_TENNIS = "table_tennis";
- field public static final String TENNIS = "tennis";
- field public static final String UPPER_TWIST = "upper_twist";
- field public static final String VOLLEYBALL = "volleyball";
- field public static final String WALKING = "walking";
- field public static final String WATER_POLO = "water_polo";
- field public static final String WEIGHTLIFTING = "weightlifting";
- field public static final String WORKOUT = "workout";
- field public static final String YOGA = "yoga";
- }
-
- public final class BloodPressureMeasurementLocations {
- field public static final androidx.health.data.client.records.BloodPressureMeasurementLocations INSTANCE;
- field public static final String LEFT_UPPER_ARM = "left_upper_arm";
- field public static final String LEFT_WRIST = "left_wrist";
- field public static final String RIGHT_UPPER_ARM = "right_upper_arm";
- field public static final String RIGHT_WRIST = "right_wrist";
- }
-
- public final class BodyPositions {
- field public static final androidx.health.data.client.records.BodyPositions INSTANCE;
- field public static final String LYING_DOWN = "lying_down";
- field public static final String RECLINING = "reclining";
- field public static final String SITTING_DOWN = "sitting_down";
- field public static final String STANDING_UP = "standing_up";
- }
-
- public final class BodyTemperature implements androidx.health.data.client.records.Record {
- ctor public BodyTemperature(double temperatureDegreesCelsius, optional String? measurementLocation, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public String? getMeasurementLocation();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public double getTemperatureDegreesCelsius();
- method public java.time.Instant getTime();
- method public java.time.ZoneOffset? getZoneOffset();
- property public final String? measurementLocation;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public final double temperatureDegreesCelsius;
- property public java.time.Instant time;
- property public java.time.ZoneOffset? zoneOffset;
- }
-
- public final class BodyTemperatureMeasurementLocations {
- field public static final String ARMPIT = "armpit";
- field public static final String EAR = "ear";
- field public static final String FINGER = "finger";
- field public static final String FOREHEAD = "forehead";
- field public static final androidx.health.data.client.records.BodyTemperatureMeasurementLocations INSTANCE;
- field public static final String MOUTH = "mouth";
- field public static final String RECTUM = "rectum";
- field public static final String TEMPORAL_ARTERY = "temporal_artery";
- field public static final String TOE = "toe";
- field public static final String VAGINA = "vagina";
- field public static final String WRIST = "wrist";
- }
-
- public final class Distance implements androidx.health.data.client.records.Record {
- ctor public Distance(double distanceMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public double getDistanceMeters();
- method public java.time.Instant getEndTime();
- method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getStartTime();
- method public java.time.ZoneOffset? getStartZoneOffset();
- property public final double distanceMeters;
- property public java.time.Instant endTime;
- property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant startTime;
- property public java.time.ZoneOffset? startZoneOffset;
- }
-
- public final class ElevationGained implements androidx.health.data.client.records.Record {
- ctor public ElevationGained(double elevationMeters, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public double getElevationMeters();
- method public java.time.Instant getEndTime();
- method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getStartTime();
- method public java.time.ZoneOffset? getStartZoneOffset();
- property public final double elevationMeters;
- property public java.time.Instant endTime;
- property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant startTime;
- property public java.time.ZoneOffset? startZoneOffset;
- }
-
- public final class Height implements androidx.health.data.client.records.Record {
- ctor public Height(double heightMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public double getHeightMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getTime();
- method public java.time.ZoneOffset? getZoneOffset();
- property public final double heightMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant time;
- property public java.time.ZoneOffset? zoneOffset;
- }
-
- public final class HipCircumference implements androidx.health.data.client.records.Record {
- ctor public HipCircumference(double circumferenceMeters, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public double getCircumferenceMeters();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getTime();
- method public java.time.ZoneOffset? getZoneOffset();
- property public final double circumferenceMeters;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant time;
- property public java.time.ZoneOffset? zoneOffset;
- }
-
- public final class OvulationTestResults {
- field public static final androidx.health.data.client.records.OvulationTestResults INSTANCE;
- field public static final String NEGATIVE = "negative";
- field public static final String POSITIVE = "positive";
- }
-
- public interface Record {
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- property public abstract androidx.health.data.client.metadata.Metadata metadata;
- }
-
- public final class Steps implements androidx.health.data.client.records.Record {
- ctor public Steps(long count, java.time.Instant startTime, java.time.ZoneOffset? startZoneOffset, java.time.Instant endTime, java.time.ZoneOffset? endZoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public long getCount();
- method public java.time.Instant getEndTime();
- method public java.time.ZoneOffset? getEndZoneOffset();
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getStartTime();
- method public java.time.ZoneOffset? getStartZoneOffset();
- property public final long count;
- property public java.time.Instant endTime;
- property public java.time.ZoneOffset? endZoneOffset;
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant startTime;
- property public java.time.ZoneOffset? startZoneOffset;
- }
-
- public final class Weight implements androidx.health.data.client.records.Record {
- ctor public Weight(double weightKg, java.time.Instant time, java.time.ZoneOffset? zoneOffset, optional androidx.health.data.client.metadata.Metadata metadata);
- method public androidx.health.data.client.metadata.Metadata getMetadata();
- method public java.time.Instant getTime();
- method public double getWeightKg();
- method public java.time.ZoneOffset? getZoneOffset();
- property public androidx.health.data.client.metadata.Metadata metadata;
- property public java.time.Instant time;
- property public final double weightKg;
- property public java.time.ZoneOffset? zoneOffset;
- }
-
-}
-
-package androidx.health.data.client.request {
-
- public final class ChangesTokenRequest {
- ctor public ChangesTokenRequest(java.util.Set<? extends kotlin.reflect.KClass<? extends androidx.health.data.client.records.Record>> recordTypes, optional java.util.Set<androidx.health.data.client.metadata.DataOrigin> dataOriginFilters);
- }
-
-}
-
-package androidx.health.data.client.response {
-
- public final class ChangesResponse {
- method public java.util.List<androidx.health.data.client.changes.Change> getChanges();
- method public boolean getChangesTokenExpired();
- method public boolean getHasMore();
- method public String getNextChangesToken();
- property public final java.util.List<androidx.health.data.client.changes.Change> changes;
- property public final boolean changesTokenExpired;
- property public final boolean hasMore;
- property public final String nextChangesToken;
- }
-
- public final class InsertRecordsResponse {
- method public java.util.List<java.lang.String> getRecordUidsList();
- property public final java.util.List<java.lang.String> recordUidsList;
- }
-
-}
-
-package androidx.health.data.client.time {
-
- public final class TimeRangeFilter {
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public static androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
- field public static final androidx.health.data.client.time.TimeRangeFilter.Companion Companion;
- }
-
- public static final class TimeRangeFilter.Companion {
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.Instant startTime);
- method public androidx.health.data.client.time.TimeRangeFilter after(java.time.LocalDateTime startTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter before(java.time.LocalDateTime endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.Instant startTime, java.time.Instant endTime);
- method public androidx.health.data.client.time.TimeRangeFilter between(java.time.LocalDateTime startTime, java.time.LocalDateTime endTime);
- }
-
-}
-
diff --git a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/RecordsTypeNameMap.kt b/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/RecordsTypeNameMap.kt
deleted file mode 100644
index 29f46ee..0000000
--- a/health/health-data-client/src/main/java/androidx/health/data/client/impl/converters/datatype/RecordsTypeNameMap.kt
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package androidx.health.data.client.impl.converters.datatype
-
-import androidx.health.data.client.records.ActiveCaloriesBurned
-import androidx.health.data.client.records.ActivityEvent
-import androidx.health.data.client.records.ActivityLap
-import androidx.health.data.client.records.ActivitySession
-import androidx.health.data.client.records.BasalBodyTemperature
-import androidx.health.data.client.records.BasalMetabolicRate
-import androidx.health.data.client.records.BloodGlucose
-import androidx.health.data.client.records.BloodPressure
-import androidx.health.data.client.records.BodyFat
-import androidx.health.data.client.records.BodyTemperature
-import androidx.health.data.client.records.BodyWaterMass
-import androidx.health.data.client.records.BoneMass
-import androidx.health.data.client.records.CervicalMucus
-import androidx.health.data.client.records.CervicalPosition
-import androidx.health.data.client.records.CyclingPedalingCadence
-import androidx.health.data.client.records.Distance
-import androidx.health.data.client.records.ElevationGained
-import androidx.health.data.client.records.FloorsClimbed
-import androidx.health.data.client.records.HeartRateSeries
-import androidx.health.data.client.records.HeartRateVariabilityDifferentialIndex
-import androidx.health.data.client.records.HeartRateVariabilityRmssd
-import androidx.health.data.client.records.HeartRateVariabilityS
-import androidx.health.data.client.records.HeartRateVariabilitySd2
-import androidx.health.data.client.records.HeartRateVariabilitySdann
-import androidx.health.data.client.records.HeartRateVariabilitySdnn
-import androidx.health.data.client.records.HeartRateVariabilitySdnnIndex
-import androidx.health.data.client.records.HeartRateVariabilitySdsd
-import androidx.health.data.client.records.HeartRateVariabilityTinn
-import androidx.health.data.client.records.Height
-import androidx.health.data.client.records.HipCircumference
-import androidx.health.data.client.records.Hydration
-import androidx.health.data.client.records.LeanBodyMass
-import androidx.health.data.client.records.Menstruation
-import androidx.health.data.client.records.Nutrition
-import androidx.health.data.client.records.OvulationTest
-import androidx.health.data.client.records.OxygenSaturation
-import androidx.health.data.client.records.Power
-import androidx.health.data.client.records.Record
-import androidx.health.data.client.records.Repetitions
-import androidx.health.data.client.records.RespiratoryRate
-import androidx.health.data.client.records.RestingHeartRate
-import androidx.health.data.client.records.SexualActivity
-import androidx.health.data.client.records.SleepSession
-import androidx.health.data.client.records.SleepStage
-import androidx.health.data.client.records.Speed
-import androidx.health.data.client.records.Steps
-import androidx.health.data.client.records.StepsCadence
-import androidx.health.data.client.records.SwimmingStrokes
-import androidx.health.data.client.records.TotalCaloriesBurned
-import androidx.health.data.client.records.Vo2Max
-import androidx.health.data.client.records.WaistCircumference
-import androidx.health.data.client.records.Weight
-import androidx.health.data.client.records.WheelchairPushes
-import kotlin.reflect.KClass
-
-private val ALL_RECORDS_TYPES =
- setOf(
- ActiveCaloriesBurned::class,
- ActivityEvent::class,
- ActivityLap::class,
- ActivitySession::class,
- BasalBodyTemperature::class,
- BasalMetabolicRate::class,
- BloodGlucose::class,
- BloodPressure::class,
- BodyFat::class,
- BodyTemperature::class,
- BodyWaterMass::class,
- BoneMass::class,
- CervicalMucus::class,
- CervicalPosition::class,
- CyclingPedalingCadence::class,
- Distance::class,
- ElevationGained::class,
- FloorsClimbed::class,
- HeartRateSeries::class,
- HeartRateVariabilityDifferentialIndex::class,
- HeartRateVariabilityRmssd::class,
- HeartRateVariabilityS::class,
- HeartRateVariabilitySd2::class,
- HeartRateVariabilitySdann::class,
- HeartRateVariabilitySdnn::class,
- HeartRateVariabilitySdnnIndex::class,
- HeartRateVariabilitySdsd::class,
- HeartRateVariabilityTinn::class,
- Height::class,
- HipCircumference::class,
- Hydration::class,
- LeanBodyMass::class,
- Menstruation::class,
- Nutrition::class,
- OvulationTest::class,
- OxygenSaturation::class,
- Power::class,
- Repetitions::class,
- RespiratoryRate::class,
- RestingHeartRate::class,
- SexualActivity::class,
- SleepSession::class,
- SleepStage::class,
- Speed::class,
- Steps::class,
- StepsCadence::class,
- SwimmingStrokes::class,
- TotalCaloriesBurned::class,
- Vo2Max::class,
- WaistCircumference::class,
- WheelchairPushes::class,
- Weight::class,
- )
-
-val RECORDS_TYPE_NAME_MAP: Map<String, KClass<out Record>> =
- ALL_RECORDS_TYPES.associateBy { it.simpleName!! }
diff --git a/libraryversions.toml b/libraryversions.toml
index f3baa01..ce6b059 100644
--- a/libraryversions.toml
+++ b/libraryversions.toml
@@ -51,7 +51,7 @@
GLANCE = "1.0.0-alpha04"
GLANCE_TEMPLATE = "1.0.0-alpha01"
GRIDLAYOUT = "1.1.0-alpha01"
-HEALTH_DATA_CLIENT = "1.0.0-alpha01"
+HEALTH_CONNECT_CLIENT = "1.0.0-alpha01"
HEALTH_SERVICES_CLIENT = "1.0.0-alpha04"
HEIFWRITER = "1.1.0-alpha02"
HILT = "1.1.0-alpha01"
diff --git a/settings.gradle b/settings.gradle
index a45a684..b2e9804 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -567,7 +567,7 @@
includeProject(":glance:glance-wear-tiles:integration-tests:demos", [BuildType.MAIN, BuildType.GLANCE])
includeProject(":glance:glance-wear-tiles", [BuildType.MAIN, BuildType.GLANCE])
includeProject(":gridlayout:gridlayout", [BuildType.MAIN])
-includeProject(":health:health-data-client", [BuildType.MAIN])
+includeProject(":health:health-connect-client", [BuildType.MAIN])
includeProject(":health:health-services-client", [BuildType.MAIN])
includeProject(":heifwriter:heifwriter", [BuildType.MAIN])
includeProject(":hilt:hilt-common", [BuildType.MAIN])