Merge "Add better explanation for MissingGetter suppress warning" into androidx-main
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Button.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Button.java
index e2ff6c7..440e987 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Button.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Button.java
@@ -181,8 +181,10 @@
* ButtonColors} and with the given size. This icon should be image with chosen alpha
* channel and not an actual image.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setIconContent(@NonNull String resourceId, @NonNull DpProp size) {
resetContent();
this.mIcon = resourceId;
@@ -198,8 +200,10 @@
* icon will be tinted to the given content color from {@link ButtonColors}. This icon
* should be image with chosen alpha channel and not an actual image.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setIconContent(@NonNull String resourceId) {
resetContent();
this.mIcon = resourceId;
@@ -216,8 +220,10 @@
* respectively). Any previously added content will be overridden. Text should contain no
* more than 3 characters, otherwise it will overflow from the edges.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setTextContent(
@NonNull String text, @NonNull DeviceParameters deviceParameters) {
resetContent();
@@ -235,8 +241,10 @@
* customizing the colors of the button. Any previously added content will be overridden.
* Text should contain no more than 3 characters, otherwise it will overflow from the edges.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setTextContent(@NonNull String text, @NonNull FontStyle font) {
resetContent();
this.mText = text;
@@ -252,8 +260,10 @@
* will be tinted to the given content color from {@link ButtonColors}. This icon should be
* image with chosen alpha channel and not an actual image.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setImageContent(@NonNull String resourceId) {
resetContent();
this.mImage = resourceId;
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Chip.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Chip.java
index 6108c03..0391a36 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Chip.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/Chip.java
@@ -187,9 +187,9 @@
* content will be overridden. Primary text can be on 1 or 2 lines, depending on the length.
*/
// There are multiple methods to set different type of content, but there is general getter
- // getContent that will return LayoutElement set by any of it. b/217197259
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setPrimaryTextContent(@NonNull String primaryText) {
this.mPrimaryText = primaryText;
this.mLabelText = null;
@@ -213,8 +213,10 @@
* Any previously added content will be overridden. Primary text can be shown on 1 line
* only.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setPrimaryTextLabelContent(
@NonNull String primaryText, @NonNull String label) {
this.mPrimaryText = primaryText;
@@ -229,8 +231,10 @@
* tinted to the given content color from {@link ChipColors}. This icon should be image with
* chosen alpha channel and not an actual image.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setPrimaryTextIconContent(
@NonNull String primaryText, @NonNull String resourceId) {
this.mPrimaryText = primaryText;
@@ -246,8 +250,10 @@
* content color from {@link ChipColors}. This icon should be image with chosen alpha
* channel and not an actual image. Primary text can be shown on 1 line only.
*/
+ // There are multiple methods to set different type of content, but there is general getter
+ // getContent that will return LayoutElement set by any of them. b/217197259
@NonNull
- @SuppressWarnings("MissingGetterMatchingBuilder") // There's getContent() method.
+ @SuppressWarnings("MissingGetterMatchingBuilder")
public Builder setPrimaryTextLabelIconContent(
@NonNull String primaryText, @NonNull String label, @NonNull String resourceId) {
this.mPrimaryText = primaryText;
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java
index bee4533..f7ddb6d 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/MultiSlotLayout.java
@@ -56,7 +56,7 @@
* same value, with the {@link LayoutDefaults#MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH} space
* between.
*/
-// TODO(b/215323986)
+// TODO(b/215323986): Link visuals.
public class MultiSlotLayout implements LayoutElement {
@NonNull private final PrimaryLayout mElement;
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java
index f5edb8e..58c2652 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/PrimaryLayout.java
@@ -53,7 +53,7 @@
* (compact) chip at the bottom with the given content in a center and the recommended margin and
* padding applied.
*/
-// TODO(b/215323986)
+// TODO(b/215323986): Link visuals.
public class PrimaryLayout implements LayoutElement {
@NonNull private final LayoutElement mElement;
diff --git a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/ProgressIndicatorLayout.java b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/ProgressIndicatorLayout.java
index b30b7b8..0497de9 100644
--- a/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/ProgressIndicatorLayout.java
+++ b/wear/tiles/tiles-material/src/main/java/androidx/wear/tiles/material/layouts/ProgressIndicatorLayout.java
@@ -46,7 +46,7 @@
* indicator around the edges of the screen and the given content inside of it and the recommended
* margin and padding applied.
*/
-// TODO(b/215323986)
+// TODO(b/215323986): Link visuals.
public class ProgressIndicatorLayout implements LayoutElement {
@NonNull private final LayoutElement mElement;