Fix content intents for rows without end items
They were being ignored
Test: click on row without end items
Change-Id: I4c23950cd8c7ded20018ff79131cdcf627d260de
diff --git a/slices/view/src/main/java/androidx/app/slice/widget/RowView.java b/slices/view/src/main/java/androidx/app/slice/widget/RowView.java
index 417c069..491d40d 100644
--- a/slices/view/src/main/java/androidx/app/slice/widget/RowView.java
+++ b/slices/view/src/main/java/androidx/app/slice/widget/RowView.java
@@ -184,7 +184,9 @@
mRowAction = mRowContent.getContentIntent();
ArrayList<SliceItem> endItems = mRowContent.getEndItems();
+ boolean hasRowAction = mRowAction != null;
if (endItems.isEmpty()) {
+ if (hasRowAction) setViewClickable(this, true);
return;
}
@@ -216,7 +218,6 @@
}
}
- boolean hasRowAction = mRowAction != null;
boolean hasEndItemAction = FORMAT_ACTION.contentEquals(desiredFormat);
// If there is a row action and the first end item is a default toggle, show the divider.
mDivider.setVisibility(hasRowAction && firstItemIsADefaultToggle