Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c521e266 authored by Dirk Dougherty's avatar Dirk Dougherty Committed by The Android Open Source Project
Browse files

AI 148186: Add support for using custom pdk templates. The make rule for pdk...

AI 148186: Add support for using custom pdk templates. The make rule for pdk docs should set LOCAL_DROIDDOC_OPTIONS += -hdf android.whichdoc online-pdk
  BUG=1646802

Automated import of CL 148186
parent 12741f56
Loading
Loading
Loading
Loading
+23 −16
Original line number Diff line number Diff line
@@ -116,6 +116,16 @@ public class DocFile

        hdf.setValue("commentText", commentText);

        // write the page using the appropriate root template, based on the 
        // whichdoc value supplied by build
        String fromWhichmodule = hdf.getValue("android.whichmodule", "");
        if (fromWhichmodule.equals("online-pdk")) {
            //leaving this in just for temporary compatibility with pdk doc
            hdf.setValue("online-pdk", "true");
            // add any conditional login for root template here (such as 
            // for custom left nav based on tab etc. 
            ClearPage.write(hdf, "docpage.cs", outfile);
        } else {
            if (outfile.indexOf("sdk/") != -1) {
                hdf.setValue("sdk", "true");
                if (outfile.indexOf("index.html") != -1) {
@@ -126,12 +136,9 @@ public class DocFile
            } else if (outfile.indexOf("guide/") != -1) {
                hdf.setValue("guide", "true");
                ClearPage.write(hdf, "docpage.cs", outfile);
        } else if (outfile.indexOf("publish/") != -1){
            hdf.setValue("publish", "true");
            ClearPage.write(hdf, "docpage.cs", outfile);
            } else {
                ClearPage.write(hdf, "nosidenavpage.cs", outfile);
            }
        }

    } //writePage
}