Add support for multiple html directories to droiddoc.

The goal for adding this support is to allow droiddoc to pull html
files both from the static content and from content generated at
build time.

Change-Id: I5d4b2432aa78b0b3559daacedfb7a29675701f33
diff --git a/tools/droiddoc/src/ClearPage.java b/tools/droiddoc/src/ClearPage.java
index 184c8b8..016ca93 100644
--- a/tools/droiddoc/src/ClearPage.java
+++ b/tools/droiddoc/src/ClearPage.java
@@ -23,6 +23,7 @@
 import java.io.OutputStreamWriter;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.List;
 
 public class ClearPage
 {
@@ -43,7 +44,7 @@
     private static boolean mTemplateDirSet = false;
 
     public static String outputDir = "docs";
-    public static String htmlDir = null;
+    public static List<String> htmlDirs = new ArrayList<String>();
     public static String toroot = null;
 
     public static void addTemplateDir(String dir)
@@ -76,7 +77,7 @@
 
     public static void write(HDF data, String templ, String filename, boolean fullPath)
     {
-        if (htmlDir != null) {
+        if (!htmlDirs.isEmpty()) {
             data.setValue("hasindex", "true");
         }
 
@@ -103,9 +104,11 @@
         }
 
         int i=0;
-        if (htmlDir != null) {
-            data.setValue("hdf.loadpaths." + i, htmlDir);
-            i++;
+        if (!htmlDirs.isEmpty()) {
+            for (String dir : htmlDirs) {
+                data.setValue("hdf.loadpaths." + i, dir);
+                i++;
+            }
         }
         if (mTemplateDirSet) {
             for (String dir: mTemplateDirs) {