AI 146546: am: CL 146204 am: CL 146203 New .jd files, modified Pdk.mk to fix doxygen </div> bug on line 25 of *-source.html files, removed extraneous SDK examples.
  Original author: mritter
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146546
diff --git a/pdk/Pdk.mk b/pdk/Pdk.mk
index fbe8b5c..584eccf 100644
--- a/pdk/Pdk.mk
+++ b/pdk/Pdk.mk
@@ -16,7 +16,6 @@
 
 # Assemble the Platform Development Kit (PDK)
 # (TODO) Figure out why $(ACP) builds with target ndk but not pdk_docs
-# (TODO) Build doxygen (depend on latest version)  -> line 25 </div> error
 
 pdk:
 	@echo "Package: $@ has targets ndk, pdk_docs and pdk_all"
@@ -66,10 +65,8 @@
 pdk_doxy_docsfiles_dir := $(pdk_docs_intermediates)/docsfiles
 
 # Doxygen version to use, so we can override it on the command line
-# doxygen 1.4.6 working, the latest version get-apt installable on goobuntu.
-# (TODO) doxygen 1.5.6 generated source files not displayable
-# doxygen_version='~pubengdocs/shared/doxy/doxygen.1.5.6.kcc'
-#   for latest version of doxygen on linux
+# doxygen 1.5.6 working, the latest version get-apt installable on ghardy.
+# with bug fix for </div> error.
 doxygen_version = doxygen
 
 #------------------------------------------------------------------------------- 
@@ -142,29 +139,12 @@
 	@echo "PDK: $@"
 	$(copy-file-to-target-with-cp)
 
-# Copy appengine server files
-$(pdk_docs_intermediates)/app.yaml: $(pdk_hosting_dir)/app.yaml
-	@echo "PDK: $@"
-	$(copy-file-to-target-with-cp)
-
-$(pdk_docs_intermediates)/pdk.py: $(pdk_hosting_dir)/pdk.py
-	@echo "PDK: $@"
-	$(copy-file-to-target-with-cp)
-
-# Copy appengine server files for new system
-$(OUT_DOCS)/app.yaml: $(pdk_hosting_dir)/app.yaml
-	@echo "PDK: $@"
-	$(copy-file-to-target-with-cp)
-
-$(OUT_DOCS)/pdk.py: $(pdk_hosting_dir)/pdk.py
-	@echo "PDK: $@"
-	$(copy-file-to-target-with-cp)
-
 # All the files that we depend upon
 all_pdk_docs_files := $(pdk_doxygen_config_override_file) \
     $(pdk_doxygen_config_file) $(pdk_docs_intermediates)/header.html \
     $(pdk_docs_intermediates)/footer.html $(pdk_doxy_docsfiles_dir)/groups.dox \
-    $(pdk_doxy_docsfiles_dir)/main.dox all_copied_pdk_templates
+    $(pdk_doxy_docsfiles_dir)/main.dox all_copied_pdk_templates  \
+    all_copied_pdk_headers
 
 # Run doxygen and copy all output and templates to the final destination
 # We replace index.html with a template file so don't use the generated one
@@ -179,14 +159,17 @@
 	@mkdir -p $(pdk_docs_dest_dir)
 	@cd $(pdk_generated_source_dir) && chmod ug+rx *
 	@rm -f $(pdk_generated_source_dir)/index.html
+	# Fix a doxygen bug: in *-source.html file insert '</div>\n' after line 25
+	@$(pdk_hosting_dir)/edoxfix.sh $(pdk_generated_source_dir)
 	@cp -fp $(pdk_generated_source_dir)/* $(pdk_docs_dest_dir)
+	@rm $(pdk_generated_source_dir)/*
 
 
 # ==== docs for the web (on the google app engine server) =======================
 # Run javadoc/droiddoc/clearsilver to get the formatting right
 
 # make droiddocs run after we make our doxygen docs
-$(pdk_docs_intermediates)/pdk-timestamp: pdk_doxygen
+$(pdk_docs_intermediates)/pdk-timestamp: pdk_doxygen all_copied_pdk_templates
 	@touch $(pdk_docs_intermediates)/pdk-timestamp
 
 $(LOCAL_PATH)/pdk-timestamp: $(pdk_docs_intermediates)/pdk-timestamp
@@ -201,8 +184,6 @@
 LOCAL_MODULE := online-pdk
 
 LOCAL_DROIDDOC_OPTIONS := \
-        $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
-        $(web_docs_sample_code_flags) \
         -toroot /online-pdk/ \
     -hdf android.whichdoc online-pdk
 
@@ -214,6 +195,15 @@
 # The docs output dir is:  out/target/common/docs/online-pdk
 DOCS_OUT_DIR  := $(OUT_DOCS)/$(LOCAL_MODULE)
 
+# Copy appengine server files for new system
+$(OUT_DOCS)/app.yaml: $(pdk_hosting_dir)/app.yaml
+	@echo "PDK: $@"
+	$(copy-file-to-target-with-cp)
+
+$(OUT_DOCS)/pdk.py: $(pdk_hosting_dir)/pdk.py
+	@echo "PDK: $@"
+	$(copy-file-to-target-with-cp)
+
 # Name the tar files
 name := android_pdk_docs-$(REQUESTED_PRODUCT)
 ifeq ($(TARGET_BUILD_TYPE),debug)
@@ -222,17 +212,14 @@
 name := $(name)-$(BUILD_NUMBER)
 pdk_docs_tarfile := $(pdk_docs_intermediates)/$(name).tar
 pdk_docs_tarfile_zipped := $(pdk_docs_tarfile).gz
-new_pdk_docs_tarfile := $(pdk_docs_intermediates)/new-$(name).tar
-new_pdk_docs_tarfile_zipped := $(new_pdk_docs_tarfile).gz
 
 .PHONY: pdk pdk_docs pdk_doxygen all_copied_pdk_headers all_copied_pdk_templates pdk-timestamp
 
-pdk_docs: $(pdk_docs_tarfile_zipped) $(new_pdk_docs_tarfile)
+pdk_docs: $(pdk_docs_tarfile_zipped) $(pdk_docs_tarfile)
 	@echo "PDK: Docs tarred and zipped"
 
 # Put the pdk_docs zip files in the distribution directory
 $(call dist-for-goals,pdk_docs,$(pdk_docs_tarfile_zipped))
-$(call dist-for-goals,pdk_docs,$(new_pdk_docs_tarfile_zipped))
 
 # zip up tar files
 %.tar.gz: %.tar
@@ -240,20 +227,11 @@
 	$(hide) gzip -cf $< > $@
 
 # tar up all the files to make the pdk docs.
-# old version
-$(pdk_docs_tarfile): pdk_doxygen all_copied_pdk_templates \
-    $(pdk_docs_intermediates)/pdk.py $(pdk_docs_intermediates)/app.yaml
-	@echo "PDK: $@"
-	@mkdir -p $(dir $@)
-	@rm -f $@
-	$(hide) tar rf $@ -C $(pdk_docs_intermediates) docs pdk.py app.yaml
-
-# new version
-$(new_pdk_docs_tarfile): $(DOCS_OUT_DIR)-timestamp
+$(pdk_docs_tarfile): $(DOCS_OUT_DIR)-timestamp $(OUT_DOCS)/app.yaml $(OUT_DOCS)/pdk.py
 	@echo "PDK docs: $@"
 	@mkdir -p $(dir $@)
 	@rm -f $@
-	$(hide) tar rf $@ -C $(OUT_DOCS) $(LOCAL_MODULE)
+	$(hide) tar rf $@ -C $(OUT_DOCS) $(LOCAL_MODULE) pdk.py app.yaml
 
 # Debugging reporting can go here, add it as a target to get output.
 pdk_debug:
diff --git a/pdk/README b/pdk/README
index 18ff5d1..99598b1 100644
--- a/pdk/README
+++ b/pdk/README
@@ -28,45 +28,73 @@
 so you can have a record of the build commands in the logs directory.
 
 
-5) the pdk tar file is put in the dist directory.
+5) the pdk and ndk tar file is put in the dist directory.
 
 6) the pdk-docs are in 
 
-  out/target
+  out/target/common/docs/online-pdk
 
 
+--------------------------------------------------------------------------------
+# Build Notes
+
 The build target 'pdk' brings in the pdk/ndk make files into the build system.
   Then there are three targets:
     pdk_docs - which builds just the pdk documentation
     ndk - which builds the native development kit (native compiler, linker, etc.)
     pdk_all - which builds the above two targets
 
-To chnage which version of doxygen runs you can pass in the variable:
+To change which version of doxygen runs you can pass in the variable:
   doxygen_version='<path/name_of_doxygen_executable>'
 on the make line.
 
+
 --------------------------------------------------------------------------------
 # Testing
+
 You must install google appengine.  See: http://code.google.com/appengine/downloads.html
 
 Here's the command to run the pdk-docs server locally:
   python <path_to_appengine_installation>/dev_appserver.py --address 0.0.0.0 \
-    <path_to_cupcake_code>/android/out/target/common/docs/online-pdk
+    <path_to_cupcake_code>/android/out/target/common/docs
     
 To verify it is working you can access it with a browser loacally on port 8080:
 
 http://localhost:8080/index.html
-TODO: index.html needs correct links.
-TODO: app.yaml not working for redirecting, getting extra '.' in html names...
+
+NOTE: If you are trying to get to the appengine local testing instance remotely
+you will have to ssh tunnel into your linux box as appengine only serves the web
+host locally.  
+
+On a Windows machine to check your current port forwarding settings:
+
+1. Start putty.
+2. Click on your session in the list and hit load (this loads the settings so you can edit them)
+3. Go to SSH -> tunnels and look at the Forwarded ports box
+
+L8080   localhost:8080
+
+Means that you can point your webbrowser on your laptop to http://localhost:8080/ and it will show you the same thing as on your workstation for http://localhost:8080/
+
+To add port forwarding
+
+1. Start putty.
+2. Click on your session in the list and hit load (this loads the settings so you can edit them)
+3. Go to SSH -> tunnels.
+4. Pick an unused port on your laptop (8080, 8888, something like that) and put it in the "source port box"
+5. In the destination box, put localhost:8888 (replace with the actual port number the service is running on)
+6. Hit add.
+7. Go back to "Session" and save your new settings so this configuration will happen everytime you login.
  
- --------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
 # Deployment
+
 To host the pdk docs on the interanl appengine run:
 /home/build/static/projects/apphosting/devtools/appcfg.py update <path_to_cupcake_src>/out/common/docs
 where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
 all of which are tarred up by the Pdk.mk file when using the target pdk_docs. 
 
-# Deployment
 To host the pdk docs on the external appengine run:
 /home/build/static/projects/apphosting/devtools/appcfg.py -s pdk-docs.appspot.com update <path_to_cupcake_src>/out/common/docs
 where the docs directory contains: pdk.py, app.yaml, and the online-pdk directory,
diff --git a/pdk/docs/CHANGE_HISTORY.TXT b/pdk/docs/CHANGE_HISTORY.TXT
index 04d5880..379aade 100755
--- a/pdk/docs/CHANGE_HISTORY.TXT
+++ b/pdk/docs/CHANGE_HISTORY.TXT
@@ -1,3 +1,8 @@
+V 0.9 MWR Apr 6, 2009
+#####################
+
+* New files for new css files using droiddoc/clearsilver
+
 V 0.3 - June 9, 2008

 ####################

 

@@ -15,4 +20,4 @@
 * Updated Build System (build_system.html): Switched Device code options 1 & 2 to emphasize that 

   the new first option yields more consistent results. 

 

-* Updated Bring Up (bring_up.html): removed "hotplugd" from step 7.
\ No newline at end of file
+* Updated Bring Up (bring_up.html): removed "hotplugd" from step 7.
diff --git a/pdk/docs/audio_sub_system.jd b/pdk/docs/audio_sub_system.jd
index 903032f..affa740 100755
--- a/pdk/docs/audio_sub_system.jd
+++ b/pdk/docs/audio_sub_system.jd
@@ -53,4 +53,4 @@
 <p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="audio_sub_system.html">click here</a>.</p>
 
 
-<iframe onLoad="resizeHeight();" src="_audio_hardware_interface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
+<iframe onLoad="resizeDoxFrameHeight();" src="_audio_hardware_interface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/bluetooth.jd b/pdk/docs/bluetooth.jd
index a21ad7d..d686564 100755
--- a/pdk/docs/bluetooth.jd
+++ b/pdk/docs/bluetooth.jd
@@ -1,25 +1,15 @@
 page.title=Bluetooth
+pdk.version=1.0
 @jd:body
 
-<div id="qv-wrapper">
-<div id="qv">
 <a name="toc"/>
+<div style="padding:10px">
+<a href="#androidBluetoothIntro">Introduction</a><br/>
+<a href="#androidBluetoothPorting">Porting</a><br/><div style="padding-left:40px">
 
-<h2>In this document</h2>
-
-<ol>
-<li><a href="#androidBluetoothIntro">Introduction</a></li>
-<li><a href="#androidBluetoothPorting">Porting</a>
-	<ol>
-		<li><a href="#androidBluetoothPortingDriver">UART Driver</a></li>
-		<li><a href="#androidBluetoothPortingPowerOnOff">Bluetooth Power On / Off</a></li>
-	</ol>
-</li>
-<li><a href="#androidBluetoothTools">Tools</a></li>
-</ol>
-
-</div>
-</div>
+<a href="#androidBluetoothPortingDriver">UART Driver</a><br/>
+<a href="#androidBluetoothPortingPowerOnOff">Bluetooth Power On / Off</a><br/></div>
+<a href="#androidBluetoothTools">Tools</a><br/></div></font></div>
 
 <a name="androidBluetoothIntro"></a><h2>Introduction</h2>
 
@@ -77,6 +67,3 @@
 <li><code>dbus-monitor</code></li>
 </ul>
 </p>
-
-
-
diff --git a/pdk/docs/bring_up.jd b/pdk/docs/bring_up.jd
index 763f85e..85d7b26 100755
--- a/pdk/docs/bring_up.jd
+++ b/pdk/docs/bring_up.jd
@@ -1,4 +1,5 @@
 page.title=Bring Up
+pdk.version=1.0
 @jd:body
 
 <p>Once your code is built and you have verified that all necessary directories exist, power on and test your device with basic bring up, as described below. Bring up tests are typically designed to stress certain aspects of your system and allow you to characterize the device's behavior. </p>
@@ -6,7 +7,6 @@
 <h3>1. Confirm a Clean Installation of a Basic Linux Kernel </h3>
 <p>Before considering Android-specific modifications to the Linux kernel, verify that you can build, deploy, and boot a core Linux kernel on your target hardware. </p>
 <p>&nbsp;</p>
-
 <h3>2. Modify Your Kernel Configuration to Accommodate Android Drivers</h3>
 <p>Your kernel configuration file should include the following:</p>
 <pre class="prettyprint">
@@ -355,6 +355,4 @@
   disabled
   user akmd
   group akmd
-</pre>
-
-
+</pre>
\ No newline at end of file
diff --git a/pdk/docs/build_new_device.jd b/pdk/docs/build_new_device.jd
index f0a816f..21105d9 100755
--- a/pdk/docs/build_new_device.jd
+++ b/pdk/docs/build_new_device.jd
@@ -27,7 +27,7 @@
   PRODUCT_NAME := &lt;first_product_name&gt;
   PRODUCT_DEVICE := &lt;board_name&gt;</pre></li>  
   <li>In the <code>products</code> directory, create an <code>AndroidProducts.mk</code> file that point to (and is responsible for finding) the individual product make files.<BR>
-  <pre class="prettyprint">
+  <pre class="prettypring">
   #
   # This file should set PRODUCT_MAKEFILES to a list of product makefiles
   # to expose to the build system.  LOCAL_DIR will already be set to
@@ -127,4 +127,4 @@
     </ul>
   </ul>
 </ul>
-</p>
+</p>
\ No newline at end of file
diff --git a/pdk/docs/build_system.jd b/pdk/docs/build_system.jd
index b157f4d..958d275 100755
--- a/pdk/docs/build_system.jd
+++ b/pdk/docs/build_system.jd
@@ -251,4 +251,4 @@
 <p>To build the kernel, execute:</p>
 <pre class="prettyprint">
 % make -j4
-</pre>
+</pre>
\ No newline at end of file
diff --git a/pdk/docs/camera.jd b/pdk/docs/camera.jd
index 85ed3dc..e4532d5 100755
--- a/pdk/docs/camera.jd
+++ b/pdk/docs/camera.jd
@@ -1,26 +1,16 @@
-page.title=Camera Subsystem
+page.title=Camera
+pdk.version=1.0
 @jd:body
 
-<div id="qv-wrapper">
-<div id="qv">
 <a name="toc"/>
+<div style="padding:10px">
+<a href="#androidCameraIntroduction">Introduction</a><br/>
+<a href="#androidCameraBuildingDriver">Building a Camera Library</a><br/>
+<a href="#androidCameraSequenceDiagrams">Sequence Diagrams</a><br/><div style="padding-left:40px">
 
-<h2>In this document</h2>
-
-<ol>
-<li><a href="#androidCameraIntroduction">Introduction</a></li>
-<li><a href="#androidCameraBuildingDriver">Building a Camera Library</a></li>
-<li><a href="#androidCameraSequenceDiagrams">Sequence Diagrams</a>
-	<ol>
-		<li><a href="#androidCameraSequenceDiagramsPreview">Preview</a></li>
-		<li><a href="#androidCameraSequenceDiagramsTakePic">Taking a Picture</a></li>
-	</ol>
-</li>
-<li><a href="#androidCameraInterfaceIntro">Interface</a></li>
-</ol>
-
-</div>
-</div>
+<a href="#androidCameraSequenceDiagramsPreview">Preview</a><br/>
+<a href="#androidCameraSequenceDiagramsTakePic">Taking a Picture</a><br/></div>
+<a href="#androidCameraInterfaceIntro">Interface</a><br/></div></font></div>
 
 <a name="androidCameraIntroduction"></a><h2>Introduction</h2>
 
@@ -82,6 +72,4 @@
 <p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="camera.html">click here</a>.</p>
 
 
-<iframe onLoad="resizeDoxFrameHeight();" src="CameraHardwareInterface_8h.html " scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
-
-
+<iframe onLoad="resizeDoxFrameHeight();" src="_camera_hardware_interface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/display_drivers.jd b/pdk/docs/display_drivers.jd
index d127207..c2e5f3a 100755
--- a/pdk/docs/display_drivers.jd
+++ b/pdk/docs/display_drivers.jd
@@ -1,12 +1,15 @@
 page.title=Display Drivers
+pdk.version=1.0
 @jd:body
 
+
+
 <a name="toc"/>
 <div style="padding:10px">
 <a href="#androidDisplayDriverIntroduction">Introduction</a><br/>
 <a href="#androidDisplayDriverFunctionality">Functionality</a><br/>
 <a href="#androidDisplayDriversSourceTemplate">Implementing Your Own Driver (Driver Template)</a><br/>
-<a href="#androidDisplayDriversTroubleshooting">Troubleshooting</a><br/></div></font>
+<a href="#androidDisplayDriversTroubleshooting">Troubleshooting</a><br/></div></font></div>
 
 <a name="androidDisplayDriverIntroduction"></a><h2>Introduction</h2>
 
@@ -335,6 +338,4 @@
   <li><strong>Arrow keys</strong>: When an arrow key is pressed, the desired icon doesn't get highlighted. For example, if you browse through icons in the Applications menu, you might notice that icons aren't highlighted as expected when you use the arrow key to navigate between options.</li>
 </ul>
 <p>Both problems are caused by an incorrect implementation of the frame buffer's page flipping. Key events are captured, but the graphical interface appears to drop every other frame. </p>
-<p>Android relies on a double buffer to smoothly render page flips (please see <a href="androidDisplayDriverFunctionality">Functionality</a> for details).
-
-
+<p>Android relies on a double buffer to smoothly render page flips (please see <a href="androidDisplayDriverFunctionality">Functionality</a> for details).</p>
\ No newline at end of file
diff --git a/pdk/docs/gps.jd b/pdk/docs/gps.jd
index aa617e3..da57bef 100755
--- a/pdk/docs/gps.jd
+++ b/pdk/docs/gps.jd
@@ -1,11 +1,12 @@
 page.title=GPS
+pdk.version=1.0
 @jd:body
 
 <a name="toc"/>
 <div style="padding:10px">
 <a href="#androidGpsIntroduction">Introduction</a><br/>
 <a href="#androidGPSBuildingDriver">Building a GPS Library</a><br/>
-<a href="#androidGPSInterface">Interface</a><br/></div>
+<a href="#androidGPSInterface">Interface</a><br/></div></font></div>
 
 <a name="androidGpsIntroduction"></a><h2>Introduction</h2>
 
@@ -47,3 +48,9 @@
 
 
 
+<p><span class="lh2"><a name="androidDoxygenNote"></a></span>
+
+<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="gps.html">click here</a>.</p>
+
+
+<iframe onLoad="resizeDoxFrameHeight();" src="gps_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/index.jd b/pdk/docs/index.jd
index b7529d3..1cd5f5c 100644
--- a/pdk/docs/index.jd
+++ b/pdk/docs/index.jd
@@ -1,4 +1,3 @@
-home=true
 page.title=Welcome to the Android Porting Guide
 pdk.version=1.0
 @jd:body
@@ -36,4 +35,4 @@
     <dt><a href="bring_up.html">Basic Bring up </a></dt>
     <dd>Establish core components necessary to your device, such as keymaps / keyboard input and display drivers. </dd>
     <dt>&nbsp;</dt>
-</dl>
+</dl>
\ No newline at end of file
diff --git a/pdk/docs/instrumentation_testing.jd b/pdk/docs/instrumentation_testing.jd
index c0248ae..4646777 100755
--- a/pdk/docs/instrumentation_testing.jd
+++ b/pdk/docs/instrumentation_testing.jd
@@ -1,4 +1,5 @@
 page.title=Instrumentation Testing
+pdk.version=1.0
 @jd:body
 
 <a name="toc"/>
@@ -25,11 +26,11 @@
 <a href="#androidTestingLocationFiles">Location of Files</a><br/>
 <a href="#androidTestingContentMakefile">Contents of makefile</a><br/>
 <a href="#androidTestingContentManifest">Content of Manifest</a><br/>
-<a href="#androidInstrumentationTestingCreatingTestRunner">New InstrumentationTestRunner</a><br/>
+<a href="#androidInstrumentationTestingCreatingTestRunner">New Instrumentation TestRunner</a><br/>
 <a href="#androidInstrumentationTestingCreatingTestCase">New InstrumentationTestCase</a><br/>
 <a href="#androidInstrumentationFrameworkTestCase">Exploring a Test Case</a><br/>
 <a href="#androidTestingKindsofTests">Deciding Kinds of Tests to Write</a><br/></div>
-<a href="#androidInstrumentationFrameworkTroubleshooting">Troubleshooting</a><br/></div>
+<a href="#androidInstrumentationFrameworkTroubleshooting">Troubleshooting</a><br/></div></font></div>
 
 <a name="androidInstrumentationFrameworkIntro"></a><h2>Introduction</h2>
 
@@ -318,28 +319,23 @@
 
 <a name="androidTestingContentManifest"></a><h3>Content of Manifest</h3>
 
-<p>Use the following example to create an <code>AndroidManifest.xml</code> file that declares the instrumentation. Specify that the framework supplied InstrumentationTestRunner targets the package of your application, allowing the tests that are run with the instrumentation to get access to all of the classes of your application without having to build the source into the test app. The name of the test application is typically the same as your target application with <code>.tests</code> appended. </p>
+<p>Use the following example to create an <code>AndroidManifest.xml</code> file that declares the instrumentation. Specify that the framework supplied Instrumentation TestRunner targest the package of your application, allowing the tests that are run with the instrumentation to get access to all of the classes of your application without having to build the source into the test app. The name of the test application is typically the same as your target application with <code>.tests</code> appended. </p>
 <pre> 
 # Add appropriate copyright banner here
 &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.apis.tests"&gt;
-
-    &lt;!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    &lt;application>
-        &lt;uses-library android:name="android.test.runner" />
-    &lt;/application>
-
+    package="com.android.samples.tests"&gt;
+ 
+    &lt;uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /&gt;
+ 
     &lt;!--
     This declares that this app uses the instrumentation test runner targeting
-    the package of com.example.android.apis.  To run the tests use the command:
-    "adb shell am instrument -w com.example.android.apis.tests/android.test.InstrumentationTestRunner"
-    -->
+    the package of com.android.samples.  To run the tests use the command:
+    "adb shell am instrument -w com.android.samples.tests/android.test.InstrumentationTestRunner"
+    --&gt;
     &lt;instrumentation android:name="android.test.InstrumentationTestRunner"
-                     android:targetPackage="com.example.android.apis"
-                     android:label="Tests for Api Demos."/>
-
+                     android:targetPackage="com.android.samples"
+                     android:label="Tests for Api Demos."/&gt;
+ 
 &lt;/manifest&gt;
 </pre> 
 <p>&nbsp;</p> 
@@ -350,7 +346,7 @@
 </pre> 
 
 
-<a name="androidInstrumentationTestingCreatingTestRunner"></a><h3>New InstrumentationTestRunner</h3>
+<a name="androidInstrumentationTestingCreatingTestRunner"></a><h3>New Instrumentation TestRunner</h3>
 
 <p>Create a class that derives from this class. You must override two abstract methods; one that returns the class loader of the target package, and another that defines all of the tests within the package. For example, the snippet below displays the test runner for the framework tests.</p>
 <pre class="prettify">
@@ -374,6 +370,8 @@
 </pre>
 <p> Next, in an appropriate <code>AndroidManifest.xml</code>, define the instrumentation for the derived class with the appropriate <code>android:targetPackage</code> set.  For example, the snippet below defines the instrumentation runner for the framework tests.</p>
 <pre class="prettify">
+&lt;uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /&gt;
+
 &lt;instrumentation android:name="android.tests.FrameworkInstrumentationTestRunner"
                  android:targetPackage="com.google.android.frameworktest"
                  android:label="framework instrumentation test runner" /&gt;
@@ -510,5 +508,4 @@
 D/AndroidRuntime(  688): Shutting down VM
 E/AndroidRuntime(  688): ERROR: thread attach failed
 </pre>		
-<p>It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file. </p>
-
+<p>It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file. </p>
\ No newline at end of file
diff --git a/pdk/docs/keymaps_keyboard_input.jd b/pdk/docs/keymaps_keyboard_input.jd
index d52a73f..a71b5e9 100755
--- a/pdk/docs/keymaps_keyboard_input.jd
+++ b/pdk/docs/keymaps_keyboard_input.jd
@@ -1,6 +1,8 @@
 page.title=Keymaps and Keyboard Input
+pdk.version=1.0
 @jd:body
 
+
 <a name="toc"/>
 <div style="padding:10px">
 <a href="#androidKeymapIntro">Introduction</a><br/>
@@ -17,7 +19,7 @@
 <a href="#androidKeymapKeyCharMapExample">Example of a Key Character Map File</a><br/>
 <a href="#androidKeymapKeyCharMapResourceBinaryFileFormat">Resource Binary File Format</a><br/></div>
 <a href="#androidKeymapDriverTemplate">Implementing Your Own Driver (Driver Template)</a><br/>
-<a href="#androidKeymapKeyCharMapSampleImplementation">Sample Implementation</a><br/></div>
+<a href="#androidKeymapKeyCharMapSampleImplementation">Sample Implementation</a><br/></div></font></div>
 
 <a name="androidKeymapIntro"></a><h2>Introduction</h2>
 
@@ -504,6 +506,4 @@
 I/KeyInputQueue( 1548): Device added: id=0x10000, name=partnerxx_keypad, classes=1
 I/KeyInputQueue( 1548):   Keymap: partnerxx_keypad.kl
 </pre>
-<p>The snippet above contains artificial line breaks to maintain a print-friendly document.</p>
-
-
+<p>The snippet above contains artificial line breaks to maintain a print-friendly document.</p>
\ No newline at end of file
diff --git a/pdk/docs/power_management.jd b/pdk/docs/power_management.jd
index 52c23e8..35be86e 100755
--- a/pdk/docs/power_management.jd
+++ b/pdk/docs/power_management.jd
@@ -1,6 +1,10 @@
 page.title=Power Management
+pdk.version=1.0
 @jd:body
 
+
+
+
 <a name="toc"/>
 <div style="padding:10px">
 <a href="#androidPowerIntro">Introduction</a><br/>
@@ -9,7 +13,7 @@
 <a href="#androidPowerWakeLocksDefinitions">Types of Wake Locks</a><br/>
 <a href="#androidPowerWakeLockExample">Exploring a Wake Lock Example</a><br/></div>
 <a href="#androidPowerPowerManagerClass">PowerManager class</a><br/>
-<a href="#androidPowerKernelRegistration">Registering Drivers with the PM Driver</a><br/></div>
+<a href="#androidPowerKernelRegistration">Registering Drivers with the PM Driver</a><br/></div></font></div>
 
 <a name="androidPowerIntro"></a><h2>Introduction</h2>
 
@@ -18,7 +22,7 @@
 <p>The image below illustrates the Android power management architecture. </p>
 <p><img src='androidPMArchitecture.gif'></p>
 
-<p>Solid elements represent Android blocks and dashed elements represent partner-specific blocks.</p>
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
 
 
 
@@ -102,7 +106,4 @@
 android_register_early_suspend(android_early_suspend_t *handler)
 android_register_early_resume(android_early_resume_t *handler)
 </pre>
-<p>It is critical in a drive to return immediately and not wait for anything to happen in the call back.</p>
-
-
-
+<p>It is critical in a drive to return immediately and not wait for anything to happen in the call back.</p>
\ No newline at end of file
diff --git a/pdk/docs/system_requirements.jd b/pdk/docs/system_requirements.jd
index 1b203ea..2d3fcd6 100755
--- a/pdk/docs/system_requirements.jd
+++ b/pdk/docs/system_requirements.jd
@@ -3,7 +3,6 @@
 @jd:body
 
 <p>While Android is designed to support a wide variety of hardware platforms and configurations, this section provides recommended minimum device requirements.</p>
-
 <table border=1 cellpadding=2 cellspacing=0>
     <tbody><tr>
       <th scope="col">Feature</th>
@@ -57,7 +56,4 @@
   <li>QWERTY keyboard</li>
   <li>WiFi</li>
   <li>GPS</li>
-</ul>
-
-
-
+</ul>
\ No newline at end of file
diff --git a/pdk/docs/telephony.jd b/pdk/docs/telephony.jd
index 99a12c0..17d732a 100755
--- a/pdk/docs/telephony.jd
+++ b/pdk/docs/telephony.jd
@@ -1,4 +1,5 @@
 page.title=Radio Layer Interface
+pdk.version=1.0
 @jd:body
 
 <a name="toc"/>
@@ -15,7 +16,7 @@
 <a href="#androidTelephonyRILFunctions">RIL Functions</a><br/><div style="padding-left:40px">
 
 <a href="#androidRilFunctionsSolicited">RIL Solicited Command Requests</a><br/>
-<a href="#androidRilFunctionsUnsolicited">RIL Unsolicited Commands</a><br/></div></div>
+<a href="#androidRilFunctionsUnsolicited">RIL Unsolicited Commands</a><br/></div></div></font></div>
 
 <a name="androidTelephonyIntro"></a><h2>Introduction</h2>
 
@@ -221,4 +222,3 @@
     </ul></td>
   </tr>
 </table></p>
-
diff --git a/pdk/docs/templates/footer.cs b/pdk/docs/templates/footer.cs
deleted file mode 100755
index bb82c8d..0000000
--- a/pdk/docs/templates/footer.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-<div id="footer">
-
-<?cs if:reference||guide ?>
-  <div id="copyright">
-    <?cs call:custom_copyright() ?>
-  </div>
-  <div id="build_info">
-    <?cs call:custom_buildinfo() ?>
-  </div>
-<?cs elif:!hide_license_footer ?>
-  <div id="copyright">
-    <?cs call:custom_cc_copyright() ?>
-  </div>
-<?cs /if ?>
-  <div id="footerlinks">
-    <?cs call:custom_footerlinks() ?>
-  </div>
-
-</div> <!-- end footer -->
diff --git a/pdk/docs/templates/head_tag.cs b/pdk/docs/templates/head_tag.cs
deleted file mode 100755
index 55d0225..0000000
--- a/pdk/docs/templates/head_tag.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>favicon.ico" />
-<title><?cs 
-  if:page.title ?><?cs 
-    var:page.title ?><?cs
-    if:sdk.version ?> (<?cs
-      var:sdk.version ?>)<?cs
-    /if ?> | <?cs
-  /if ?>Android Developers</title><?cs 
-if:guide||sdk ?>
-<link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" /><?cs 
-else ?>
-<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /><?cs 
-/if ?>
-<script src="<?cs var:toroot ?>assets/search_autocomplete.js" type="text/javascript"></script>
-<script src="<?cs var:toroot ?>reference/lists.js" type="text/javascript"></script>
-<script src="<?cs var:toroot ?>assets/jquery-resizable.min.js" type="text/javascript"></script>
-<script src="<?cs var:toroot ?>assets/android-developer-docs.js" type="text/javascript"></script>
-<script type="text/javascript">
-  setToRoot("<?cs var:toroot ?>");
-</script><?cs 
-if:reference ?>
-<script src="<?cs var:toroot ?>navtree_data.js" type="text/javascript"></script>
-<script src="<?cs var:toroot ?>assets/navtree.js" type="text/javascript"></script><?cs 
-/if ?>
-<noscript>
-  <style type="text/css">
-    body{overflow:auto;}
-    #body-content{position:relative; top:0;}
-    #doc-content{overflow:visible;border-left:3px solid #666;}
-    #side-nav{padding:0;}
-    #side-nav .toggle-list ul {display:block;}
-    #resize-packages-nav{border-bottom:3px solid #666;}
-  </style>
-</noscript>
-</head>
diff --git a/pdk/docs/templates/header.cs b/pdk/docs/templates/header.cs
deleted file mode 100755
index e8301be..0000000
--- a/pdk/docs/templates/header.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-<?cs call:custom_masthead() ?>
-<?cs call:custom_left_nav() ?>
-
diff --git a/pdk/docs/templates/index.cs b/pdk/docs/templates/index.cs
deleted file mode 100755
index 15a6a59..0000000
--- a/pdk/docs/templates/index.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=packages.html">
-</head>
-<body>
-<?cs include:"analytics.cs" ?>
-</body>
-</html>
\ No newline at end of file
diff --git a/pdk/docs/templates/trailer.cs b/pdk/docs/templates/trailer.cs
deleted file mode 100755
index 155ba58..0000000
--- a/pdk/docs/templates/trailer.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-</div> <!-- end body-content --> <?cs # normally opened by header.cs ?>
-
-<script type="text/javascript">
-init(); /* initialize android-developer-docs.js */
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-5831155-1");
-pageTracker._trackPageview();
-</script>
\ No newline at end of file
diff --git a/pdk/docs/wifi.jd b/pdk/docs/wifi.jd
index 42cb14c..94f40fd 100755
--- a/pdk/docs/wifi.jd
+++ b/pdk/docs/wifi.jd
@@ -1,11 +1,12 @@
 page.title=Wi-Fi
+pdk.version=1.0
 @jd:body
 
 <a name="toc"/>
 <div style="padding:10px">
 <a href="#androidWifiIntroduction">Introduction</a><br/>
 <a href="#androidWifiBuildingDriver">Building a Wi-Fi Library</a><br/>
-<a href="#androidWifiInterface">Interface</a><br/></div>
+<a href="#androidWifiInterface">Interface</a><br/></div></font></div>
 
 <a name="androidWifiIntroduction"></a><h2>Introduction</h2>
 
@@ -28,7 +29,7 @@
 <pre class="prettify">
 LOCAL_SHARED_LIBRARIES += libnetutils
 
-ifeq ($(TARGET_DEVICE),acme)
+ifeq ($(TARGET_PRODUCT),acme)
 LOCAL_SRC_FILES += wifi/wifi_mywifi.c
 else
 LOCAL_SRC_FILES += wifi/wifi.c
@@ -44,6 +45,3 @@
 
 
 <iframe onLoad="resizeDoxFrameHeight();" src="wifi_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
-
-
-
diff --git a/pdk/hosting/edoxfix.sh b/pdk/hosting/edoxfix.sh
new file mode 100755
index 0000000..f82e912
--- /dev/null
+++ b/pdk/hosting/edoxfix.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# $1 = output directory of generated docs: out/target/product/generic/obj/PACKAGING/pdkdocs_intermediates/generatedDocs/html
+# fix a bug in doxygen 1.5.6 and higher...
+# insert the line: '</div>\n' after line 25 in each generated source file: 
+echo \</div\> > $1/div.tmp
+for f in `find $1 -name '*-source.html' -print`
+do
+  head -n 25 $f > $f.head.tmp
+  let count=$(wc -l $f  | cut -d\  -f 1 )
+  count=$(($count-25))
+  tail -n $count $f > $f.tail.tmp
+  cat $f.head.tmp $1/div.tmp $f.tail.tmp > $f
+done
+rm $1/*.tmp