if there's no api level available for deprecated version, provide different message
Change-Id: I7268d2bc7cdbcfb08cafd5249f9b6c51e42c4bc2
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index bc6e46d..867abcd 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -101,23 +101,31 @@
<?cs # Show the short-form description of something. These come from shortDescr and deprecated ?><?cs
def:short_descr(obj) ?><?cs
- if:subcount(obj.deprecated) ?>
- <em>This <?cs var:obj.kind ?> was deprecated
- in API level <?cs var:obj.deprecatedsince ?>.
- <?cs call:tag_list(obj.deprecated) ?></em><?cs
+ if:subcount(obj.deprecated) ?><em><?cs
+ if:obj.deprecatedsince ?>
+ This <?cs var:obj.kind ?> was deprecated
+ in API level <?cs var:obj.deprecatedsince ?>.<?cs
+ else ?>
+ This <?cs var:obj.kind ?> is deprecated.<?cs
+ /if ?>
+ <?cs call:tag_list(obj.deprecated) ?></em><?cs
else ?><?cs call:tag_list(obj.shortDescr) ?><?cs
/if ?><?cs
/def ?>
<?cs # Show the red box with the deprecated warning ?><?cs
-def:deprecated_warning(obj) ?><?cs
+def:deprecated_warning(obj) ?><?cs
if:subcount(obj.deprecated) ?><p>
- <p class="caution">
- <strong>This <?cs var:obj.kind ?> was deprecated
- in API level <?cs var:obj.deprecatedsince ?></strong>.<br/> <?cs
- call:tag_list(obj.deprecated) ?>
- </p><?cs
- /if ?><?cs
+ <p class="caution"><strong><?cs
+ if:obj.deprecatedsince ?>
+ This <?cs var:obj.kind ?> was deprecated
+ in API level <?cs var:obj.deprecatedsince ?>.<?cs
+ else ?>
+ This <?cs var:obj.kind ?> is deprecated.<?cs
+ /if ?></strong><br/>
+ <?cs call:tag_list(obj.deprecated) ?>
+ </p><?cs
+ /if ?><?cs
/def ?>
<?cs # print the See Also: section ?><?cs