droiddoc change: revise the sample code generating script so that
all the source code pages are NOT generated for the offline version
of the docs (only show source in html for online docs).

This won't work until a companion change from framwork/base/Android.mk
is submitted (but shouldn't break the build).

Change-Id: I06c404540870071c2a5a8aa460e156506fd975cb
diff --git a/tools/droiddoc/templates/sampleindex.cs b/tools/droiddoc/templates/sampleindex.cs
index 6e57cfd..9842384 100644
--- a/tools/droiddoc/templates/sampleindex.cs
+++ b/tools/droiddoc/templates/sampleindex.cs
@@ -20,23 +20,39 @@
 
 <?cs var:summary ?>
 
-<?cs if:subcount(subdirs) ?>
-    <h2>Subdirectories</h2>
-    <ul class="nolist">
-    <?cs each:dir=subdirs ?>
-      <li><a href="<?cs var:dir.name ?>/index.html"><?cs var:dir.name ?>/</a></li>
-    <?cs /each ?>
-    </ul>
-<?cs /if ?>
+<?cs if:android.whichdoc == "online" ?><?cs
+  # If this is the online docs, build the src code navigation links ?>
 
-<?cs if:subcount(files) ?>
-    <h2>Files</h2>
-    <ul class="nolist">
-    <?cs each:file=files ?>
-      <li><a href="<?cs var:file.href ?>"><?cs var:file.name ?></a></li>
-    <?cs /each ?>
-    </ul>
-<?cs /if ?>
+  <?cs if:subcount(subdirs) ?>
+      <h2>Subdirectories</h2>
+      <ul class="nolist">
+      <?cs each:dir=subdirs ?>
+        <li><a href="<?cs var:dir.name ?>/index.html"><?cs
+          var:dir.name ?>/</a></li>
+      <?cs /each ?>
+      </ul>
+  <?cs /if ?>
+
+  <?cs if:subcount(files) ?>
+      <h2>Files</h2>
+      <ul class="nolist">
+      <?cs each:file=files ?>
+        <li><a href="<?cs var:file.href ?>"><?cs
+          var:file.name ?></a></li>
+      <?cs /each ?>
+      </ul>
+  <?cs /if ?>
+
+<?cs else ?><?cs
+  # else, this means it's offline docs,
+          so don't show src links (we don't have the pages!) ?>
+
+<p>You can find the source code for this sample in your SDK at:</p>
+<p style="margin-left:2em">
+<code><em>&lt;sdk&gt;</em>/platforms/android-<em>&lt;version&gt;</em>/samples/</code>
+</p>
+
+<?cs /if ?><?cs # end if/else online docs ?>
 
 <?cs include:"footer.cs" ?>
 </div><!-- end jd-content -->