diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-12 02:19:57 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-12 02:19:57 +0000 |
commit | 39c9daa7c8881dc223d86fce817a307d4fd3878e (patch) | |
tree | cbe121963c9474e365219b8b3aa27934de0e0714 | |
parent | e9bf852d879ee1858186f6cbdc2744ab4162af63 (diff) | |
parent | f6ac7fb4eb38f49b18c8464834daa75f94a54210 (diff) | |
download | android_onboarding-android14-qpr2-s3-release.tar.gz |
Snap for 11206181 from f6ac7fb4eb38f49b18c8464834daa75f94a54210 to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android-14.0.0_r28android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: I3ede793cf72909269c502002acaaec761a50f6ab
4 files changed, 68 insertions, 0 deletions
diff --git a/src/com/android/onboarding/versions/annotations/BreakingReason.kt b/src/com/android/onboarding/versions/annotations/BreakingReason.kt new file mode 100644 index 0000000..6f6cbaa --- /dev/null +++ b/src/com/android/onboarding/versions/annotations/BreakingReason.kt @@ -0,0 +1,8 @@ +package com.android.onboarding.versions.annotations + +/** Reasons that a change may break existing callers. */ +enum class BreakingReason { + + /** The change introduces a new return value to an existing API. */ + NEW_RETURN_VALUE +} diff --git a/src/com/android/onboarding/versions/annotations/ChangeId.kt b/src/com/android/onboarding/versions/annotations/ChangeId.kt new file mode 100644 index 0000000..b114197 --- /dev/null +++ b/src/com/android/onboarding/versions/annotations/ChangeId.kt @@ -0,0 +1,29 @@ +package com.android.onboarding.versions.annotations + +/** + * Marker for a change made to an Onboarding component. + * + * All changes in Onboarding must be marked by a [ChangeId] and fully flagged. + * + * The value should be the ID of a Buganizer issue related to the change. + * + * @param owner A username who is responsible for this change + * @param breaking Reasons that this change will cause breakages in current callers. Empty if none. + * @param changeRadius The radius of impact of this change. See [ChangeRadius] docs for details. + * @param dependsOn Another Change ID that must be enabled for this change to work. [DEFAULT] for + * none. + * @param expedited A reason that this change may skip the usual rollout process. + * [ExpeditedReason.NOT_EXPEDITED] if none. + */ +@Target(AnnotationTarget.FIELD) +annotation class ChangeId( + val owner: String, + val breaking: Array<BreakingReason>, + val changeRadius: ChangeRadius, + val dependsOn: Long = DEFAULT, + val expedited: ExpeditedReason = ExpeditedReason.NOT_EXPEDITED +) { + companion object { + private const val DEFAULT = -1L + } +} diff --git a/src/com/android/onboarding/versions/annotations/ChangeRadius.kt b/src/com/android/onboarding/versions/annotations/ChangeRadius.kt new file mode 100644 index 0000000..19ffe79 --- /dev/null +++ b/src/com/android/onboarding/versions/annotations/ChangeRadius.kt @@ -0,0 +1,21 @@ +package com.android.onboarding.versions.annotations + +/** The radius of effect of a given change. */ +enum class ChangeRadius { + /** + * The change only applies to a single component at a time. + * + * For example, a change to functionality which shows a loading screen in the current process + * might be SINGLE_COMPONENT - as long as it doesn't make calls to other components. + */ + SINGLE_COMPONENT, + + /** + * The change involves multiple components. + * + * For example, any change to an API which one component exposes to another (via activity starts, + * broadcasts, services, etc.) is intrinsically MULTI_COMPONENT. + */ + // Multi-component changes are not currently supported + // MULTI_COMPONENT +} diff --git a/src/com/android/onboarding/versions/annotations/ExpeditedReason.kt b/src/com/android/onboarding/versions/annotations/ExpeditedReason.kt new file mode 100644 index 0000000..2e9169b --- /dev/null +++ b/src/com/android/onboarding/versions/annotations/ExpeditedReason.kt @@ -0,0 +1,10 @@ +package com.android.onboarding.versions.annotations + +/** The reason why this change can follow the expedited release process. */ +enum class ExpeditedReason { + /** The change will not follow the expedited release process. */ + NOT_EXPEDITED, + + /** DO NOT USE - only available for use by tests until we have a real non-NOT_EXPEDITED reason. */ + TMP +} |