Remove old ENDING states
Similar to aosp/2166302 which did this for ENDED states, this is marking
the old ENDING states as internal, since they are no longer needed by
the developer and they can use ENDING instead.
They are being kept in the code for our backwards compat layer,
converting old states to the new ENDING state + reason.
Relnote: Remove deprecated ENDING states; use ENDING instead
Test: ./gradlew :health:health-services-client:test
Bug: 251087906
Change-Id: I01c585c3f443fd1ada02a96c82bda596b7e3acc0
diff --git a/health/health-services-client/api/1.0.0-beta01.txt b/health/health-services-client/api/1.0.0-beta01.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/1.0.0-beta01.txt
+++ b/health/health-services-client/api/1.0.0-beta01.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/api/current.txt b/health/health-services-client/api/current.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/current.txt
+++ b/health/health-services-client/api/current.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/api/public_plus_experimental_1.0.0-beta01.txt b/health/health-services-client/api/public_plus_experimental_1.0.0-beta01.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/public_plus_experimental_1.0.0-beta01.txt
+++ b/health/health-services-client/api/public_plus_experimental_1.0.0-beta01.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/api/public_plus_experimental_current.txt b/health/health-services-client/api/public_plus_experimental_current.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/public_plus_experimental_current.txt
+++ b/health/health-services-client/api/public_plus_experimental_current.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/api/restricted_1.0.0-beta01.txt b/health/health-services-client/api/restricted_1.0.0-beta01.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/restricted_1.0.0-beta01.txt
+++ b/health/health-services-client/api/restricted_1.0.0-beta01.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/api/restricted_current.txt b/health/health-services-client/api/restricted_current.txt
index 0eb1f5c..db5d56b 100644
--- a/health/health-services-client/api/restricted_current.txt
+++ b/health/health-services-client/api/restricted_current.txt
@@ -405,8 +405,6 @@
property public final boolean isResuming;
property public final String name;
field public static final androidx.health.services.client.data.ExerciseState ACTIVE;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING;
- field public static final androidx.health.services.client.data.ExerciseState AUTO_ENDING_PERMISSION_LOST;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState AUTO_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState AUTO_RESUMING;
@@ -414,8 +412,6 @@
field public static final androidx.health.services.client.data.ExerciseState ENDED;
field public static final androidx.health.services.client.data.ExerciseState ENDING;
field public static final androidx.health.services.client.data.ExerciseState PREPARING;
- field public static final androidx.health.services.client.data.ExerciseState TERMINATING;
- field public static final androidx.health.services.client.data.ExerciseState USER_ENDING;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSED;
field public static final androidx.health.services.client.data.ExerciseState USER_PAUSING;
field public static final androidx.health.services.client.data.ExerciseState USER_RESUMING;
diff --git a/health/health-services-client/src/main/java/androidx/health/services/client/data/ExerciseState.kt b/health/health-services-client/src/main/java/androidx/health/services/client/data/ExerciseState.kt
index 29999ed..ef7649f 100644
--- a/health/health-services-client/src/main/java/androidx/health/services/client/data/ExerciseState.kt
+++ b/health/health-services-client/src/main/java/androidx/health/services/client/data/ExerciseState.kt
@@ -152,7 +152,7 @@
* Used only in the manually started exercise.
*/
@JvmField
- public val USER_ENDING: ExerciseState = ExerciseState(9, "USER_ENDING")
+ internal val USER_ENDING: ExerciseState = ExerciseState(9, "USER_ENDING")
/**
* The exercise has been ended by the user. No new metrics will be exported and a final
@@ -170,7 +170,7 @@
* Used only in the manually started exercise.
*/
@JvmField
- public val AUTO_ENDING: ExerciseState = ExerciseState(11, "AUTO_ENDING")
+ internal val AUTO_ENDING: ExerciseState = ExerciseState(11, "AUTO_ENDING")
/**
* The exercise has been automatically ended due to a lack of exercise updates being
@@ -187,7 +187,7 @@
* data for the exercise.
*/
@JvmField
- public val AUTO_ENDING_PERMISSION_LOST: ExerciseState =
+ internal val AUTO_ENDING_PERMISSION_LOST: ExerciseState =
ExerciseState(16, "AUTO_ENDING_PERMISSION_LOST")
/**
@@ -205,7 +205,7 @@
* Used in both of the manually started exercise and the automatic exercise detection.
*/
@JvmField
- public val TERMINATING: ExerciseState = ExerciseState(13, "TERMINATING")
+ internal val TERMINATING: ExerciseState = ExerciseState(13, "TERMINATING")
/**
* The exercise has been ended because it was superseded by a new exercise being started by