diff --git a/core/java/android/service/controls/Control.java b/core/java/android/service/controls/Control.java index 2d1d0ede62ca5..0cffe7180923a 100644 --- a/core/java/android/service/controls/Control.java +++ b/core/java/android/service/controls/Control.java @@ -394,6 +394,11 @@ public final class Control implements Parcelable { return this; } + /** + * @param deviceType the device type for the {@link Control}. Setting an invalid value not + * in {@link DeviceTypes} will set it to {@link DeviceTypes#TYPE_UNKNOWN}. + * @return {@code this} + */ @NonNull public StatelessBuilder setDeviceType(@DeviceTypes.DeviceType int deviceType) { if (!DeviceTypes.validDeviceType(deviceType)) { @@ -416,6 +421,10 @@ public final class Control implements Parcelable { return this; } + /** + * @param subtitle the user facing subtitle for the {@link Control} + * @return {@code this} + */ @NonNull public StatelessBuilder setSubtitle(@NonNull CharSequence subtitle) { Preconditions.checkNotNull(subtitle); @@ -423,12 +432,22 @@ public final class Control implements Parcelable { return this; } + /** + * @param structure the user facing name of the structure for the {@link Control}. + * {@code null} indicates that it's not associated with any structure. + * @return {@code this} + */ @NonNull public StatelessBuilder setStructure(@Nullable CharSequence structure) { mStructure = structure; return this; } + /** + * @param zone the user facing name of the zone for the {@link Control}. {@code null} + * indicates that it's not associated with any zone. + * @return {@code this} + */ @NonNull public StatelessBuilder setZone(@Nullable CharSequence zone) { mZone = zone; @@ -446,12 +465,20 @@ public final class Control implements Parcelable { return this; } + /** + * @param customIcon an {@link Icon} to override the one determined by the device type. + * @return {@code this} + */ @NonNull public StatelessBuilder setCustomIcon(@Nullable Icon customIcon) { mCustomIcon = customIcon; return this; } + /** + * @param customColor a list of colors to override the ones determined by the device type. + * @return {@code this} + */ @NonNull public StatelessBuilder setCustomColor(@Nullable ColorStateList customColor) { mCustomColor = customColor; @@ -459,7 +486,7 @@ public final class Control implements Parcelable { } /** - * Build a {@link Control} + * Build a stateless {@link Control} * @return a valid {@link Control} */ @NonNull @@ -482,7 +509,7 @@ public final class Control implements Parcelable { /** * Builder class for {@link Control}. * - * This class facilitates the creation of {@link Control}. + * This class facilitates the creation of {@link Control} with an associated state. * It provides the following defaults for non-optional parameters: *