Set title in remote views if present in bundle

- Title set if defined in the Bundle returned by summaryUri's content
provider.
- summaryUri invoked inline with onBindView call

bug: 62713030
Test: Manually tested, verified that title and summary are retrieved
when settings app is resumed
Change-Id: Id82531eec5ec11ec3492f033fb34ec65a5437a48
This commit is contained in:
Ajay Nadathur
2017-08-31 11:37:32 -07:00
parent 781d2c4a5a
commit d1c3084bd5
3 changed files with 38 additions and 0 deletions

View File

@@ -460,6 +460,17 @@ public class DashboardData {
// Only check title and summary for dashboard tile
return TextUtils.equals(localTile.title, targetTile.title)
&& TextUtils.equals(localTile.summary, targetTile.summary);
case TYPE_SUGGESTION_CONDITION_CONTAINER:
// If entity is suggestion and contains remote view, force refresh
final List entities = (List) entity;
if (!entities.isEmpty()) {
Object firstEntity = entities.get(0);
if (firstEntity instanceof Tile
&& ((Tile) firstEntity).remoteViews != null) {
return false;
}
}
// Otherwise Fall through to default
default:
return entity == null ? targetItem.entity == null
: entity.equals(targetItem.entity);