diff --git a/pdk/Pdk.mk b/pdk/Pdk.mk
index fbe8b5c90..584eccf63 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 error
pdk:
@echo "Package: $@ has targets ndk, pdk_docs and pdk_all"
@@ -66,10 +65,8 @@ pdk_generated_source_dir := $(pdk_docs_intermediates)/generatedDocs/html
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 error.
doxygen_version = doxygen
#-------------------------------------------------------------------------------
@@ -142,29 +139,12 @@ $(pdk_doxy_docsfiles_dir)/main.dox: $(pdk_docsfile_dir)/main.dox
@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 @@ pdk_doxygen: all_copied_pdk_headers $(pdk_doxygen_config_override_file) \
@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 '\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_DROIDDOC_HTML_DIR := ../../../$(pdk_docs_dest_dir)
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 @@ include $(BUILD_DROIDDOC)
# 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 @@ endif
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 @@ $(call dist-for-goals,pdk_docs,$(new_pdk_docs_tarfile_zipped))
$(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 18ff5d120..99598b1d2 100644
--- a/pdk/README
+++ b/pdk/README
@@ -28,45 +28,73 @@ then build everything:
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=' Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
+Bluetooth Power On / OffIntroduction
@@ -77,6 +67,3 @@ Solid elements represent Android blocks and dashed elements represent partner-sp
dbus-monitor
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.
@@ -6,7 +7,6 @@ page.title=Bring UpBefore considering Android-specific modifications to the Linux kernel, verify that you can build, deploy, and boot a core Linux kernel on your target hardware.
-
Your kernel configuration file should include the following:
@@ -355,6 +355,4 @@ service akmd /sbin/akmd disabled user akmd group akmd -- - + \ No newline at end of file diff --git a/pdk/docs/build_new_device.jd b/pdk/docs/build_new_device.jd index f0a816f54..21105d991 100755 --- a/pdk/docs/build_new_device.jd +++ b/pdk/docs/build_new_device.jd @@ -27,7 +27,7 @@ pdk.version=1.0 PRODUCT_NAME := <first_product_name> PRODUCT_DEVICE := <board_name>
products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.+# # 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 @@ pdk.version=1.0 - + \ No newline at end of file diff --git a/pdk/docs/build_system.jd b/pdk/docs/build_system.jd index b157f4dbc..958d2756a 100755 --- a/pdk/docs/build_system.jd +++ b/pdk/docs/build_system.jd @@ -251,4 +251,4 @@ Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)\ No newline at end of file diff --git a/pdk/docs/camera.jd b/pdk/docs/camera.jd index 85ed3dc4f..e4532d56c 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 -To build the kernel, execute:
% make -j4 -+-+ +Preview+Interface
+Taking a PictureIntroduction
@@ -82,6 +72,4 @@ include $(BUILD_SHARED_LIBRARY)Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
- - - + diff --git a/pdk/docs/display_drivers.jd b/pdk/docs/display_drivers.jd index d1272079e..c2e5f3aa5 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 + + +Troubleshooting
Introduction
@@ -335,6 +338,4 @@ MODULE_LICENSE("GPL");
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.
-Android relies on a double buffer to smoothly render page flips (please see Functionality for details). - - +
Android relies on a double buffer to smoothly render page flips (please see Functionality for details).
\ No newline at end of file diff --git a/pdk/docs/gps.jd b/pdk/docs/gps.jd index aa617e364..da57bef33 100755 --- a/pdk/docs/gps.jd +++ b/pdk/docs/gps.jd @@ -1,11 +1,12 @@ page.title=GPS +pdk.version=1.0 @jd:body +InterfaceNote: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
+ + + diff --git a/pdk/docs/index.jd b/pdk/docs/index.jd index b7529d3a7..1cd5f5ca6 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 @@ with at least keypad and display drivers properly installed.Use the following example to create an AndroidManifest.xml 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 .tests appended.
Use the following example to create an AndroidManifest.xml 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 .tests appended.
# Add appropriate copyright banner here
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.android.apis.tests">
-
- <!-- 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. -->
- <application>
- <uses-library android:name="android.test.runner" />
- </application>
-
+ package="com.android.samples.tests">
+
+ <uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
+
<!--
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"
+ -->
<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."/>
+
</manifest>
@@ -350,7 +346,7 @@ $ adb shell am instrument -w \ -
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.
@@ -374,6 +370,8 @@ public class FrameworkInstrumentationTestRunner extends InstrumentationTestRunne
Next, in an appropriate AndroidManifest.xml, define the instrumentation for the derived class with the appropriate android:targetPackage set. For example, the snippet below defines the instrumentation runner for the framework tests.
+<uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
+
<instrumentation android:name="android.tests.FrameworkInstrumentationTestRunner"
android:targetPackage="com.google.android.frameworktest"
android:label="framework instrumentation test runner" />
@@ -510,5 +508,4 @@ W/ActivityManager( 469): Unable to find instrumentation info for: ComponentInfo
D/AndroidRuntime( 688): Shutting down VM
E/AndroidRuntime( 688): ERROR: thread attach failed
-It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file.
- +It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file.
\ No newline at end of file diff --git a/pdk/docs/keymaps_keyboard_input.jd b/pdk/docs/keymaps_keyboard_input.jd index d52a73fe3..a71b5e9ed 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 +The snippet above contains artificial line breaks to maintain a print-friendly document.
- - +The snippet above contains artificial line breaks to maintain a print-friendly document.
\ No newline at end of file diff --git a/pdk/docs/power_management.jd b/pdk/docs/power_management.jd index 52c23e803..35be86edb 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 + + +The image below illustrates the Android power management architecture.

Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks. @@ -102,7 +106,4 @@ wl.release(); android_register_early_suspend(android_early_suspend_t *handler) android_register_early_resume(android_early_resume_t *handler) -It is critical in a drive to return immediately and not wait for anything to happen in the call back.
- - - +It is critical in a drive to return immediately and not wait for anything to happen in the call back.
\ No newline at end of file diff --git a/pdk/docs/system_requirements.jd b/pdk/docs/system_requirements.jd index 1b203ea2f..2d3fcd68c 100755 --- a/pdk/docs/system_requirements.jd +++ b/pdk/docs/system_requirements.jd @@ -3,7 +3,6 @@ pdk.version=1.0 @jd:bodyWhile Android is designed to support a wide variety of hardware platforms and configurations, this section provides recommended minimum device requirements.
-| Feature | @@ -57,7 +56,4 @@ pdk.version=1.0
|---|
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 @@ endif - - - diff --git a/pdk/hosting/edoxfix.sh b/pdk/hosting/edoxfix.sh new file mode 100755 index 000000000..f82e91257 --- /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: '\n' after line 25 in each generated source file: +echo \ > $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