Merge "Prevent droiddoc from printing running time."
am: 932d50a32c

Change-Id: If2e44787e264e81c37874733075a896c9ef3607b
diff --git a/res/assets/templates-sdk/body_tag.cs b/res/assets/templates-sdk/body_tag.cs
index 1649ffa..335eec5 100644
--- a/res/assets/templates-sdk/body_tag.cs
+++ b/res/assets/templates-sdk/body_tag.cs
@@ -1,17 +1 @@
-<body class="gc-documentation <?cs
-  if:(reference.gms || reference.gcm)
-    ?>google<?cs
-  /if ?><?cs
-  if:(guide||develop||training||reference||tools||sdk)
-    ?>develop<?cs
-    if:reference
-      ?> reference api apilevel-<?cs var:class.since ?><?cs var:package.since ?><?cs
-    /if ?><?cs
-  elif:design
-    ?>design<?cs
-  elif:distribute
-    ?>distribute<?cs
-  /if ?>"><?cs
-if:dac && !page.not-api
-  ?><div id="doc-api-level" class="<?cs var:class.since ?><?cs var:package.since ?>" style="display:none"></div><?cs
-/if ?>
+<body>
diff --git a/res/assets/templates-sdk/class.cs b/res/assets/templates-sdk/class.cs
index d014edd..9b5a370 100644
--- a/res/assets/templates-sdk/class.cs
+++ b/res/assets/templates-sdk/class.cs
@@ -13,10 +13,9 @@
 ?><?cs def:write_method_summary(methods, included) ?>
 <?cs set:count = #1 ?>
 <?cs each:method = methods ?>
-  <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-  <tr class="api apilevel-<?cs var:method.since ?>"<?cs
-      if:method.since ?>
-      data-version-added="<?cs var:method.since ?>"<?cs
+  <tr <?cs
+      if:method.since
+        ?>data-version-added="<?cs var:method.since ?>"<?cs
       /if ?><?cs
       if:method.deprecatedsince
         ?> data-version-deprecated="<?cs var:method.deprecatedsince ?>"<?cs
@@ -51,9 +50,9 @@
 ?><?cs def:write_field_summary(fields, included) ?>
 <?cs set:count = #1 ?>
 <?cs each:field=fields ?>
-  <tr class="api apilevel-<?cs var:field.since ?>"<?cs
-      if:field.since ?>
-      data-version-added="<?cs var:field.since ?>"<?cs
+  <tr <?cs
+      if:field.since
+        ?>data-version-added="<?cs var:field.since ?>"<?cs
       /if ?><?cs
       if:field.deprecatedsince
         ?> data-version-deprecated="<?cs var:field.deprecatedsince ?>"<?cs
@@ -78,9 +77,9 @@
 ?><?cs def:write_constant_summary(fields, included) ?>
 <?cs set:count = #1 ?>
     <?cs each:field=fields ?>
-    <tr class="api apilevel-<?cs var:field.since ?>"<?cs
-        if:field.since ?>
-        data-version-added="<?cs var:field.since ?>"<?cs
+    <tr <?cs
+        if:field.since
+          ?>data-version-added="<?cs var:field.since ?>"<?cs
         /if ?><?cs
         if:field.deprecatedsince
           ?> data-version-deprecated="<?cs var:field.deprecatedsince ?>"<?cs
@@ -101,9 +100,9 @@
 ?><?cs def:write_attr_summary(attrs, included) ?>
 <?cs set:count = #1 ?>
     <?cs each:attr=attrs ?>
-    <tr class="api apilevel-<?cs var:attr.since ?>"<?cs
-        if:attr.since ?>
-        data-version-added="<?cs var:attr.since ?>"<?cs
+    <tr <?cs
+        if:attr.since
+          ?>data-version-added="<?cs var:attr.since ?>"<?cs
         /if ?><?cs
         if:attr.deprecatedsince
           ?> data-version-deprecated="<?cs var:attr.deprecatedsince ?>"<?cs
@@ -124,9 +123,9 @@
 ?><?cs def:write_inners_summary(classes) ?>
 <?cs set:count = #1 ?>
   <?cs each:cl=class.inners ?>
-    <tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-        if:cl.since ?>
-        data-version-added="<?cs var:cl.since ?>"<?cs
+    <tr <?cs
+        if:cl.since
+          ?>data-version-added="<?cs var:cl.since ?>"<?cs
         /if ?><?cs
         if:cl.deprecatedsince
           ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
@@ -157,18 +156,14 @@
 ?>
 <?cs def:write_field_details(fields) ?>
 <?cs each:field=fields ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:field.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="api apilevel-<?cs var:field.since ?>"<?cs
-     if:field.since ?>
-     data-version-added="<?cs var:field.since ?>"<?cs
+<div <?cs
+     if:field.since
+       ?>data-version-added="<?cs var:field.since ?>"<?cs
      /if ?><?cs
      if:field.deprecatedsince
        ?> data-version-deprecated="<?cs var:field.deprecatedsince ?>"<?cs
      /if ?> >
-    <h3 class="api-name"><?cs var:field.name ?></h3>
+    <h3 class="api-name" id="<?cs var:field.anchor ?>"><?cs var:field.name ?></h3>
     <div class="api-level">
       <?cs call:since_tags(field) ?>
       <?cs call:federated_refs(field) ?>
@@ -196,17 +191,14 @@
 
 <?cs def:write_method_details(methods) ?>
 <?cs each:method=methods ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:method.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="api apilevel-<?cs var:method.since ?>"<?cs
-     if:method.since ?>
-     data-version-added="<?cs var:method.since ?>"<?cs
+<div <?cs
+     if:method.since
+       ?>data-version-added="<?cs var:method.since ?>"<?cs
      /if ?><?cs
      if:method.deprecatedsince
        ?> data-version-deprecated="<?cs var:method.deprecatedsince ?>"<?cs
      /if ?>>
-    <h3 class="api-name"><?cs var:method.name ?></h3>
+    <h3 class="api-name" id="<?cs var:method.anchor ?>"><?cs var:method.name ?></h3>
     <div class="api-level">
       <div><?cs call:since_tags(method) ?></div>
       <?cs call:federated_refs(method) ?>
@@ -226,9 +218,7 @@
 
 <?cs def:write_attr_details(attrs) ?>
 <?cs each:attr=attrs ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:attr.anchor ?>"></A>
-<h3 class="api-name"><?cs var:attr.name ?></h3>
+<h3 class="api-name" id="<?cs var:attr.anchor ?>"><?cs var:attr.name ?></h3>
 <?cs call:show_annotations_list(attr) ?>
 <?cs call:description(attr) ?>
 <?cs if:subcount(attr.methods) ?>
@@ -267,9 +257,9 @@
 <?cs # Includes api-info-block DIV at top of page. Standard Devsite uses right nav. ?>
 <?cs if:dac ?><?cs include:"page_info.cs" ?><?cs /if ?>
 <?cs # This DIV spans the entire document to provide scope for some scripts ?>
-<div class="api apilevel-<?cs var:class.since ?>" id="jd-content"<?cs
-     if:class.since ?>
-     data-version-added="<?cs var:class.since ?>"<?cs
+<div id="jd-content" <?cs
+     if:class.since
+       ?>data-version-added="<?cs var:class.since ?>"<?cs
      /if ?><?cs
      if:class.deprecatedsince
        ?> data-version-deprecated="<?cs var:class.deprecatedsince ?>"<?cs
@@ -423,9 +413,9 @@
 <tr><th><h3>Inherited XML attributes</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.attrs) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-    if:cl.since ?>
-    data-version-added="<?cs var:cl.since ?>"<?cs
+<tr <?cs
+    if:cl.since
+      ?>data-version-added="<?cs var:cl.since ?>"<?cs
     /if ?><?cs
     if:cl.deprecatedsince
       ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
@@ -452,9 +442,9 @@
   <tr><th colspan="2"><h3>Enum values</h3></th></tr>
 <?cs set:count = #1 ?>
   <?cs each:field=class.enumConstants ?>
-  <tr class="api apilevel-<?cs var:field.since ?>"<?cs
-      if:field.since ?>
-      data-version-added="<?cs var:field.since ?>"<?cs
+  <tr <?cs
+      if:field.since
+        ?>data-version-added="<?cs var:field.since ?>"<?cs
       /if ?><?cs
       if:field.deprecatedsince
         ?> data-version-deprecated="<?cs var:field.deprecatedsince ?>"<?cs
@@ -487,9 +477,9 @@
 <tr><th><h3>Inherited constants</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.constants) ?>
-  <tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-      if:cl.since ?>
-      data-version-added="<?cs var:cl.since ?>"<?cs
+  <tr <?cs
+      if:cl.since
+        ?>data-version-added="<?cs var:cl.since ?>"<?cs
       /if ?><?cs
       if:cl.deprecatedsince
         ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
@@ -526,9 +516,9 @@
 <tr><th><h3>Inherited fields</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.fields) ?>
-  <tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-      if:cl.since ?>
-      data-version-added="<?cs var:cl.since ?>"<?cs
+  <tr <?cs
+      if:cl.since
+        ?>data-version-added="<?cs var:cl.since ?>"<?cs
       /if ?><?cs
       if:cl.deprecatedsince
         ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
@@ -592,9 +582,9 @@
 <tr><th><h3>Inherited methods</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.methods) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-    if:cl.since ?>
-    data-version-added="<?cs var:cl.since ?>"<?cs
+<tr <?cs
+    if:cl.since
+      ?>data-version-added="<?cs var:cl.since ?>"<?cs
     /if ?><?cs
     if:cl.deprecatedsince
       ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
diff --git a/res/assets/templates-sdk/classes.cs b/res/assets/templates-sdk/classes.cs
index bc6b98d..f10eb71 100644
--- a/res/assets/templates-sdk/classes.cs
+++ b/res/assets/templates-sdk/classes.cs
@@ -11,22 +11,15 @@
 <p>These are the API classes. See all
 <a href="packages.html">API packages</a>.</p>
 
-<div class="jd-letterlist"><?cs
-  each:letter=docs.classes ?>
-    <a href="#letter_<?cs name:letter ?>"><?cs
-      name:letter ?></a>&nbsp;&nbsp;<?cs
-  /each?>
-</div>
-
 <?cs each:letter=docs.classes ?>
 <?cs set:count = #1 ?>
 <h2 id="letter_<?cs name:letter ?>"><?cs name:letter ?></h2>
 <table>
     <?cs set:cur_row = #0 ?>
     <?cs each:cl = letter ?>
-        <tr class="api apilevel-<?cs var:cl.since ?>"<?cs
-            if:cl.since ?>
-            data-version-added="<?cs var:cl.since ?>"<?cs
+        <tr <?cs
+            if:cl.since
+              ?>data-version-added="<?cs var:cl.since ?>"<?cs
             /if ?><?cs
             if:cl.deprecatedsince
               ?> data-version-deprecated="<?cs var:cl.deprecatedsince ?>"<?cs
diff --git a/res/assets/templates-sdk/head_tag.cs b/res/assets/templates-sdk/head_tag.cs
index bb698b9..374218b 100644
--- a/res/assets/templates-sdk/head_tag.cs
+++ b/res/assets/templates-sdk/head_tag.cs
@@ -20,8 +20,7 @@
     if:library.root ?>
       {% setvar book_path %}/reference/<?cs var:library.root ?>/_book.yaml{% endsetvar %}<?cs
     /if ?>
-    {% include "_shared/_reference-head-tags.html" %}
-    <meta name="body_class" value="api apilevel-<?cs var:class.since ?><?cs var:package.since ?>" /><?cs
+    {% include "_shared/_reference-head-tags.html" %}<?cs
   else ?><?cs # If NOT dac... ?>
     <meta name="hide_page_heading" value="true" />
     <meta name="book_path" value="<?cs
diff --git a/res/assets/templates-sdk/macros_override.cs b/res/assets/templates-sdk/macros_override.cs
index b475798..8ef81cf 100644
--- a/res/assets/templates-sdk/macros_override.cs
+++ b/res/assets/templates-sdk/macros_override.cs
@@ -23,9 +23,9 @@
   <?cs set:count = #1 ?>
   <table class="jd-sumtable-expando">
     <?cs each:cl=classes ?>
-      <tr class="api apilevel-<?cs var:cl.type.since ?>"<?cs
-          if:cl.type.since ?>
-          data-version-added="<?cs var:cl.type.since ?>"<?cs
+      <tr <?cs
+          if:cl.type.since
+            ?>data-version-added="<?cs var:cl.type.since ?>"<?cs
           /if ?><?cs
           if:cl.type.deprecatedsince
             ?> data-version-deprecated="<?cs var:cl.type.deprecatedsince ?>"<?cs
diff --git a/res/assets/templates-sdk/package.cs b/res/assets/templates-sdk/package.cs
index ab66449..7595e40 100644
--- a/res/assets/templates-sdk/package.cs
+++ b/res/assets/templates-sdk/package.cs
@@ -15,9 +15,9 @@
 <?cs include:"header.cs" ?>
 <?cs # Includes api-info-block DIV at top of page. Standard Devsite uses right nav. ?>
 <?cs if:dac ?><?cs include:"page_info.cs" ?><?cs /if ?>
-<div class="api apilevel-<?cs var:package.since ?>" id="jd-content"<?cs
-     if:package.since ?>
-     data-version-added="<?cs var:package.since ?>"<?cs
+<div id="jd-content" <?cs
+     if:package.since
+       ?>data-version-added="<?cs var:package.since ?>"<?cs
      /if ?><?cs
      if:package.deprecatedsince
        ?> data-version-deprecated="<?cs var:package.deprecatedsince ?>"<?cs
diff --git a/res/assets/templates-sdk/packages.cs b/res/assets/templates-sdk/packages.cs
index 3fcfb81..caf8fba 100644
--- a/res/assets/templates-sdk/packages.cs
+++ b/res/assets/templates-sdk/packages.cs
@@ -13,7 +13,13 @@
 <?cs set:count = #1 ?>
 <table>
 <?cs each:pkg = docs.packages ?>
-    <tr class="api apilevel-<?cs var:pkg.since ?>" >
+    <tr <?cs
+        if:pkg.since
+          ?>data-version-added="<?cs var:pkg.since ?>"<?cs
+        /if ?><?cs
+        if:pkg.deprecatedsince
+          ?> data-version-deprecated="<?cs var:pkg.deprecatedsince ?>"<?cs
+        /if ?> >
         <td class="jd-linkcol"><?cs call:package_link(pkg) ?></td>
         <td class="jd-descrcol" width="100%"><?cs call:tag_list(pkg.shortDescr) ?></td>
     </tr>
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index 6590b51..13a884f 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -393,7 +393,13 @@
   set:count = #1 ?>
   <table class="jd-sumtable-expando"><?cs
       each:cl=classes ?>
-        <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.type.since ?>" >
+        <tr <?cs
+            if:cl.type.since
+              ?>data-version-added="<?cs var:cl.type.since ?>"<?cs
+            /if ?><?cs
+            if:cl.type.deprecatedsince
+              ?> data-version-deprecated="<?cs var:cl.type.deprecatedsince ?>"<?cs
+            /if ?> >
               <td><?cs call:type_link(cl.type) ?></td>
               <td width="100%"><?cs call:short_descr(cl) ?>&nbsp;</td>
           </tr><?cs set:count = count + #1 ?><?cs
@@ -407,7 +413,7 @@
     <li><h2 class="hide-from-toc"><?cs var:label ?></h2>
       <ul><?cs
       each:cl=classes ?>
-        <li class="api apilevel-<?cs var:cl.type.since ?>"><?cs call:type_link2(cl.type,"true") ?></li><?cs
+        <li><?cs call:type_link2(cl.type,"true") ?></li><?cs
       /each ?>
       </ul>
     </li><?cs
@@ -420,7 +426,7 @@
     <li><h2 class="hide-from-toc"><?cs var:label ?></h2>
       <ul><?cs
       each:cl=classes ?>
-          <li class="<?cs if:class.name == cl.label?>selected <?cs /if ?>api apilevel-<?cs var:cl.since ?>"><?cs call:type_link2(cl,"true") ?></li><?cs
+          <li<?cs if:class.name == cl.label?> class="selected"<?cs /if ?>><?cs call:type_link2(cl,"true") ?></li><?cs
       /each ?>
       </ul>
     </li><?cs
@@ -430,7 +436,7 @@
 # A list of links to packages, for use in the side navigation of packages (panel nav) ?><?cs
 def:package_link_list(packages) ?><?cs
   each:pkg=packages ?>
-    <li class="<?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?>selected <?cs /if ?>api apilevel-<?cs var:pkg.since ?>"><?cs call:package_link(pkg) ?></li><?cs
+    <li<?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?> class="selected"<?cs /if ?>><?cs call:package_link(pkg) ?></li><?cs
   /each ?><?cs
 /def ?>
 
diff --git a/src/com/google/doclava/MemberInfo.java b/src/com/google/doclava/MemberInfo.java
index 797b1b9..2854ab5 100644
--- a/src/com/google/doclava/MemberInfo.java
+++ b/src/com/google/doclava/MemberInfo.java
@@ -59,7 +59,7 @@
 
   public String anchor() {
     if (mSignature != null) {
-      return mName + mSignature;
+      return mName + mSignature.replace(" ", "%20");
     } else {
       return mName;
     }