am 78ba4a54: (-s ours) am 56af356a: am a9982898: (-s ours) Merge change Ida443c07 into eclair

Merge commit '78ba4a54448b9f68c2a9d810e21d6af8b2c014e0'

* commit '78ba4a54448b9f68c2a9d810e21d6af8b2c014e0':
  Remove calendar provider suite from continuous. DO NOT MERGE
diff --git a/ide/emacs/android-common.el b/ide/emacs/android-common.el
new file mode 100644
index 0000000..cebd087
--- /dev/null
+++ b/ide/emacs/android-common.el
@@ -0,0 +1,181 @@
+;;; android-common.el --- Common functions/variables to dev Android in Emacs.
+;;
+;; Copyright (C) 2009 The Android Open Source Project
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;      http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+;;; Commentary:
+;;
+;; Variables to customize and common functions for the Android build
+;; support in Emacs.
+;; There should be no interactive function in this module.
+;;
+;; You need to have a proper buildspec.mk file in your root directory
+;; for this module to work (see $TOP/build/buildspec.mk.default).
+;; If the path the product's files/image uses an a product alias, you
+;; need to add a mapping in `android-product-alias-map'. For instance
+;; if TARGET_PRODUCT is foo but the build directory is out/target/product/bar,
+;; you need to add a mapping Target:foo -> Alias:bar
+;;
+
+;;; Code:
+
+(defgroup android nil
+  "Support for android development in Emacs."
+  :prefix "android-"                    ; Currently unused.
+  :tag    "Android"
+  :group  'tools)
+
+;;;###autoload
+(defcustom android-compilation-jobs 2
+  "Number of jobs used to do a compilation (-j option of make)."
+  :type 'integer
+  :group 'android)
+
+;;;###autoload
+(defcustom android-compilation-no-buildenv-warning t
+  "If not nil, suppress warnings from the build env (Makefile,
+bash) from the compilation output since they interfere with
+`next-error'."
+  :type 'boolean
+  :group 'android)
+
+;;;###autoload
+(defcustom android-product-alias-map nil
+  "Alist between product targets (declared in buildspec.mk) and actual
+ product build directory used by `android-product'.
+
+For instance if TARGET_PRODUCT is 'foo' but the build directory
+ is 'out/target/product/bar', you need to add a mapping Target:foo -> Alias:bar."
+  :type '(repeat (list (string :tag "Target")
+                       (string :tag "Alias")))
+  :group 'android)
+
+(defconst android-output-buffer-name "*Android Output*"
+  "Name of the default buffer for the output of the commands.
+There is only one instance of such a buffer.")
+
+(defun android-find-build-tree-root ()
+  "Ascend the current path until the root of the android build tree is found.
+Similarly to the shell functions in envsetup.sh, for the root both ./Makefile
+and ./build/core/envsetup.mk are exiting files.
+Return the root of the build tree.  Signal an error if not found."
+  (let ((default-directory default-directory))
+    (while (and (> (length default-directory) 2)
+                (not (file-exists-p (concat default-directory
+                                            "Makefile")))
+                (not (file-exists-p (concat default-directory
+                                            "build/core/envsetup.mk"))))
+      (setq default-directory
+            (substring default-directory 0
+                       (string-match "[^/]+/$" default-directory))))
+    (if (> (length default-directory) 2)
+        default-directory
+      (error "Not in a valid android tree"))))
+
+(defun android-project-p ()
+  "Return nil if not in an android build tree."
+  (condition-case nil
+      (android-find-build-tree-root)
+    (error nil)))
+
+(defun android-host ()
+  "Return the <system>-<arch> string (e.g linux-x86).
+Only linux and darwin on x86 architectures are supported."
+  (or (string-match "x86" system-configuration)
+      (string-match "i386" system-configuration)
+      (error "Unknown arch"))
+  (or (and (string-match "darwin" system-configuration) "darwin-x86")
+      (and (string-match "linux" system-configuration) "linux-x86")
+      (error "Unknown system")))
+
+(defun android-product ()
+  "Return the product built according to the buildspec.mk.
+You must have buildspec.mk file in the top directory.
+
+Additional product aliases can be listed in `android-product-alias-map'
+if the product actually built is different from the one listed
+in buildspec.mk"
+  (save-excursion
+    (let* ((buildspec (concat (android-find-build-tree-root) "buildspec.mk"))
+           (product (with-current-buffer (find-file-noselect buildspec)
+                      (goto-char (point-min))
+                      (search-forward "TARGET_PRODUCT:=")
+                      (buffer-substring-no-properties (point)
+                                                      (scan-sexps (point) 1))))
+           (alias (assoc product android-product-alias-map)))
+      ; Post processing, adjust the names.
+      (if (not alias)
+          product
+        (nth 1 alias)))))
+
+(defun android-product-path ()
+  "Return the full path to the product directory.
+
+Additional product aliases can be added in `android-product-alias-map'
+if the product actually built is different from the one listed
+in buildspec.mk"
+  (let ((path (concat (android-find-build-tree-root) "out/target/product/"
+                      (android-product))))
+    (when (not (file-exists-p path))
+      (error (format "%s does not exist. If product %s maps to another one,
+add an entry to android-product-map." path (android-product))))
+    path))
+
+(defun android-find-host-bin (binary)
+  "Return the full path to the host BINARY.
+Binaries don't depend on the device, just on the host type.
+Try first to locate BINARY in the out/host tree.  Fallback using
+the shell exec PATH setup."
+  (if (android-project-p)
+      (let ((path (concat (android-find-build-tree-root) "out/host/"
+                          (android-host) "/bin/" binary)))
+        (if (file-exists-p path)
+            path
+          (error (concat binary " is missing."))))
+    (executable-find binary)))
+
+(defun android-adb ()
+  "Return the path to the adb executable.
+If not in the build tree use the PATH env variable."
+  (android-find-host-bin "adb"))
+
+(defun android-fastboot ()
+  "Return the path to the fastboot executable.
+If not in the build tree use the PATH env variable."
+  ; For fastboot -p is the name of the product, *not* the full path to
+  ; its directory like adb requests sometimes.
+  (concat (android-find-host-bin "fastboot") " -p " (android-product)))
+
+(defun android-adb-command (command &optional product)
+  "Execute 'adb COMMAND'.
+If the optional PRODUCT is not nil, -p (android-product-path) is used
+when adb is invoked."
+  (when (get-buffer android-output-buffer-name)
+    (with-current-buffer android-output-buffer-name
+      (erase-buffer)))
+  (if product
+      (shell-command (concat (android-adb) " -p " (android-product-path)
+                             " " command)
+                     android-output-buffer-name)
+    (shell-command (concat (android-adb) " " command)
+                   android-output-buffer-name)))
+
+(defun android-adb-shell-command (command)
+  "Execute 'adb shell COMMAND'."
+  (android-adb-command (concat " shell " command)
+                       android-output-buffer-name))
+
+(provide 'android-common)
+
+;;; android-common.el ends here
diff --git a/ide/emacs/android-compile.el b/ide/emacs/android-compile.el
new file mode 100644
index 0000000..1b5092f
--- /dev/null
+++ b/ide/emacs/android-compile.el
@@ -0,0 +1,154 @@
+;;; android-compile.el --- Compile the Android source tree.
+;;
+;; Copyright (C) 2009 The Android Open Source Project
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;      http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+;;; Commentary:
+;;
+;; Helper functions to compile Android file within emacs.
+;; This module ignores 'build/envsetup.sh' and any enviroment set by the
+;; 'lunch' shell function.
+;; Instead it relies solely on 'buildspec.mk', remember that when you
+;; switch configuration.
+;;
+;; The only interactive function is 'android-compile'.
+;; In your .emacs load this file (e.g (require 'android-compile)) then:
+;;
+;;   (add-hook 'c++-mode-hook 'android-compile)
+;;   (add-hook 'java-mode-hook 'android-compile)
+;; and/or
+;;   (global-set-key [f9] 'android-compile)
+;;
+;;
+;; TODO: Maybe we could cache the result of the compile function in
+;; buffer local vars.
+
+;;; Code:
+
+(require 'compile)
+(require 'android-common)
+
+;; No need to be customized.
+(defvar android-compile-ignore-re
+  "\\(^\\(\\sw\\|[/_]\\)+\\(Makefile\\|\\.mk\\):[0-9]+:.*warning\\)\\|\\(^/bin/bash\\)"
+  "RE to match line to suppress during a compilation.
+During the compilation process line matching the above will be
+suppressed if `android-compilation-no-buildenv-warning' is non nil.")
+
+(defun android-makefile-exists-p (directory)
+  "Return t if an Android makefile exists in DIRECTORY."
+  ; Test for Android.mk first: more likely.
+  (or (file-exists-p (concat directory "Android.mk"))
+      (file-exists-p (concat directory "Makefile"))))
+
+(defun android-find-makefile (topdir)
+  "Ascend the current path until an Android makefile is found.
+Makefiles are named Android.mk except in the root directory where
+the file is named Makefile.
+TOPDIR is the root directory of the build.
+Return a list with 2 elements (MAKEFILE_PATH IS_ROOT_MAKEFILE).
+MAKEFILE_PATH is the relative path of the makefile wrt TOPDIR.
+Signal an error if no Makefile was found."
+  ;; TODO: Could check that topdir is the start of default-directory.
+  (unless (> (length topdir) 2)
+    (error "Topdir invalid %s for current dir %s" topdir default-directory))
+  (let ((default-directory default-directory)
+        file)
+    ;; Ascend the path.
+    (while (and (> (length default-directory) (length topdir))
+                (not (android-makefile-exists-p default-directory)))
+      (setq default-directory
+            (substring default-directory 0
+                       (string-match "[^/]+/$" default-directory))))
+
+    (when (not (android-makefile-exists-p default-directory))
+      (error "Not in a valid android tree"))
+
+    (if (string= default-directory topdir)
+        (list "Makefile" t)
+      ;; Remove the root dir at the start of the filename
+      (setq default-directory (substring default-directory (length topdir) nil))
+      (setq file (concat default-directory "Android.mk"))
+      (list file nil))))
+
+;; This filter is registered as a `compilation-filter-hook' and is
+;; called when new data has been inserted in the compile buffer. Don't
+;; assume that only one line has been inserted, typically more than
+;; one has changed since the last call due to stdout buffering.
+;; We store in a buffer local variable the process to detect a new
+;; compilation. We also store the point position to limit our
+;; search. On entry (point) is at the end of the last block inserted.
+(defun android-compile-filter ()
+  "Filter to discard unwanted lines from the compilation buffer.
+
+This filter is registered as a `compilation-filter-hook' and is
+called when new data has been inserted in the compile buffer.
+
+Has effect only if `android-compilation-no-buildenv-warning' is
+not nil."
+  ;; Currently we are looking only for compilation warnings from the
+  ;; build env. Move this test lower, near the while loop if we
+  ;; support more than one category of regexp.
+  (when android-compilation-no-buildenv-warning
+
+    ;; Check if android-compile-context does not exist or if the
+    ;; process has changed: new compilation.
+    (let ((proc (get-buffer-process (current-buffer))))
+      (unless (and (local-variable-p 'android-compile-context)
+                   (eq proc (cadr android-compile-context)))
+        (setq android-compile-context (list (point-min) proc))
+        (make-local-variable 'android-compile-context)))
+
+    (let ((beg (car android-compile-context))
+          (end (point)))
+      (save-excursion
+        (goto-char beg)
+        (while (search-forward-regexp android-compile-ignore-re end t)
+          ;; Nuke the line
+          (let ((bol (point-at-bol)))
+            (forward-line 1)
+            (delete-region bol (point)))))
+      ;; Remember the new end for next time around.
+      (setcar android-compile-context (point)))))
+
+(defun android-compile ()
+  "Elisp equivalent of mm shell function.
+Walk up the path until a makefile is found and build it.
+You need to have a proper buildspec.mk in your top dir.
+
+Use `android-compilation-jobs' to control the number of jobs used
+in a compilation."
+  (interactive)
+  (if (android-project-p)
+      (let* ((topdir (android-find-build-tree-root))
+             (makefile (android-find-makefile topdir))
+             (options
+              (concat " -j " (number-to-string android-compilation-jobs))))
+        (unless (file-exists-p (concat topdir "buildspec.mk"))
+          (error "buildspec.mk missing in %s." topdir))
+        ;; Add-hook do not re-add if already present. The compile
+        ;; filter hooks run after the comint cleanup (^M).
+        (add-hook 'compilation-filter-hook 'android-compile-filter)
+        (set (make-local-variable 'compile-command)
+             (if (cadr makefile)
+                 ;; The root Makefile is not invoked using ONE_SHOT_MAKEFILE.
+                 (concat "make -C " topdir options) ; Build the whole image.
+               (concat "ONE_SHOT_MAKEFILE=" (car makefile)
+                       " make -C " topdir options " files ")))
+        (if (interactive-p)
+            (call-interactively 'compile)))))
+
+(provide 'android-compile)
+
+;;; android-compile.el ends here
diff --git a/ide/emacs/android-host.el b/ide/emacs/android-host.el
new file mode 100644
index 0000000..d310e3a
--- /dev/null
+++ b/ide/emacs/android-host.el
@@ -0,0 +1,118 @@
+;;; android-host.el --- Module to use host binaries from an Android dev tree.
+;;
+;; Copyright (C) 2009 The Android Open Source Project
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;;      http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
+;;; Commentary:
+;;
+;; This module defines interactive functions to send the most common
+;; commands to a device.
+;;
+;; Currently only one device is supported.
+;;
+;; In your .emacs load this file (e.g (require 'android-host)) then
+;; you can either create new shortcuts e.g:
+;;
+;;   (global-set-key [f8] 'android-adb-sync)
+;;
+;; or rely on autocompletion M-x and-sync will expand to
+;; M-x  android-adb-sync
+;;
+;; By default the following key bindings are active:
+;; C-x a a android-adb-root
+;; C-x a r android-adb-remount
+;; C-x a s android-adb-sync
+;; C-x a b android-adb-shell-reboot-bootloader
+;; C-x a f android-fastboot-flashall
+;;
+;; android-fastboot-flashall is still work in progress, check the
+;; associated buffer (*Android Output*) for errors when you use it.
+
+;;; Code:
+
+(require 'android-common)
+
+(defvar android-host-command-map (make-sparse-keymap))
+
+(defun android-host-key-prefix-set (var val)
+  "Bind the keys shortcuts to the functions.i"
+  ;; TODO: This should go in a minor mode keymap instead of
+  ;; messing with the global one.
+  (define-key global-map (read-kbd-macro val) android-host-command-map)
+  (custom-set-default var val))
+
+(let ((map android-host-command-map))
+  (define-key map (kbd "a") 'android-adb-root)
+  (define-key map (kbd "r") 'android-adb-remount)
+  (define-key map (kbd "s") 'android-adb-sync)
+  (define-key map (kbd "b") 'android-adb-shell-reboot-bootloader)
+  (define-key map (kbd "f") 'android-fastboot-flashall))
+
+(defcustom android-host-key-prefix "C-x a"
+  "Prefix keystrokes for Android commands."
+  :group 'android
+  :type 'string
+  :set 'android-host-key-prefix-set)
+
+(defun android-adb-remount ()
+  "Execute 'adb remount'."
+  (interactive)
+  (android-adb-command "remount"))
+
+(defun android-adb-root ()
+  "Execute 'adb root'."
+  (interactive)
+  (android-adb-command "root"))
+
+(defun android-adb-shell-reboot-bootloader ()
+  "Execute 'adb shell reboot bootloader'."
+  (interactive)
+  (android-adb-shell-command "reboot bootloader"))
+
+(defun android-adb-sync ()
+  "Execute 'adb sync'."
+  (interactive)
+  (android-adb-command "sync" 'p))
+
+(defun android-fastboot-sentinel (process event)
+  "Called when the fastboot process is done."
+  ;; TODO: Should barf if the last lines are not:
+  ;;   OKAY
+  ;;   rebooting...
+  (princ
+   (format "Process: %s had the event `%s'" process event)))
+
+(defun android-fastboot-flashall (arg)
+  "Execute 'fastboot -p <product> flashall'.
+
+With no ARG, don't wipe the user data.
+With ARG, wipe the user data."
+  (interactive "P")
+  (when (get-buffer android-output-buffer-name)
+    (with-current-buffer android-output-buffer-name
+      (erase-buffer)))
+  (let ((proc
+         (if arg
+             (start-process-shell-command
+              "fastboot"
+              android-output-buffer-name
+              (concat (android-fastboot) " flashall -w"))
+           (start-process-shell-command
+            "fastboot" android-output-buffer-name
+            (concat (android-fastboot) " flashall")))))
+    (set-process-sentinel proc 'android-fastboot-sentinel)))
+
+
+(provide 'android-host)
+;;; android-host.el ends here
diff --git a/pdk/docs/compatibility/compatibility_toc.cs b/pdk/docs/compatibility/compatibility_toc.cs
new file mode 100644
index 0000000..3952495
--- /dev/null
+++ b/pdk/docs/compatibility/compatibility_toc.cs
@@ -0,0 +1,31 @@
+<script type="text/javascript" language="JavaScript">
+<!--
+function nothing() {}
+-->
+</script>
+
+<ul>
+  <li> <h2>Program Details </h2>
+  <ul>
+    <li><a href="">Program Overview</a></li>
+    <li><a href="">Getting Started</a></li>
+    <li><a href="">Contact Us</a></li>
+  </ul>
+  </li>
+
+  <li> <h2>Compatibility Tools </h2>
+  <ul>
+    <li><a href="">Compatibility Definition</a></li>
+    <li><a href="">Compatibility Test Suite</a></li>
+    <li><a href="">Compatibility FAQ</a></li>
+    <li><a href="">Downloads</a></li>
+  </ul>
+  </li>
+
+</ul>
+
+<script type="text/javascript">
+<!--
+    buildToggleLists();
+//-->
+</script>
diff --git a/pdk/docs/compatibility/index.jd b/pdk/docs/compatibility/index.jd
new file mode 100644
index 0000000..964fdf7
--- /dev/null
+++ b/pdk/docs/compatibility/index.jd
@@ -0,0 +1,11 @@
+home=true
+doc.type=compatibility
+@jd:body
+
+<div id="mainBodyFixed">
+
+<p>
+Compatibility start page goes here
+</p>
+
+</div>
diff --git a/pdk/docs/getsource/getsource_toc.cs b/pdk/docs/getsource/getsource_toc.cs
new file mode 100644
index 0000000..5332cdf
--- /dev/null
+++ b/pdk/docs/getsource/getsource_toc.cs
@@ -0,0 +1,26 @@
+<script type="text/javascript" language="JavaScript">
+<!--
+function nothing() {}
+-->
+</script>
+
+<ul>
+  <li> <h2>Work with the Code </h2>
+  <ul>
+    <li><a href="">...</a></li>
+  </ul>
+  </li>
+
+  <li> <h2>About the project </h2>
+  <ul>
+    <li><a href="">...</a></li>
+  </ul>
+  </li>
+
+</ul>
+
+<script type="text/javascript">
+<!--
+    buildToggleLists();
+//-->
+</script>
diff --git a/pdk/docs/getsource/index.jd b/pdk/docs/getsource/index.jd
new file mode 100644
index 0000000..08d1c25
--- /dev/null
+++ b/pdk/docs/getsource/index.jd
@@ -0,0 +1,11 @@
+home=true
+doc.type=getsource
+@jd:body
+
+<div id="mainBodyFixed">
+
+<p>
+Some new content about getting source goes here
+</p>
+
+</div>
diff --git a/pdk/docs/guide/pdk_toc.cs b/pdk/docs/guide/pdk_toc.cs
index d1493e6..f829d43 100644
--- a/pdk/docs/guide/pdk_toc.cs
+++ b/pdk/docs/guide/pdk_toc.cs
@@ -16,6 +16,7 @@
      </ul>
      </li>
      <li><a href="<?cs var:toroot ?>guide/release_keys.html">Release Keys and Signing Builds</a></li> 
+     <li><a href="<?cs var:toroot ?>guide/release_checklist.html">Release Checklist</a></li>
  </ul>
 </li>
 
diff --git a/pdk/docs/guide/release_checklist.jd b/pdk/docs/guide/release_checklist.jd
new file mode 100755
index 0000000..37fb53d
--- /dev/null
+++ b/pdk/docs/guide/release_checklist.jd
@@ -0,0 +1,119 @@
+page.title=Release Checklist

+pdk.version=1.0

+doc.type=guide

+@jd:body

+<div id="qv-wrapper">

+  <div id="qv">

+    <h2>In this document</h2>

+    <a name="toc"/>

+    <ul>

+      <li><a href="#prodCertificates">Production Certificates</a></li>

+      <li><a href="#roSecure">ro.secure Property</a></li>

+      <li><a href="#systemImage">System Image and dex files</a></li>

+      <li><a href="#zygote">Zygote</a></li>

+      <li><a href="#memory">Memory</a></li>

+      <li><a href="#resourceLeaks">Resource Links</a></li>

+    </ul>

+  </div>

+</div>

+<p>This page lists some key points you should verify before releasing your Android device. This document assumes that you have made only minor changes, if any, to the basic software platform.</p>

+<h3><a name="prodCertificates" id="prodCertificates"></a>Production Certificates</h3>

+<p>The Android build system generates a system image with <code>.apks</code> signed by its test keys. This is insecure because the keys are made public in Android source code.  You should resign all <code>.apks</code>, especially the framework itself, with your own private keys.</p>

+<h3><a name="roSecure" id="roSecure"></a>ro.secure Property</h3>

+<p>Configure production builds with <code>ro.secure</code> set to <code>1</code>.  Without securing the device in this manner, someone could access a locked device. </p>

+<h3><a name="systemImage" id="systemImage"></a>System Image and dex files</h3>

+<p>Development builds place basic <code>.apks</code> in <code>/system/app</code>, which means that at first boot, the system must run <code>dexopt</code> on each <code>.apks</code> and generate the corresponding <code>.odex</code> files in <code>/data/dalvik-cache</code>.  To avoid long bootups and to save the user's space, create a production image in which the build system does the <code>dexopt</code> at build time and places <code>.odex</code> files next to their corresponding <code>.apks</code> and strips the original <code>.dex</code> from them.</p>

+<h3><a name="zygote" id="systemImage2"></a>Zygote</h3>

+<p>Tune the zygote process if you add your own classes or resources to the core framework libraries and you use those classes and resources in multiple applications. It can be challenging to determine what should and what should not get preloaded, and it's best to choose conservatively. A good candidate for preload might be framework code you add for use when a UI is displayed.</p>

+<p>The zygote process is important for reducing the amount of memory consumed across the entire system. The base Android system is already reasonably configured, and you only need to consider this if you have made significant changes.</p>

+<h3><a name="memory" id="systemImage3"></a>Memory</h3>

+<p>Memory is a key factor for determining optimal performance. A good basic metric to consider is the size and number of processes after first boot. The example below illustrates:</p>

+<ul><li>the contents of <code>/proc/meminfo</code>, which shows the basic memory of the device</li>

+<li>typical output of <code>procrank</code> after first boot on Android 1.5.</li>

+</ul>

+<pre>

+# cat /proc/meminfo

+MemTotal:          98592 kB

+MemFree:            1564 kB

+Buffers:            5688 kB

+Cached:            24468 kB

+SwapCached:            0 kB

+Active:            39768 kB

+Inactive:          43372 kB

+

+# procrank

+  PID      Vss      Rss      Pss      Uss  cmdline

+   71   33704K   24488K   12033K   10364K  system_server

+<strong>  118   28708K   20516K    8085K    6588K  android.process.acore

+  167   19352K   19352K    7184K    5880K  com.google.process.gapps

+  112   17816K   17816K    6222K    5280K  com.android.phone

+  198   16416K   16416K    5002K    3828K  com.google.android.apps.maps:FriendService

+  174   16060K   16060K    4635K    3776K  android.process.media

+  228   16308K   16308K    4288K    3244K  com.android.calendar

+</strong>   48   16212K   16212K    3396K    1788K  zygote

+<strong>  212   14964K   14964K    3146K    2004K  android.process.im

+  147   14116K   14116K    2907K    1964K  com.android.mms

+  286   13856K   13856K    2506K    1552K  com.google.android.gm

+  141   13516K   13516K    2425K    1524K  com.tmobile.myfaves

+  261   13664K   13664K    2295K    1400K  com.android.alarmclock

+  273   12976K   12976K    2069K    1168K  com.android.music

+  246   12488K   12488K    1845K    1072K  com.google.android.partnersetup

+  219   12360K   12360K    1808K    1008K  com.android.voicedialer

+</strong>   49    1464K    1464K    1021K     996K  /system/bin/mediaserver

+   47     624K     624K     394K     380K  /system/bin/rild

+  301     536K     536K     384K     336K  procrank

+   53     432K     432K     252K     244K  /system/bin/akmd

+  300     316K     316K     187K     140K  /system/bin/sh

+    1     180K     180K     162K     160K  /init

+   54     148K     148K     148K     148K  /sbin/adbd

+   45     244K     244K     110K     104K  /system/bin/vold

+   50     252K     252K      97K      88K  /system/bin/dbus-daemon

+   44     156K     156K      82K      80K  /system/bin/servicemanager

+   51     180K     180K      76K      72K  /system/bin/installd

+   46     144K     144K      63K      60K  /system/bin/debuggerd

+</pre>

+<p>This example is for a device with nearly 100MB available to the kernel. There are 14 application processes, highlighted in bold, able to run with 24MB of RAM remaining in cache. </p>

+<p>The per-process overhead of a Java process is 1-1.8MB (the <code>Uss</code> and <code>Pss</code> sections of the smallest process). This is an important number to track because it has a large impact on the number of concurrent processes that can run, and thus on the overall behavior of the system.  You should consider the numbers here as a low bar for what a running Android device should look like.</p>

+<p>These numbers may vary depending on your device and are intended to provide ballpark figures. </p>

+<h3><a name="resourceLeaks" id="systemImage4"></a>Resource Leaks</h3>

+<p>Android is designed to run for months without rebooting, and you should check for resource leaks that might damage or harm system performance over that amount of time.</p>

+<p>The two main kinds of leaks you might encounter are memory and file descriptors. </p>

+<p><strong>Memory Leaks</strong></p>

+<p>Focus particular attention on persistent processes like: </p>

+  <ul>

+  <li><code>system_server</code>: holds all of the core system services such as the window manager and activity manager</li>

+  <li><code>android.process.acore</code>: holds the core UI such as home, contacts, and the LatinIME</li>

+  <li><code>com.android.phone</code>: holds the user space telephone code and UI.&nbsp;</li></ul>

+<p>Also pay attention to the lower-level system processes, such as the mediaserver, rild, and the kernel as well as any custom drivers or other modifications you may have made.</p>

+<p>Leaks in these processes are especially serious because these processes can't be restarted without rebooting the phone. In most other processes, leaks are less problematic because the system will naturally kill and restart such processes during normal interaction with the phone, incidentally cleaning out potential leaks.</p>

+<p>The basic approach to looking for leaks is running the device with regular use of all features for a long period of time. You can also use a device in accelerated use, such as under the monkey command, for a shorter period of time.&nbsp; After use, look at the current state of the system to see if there is any unexpected growth in the use of any resource in these processes.</p>

+<p>For memory, the <code>procrank</code> command provides an initial verification. If a process hasn't grown excessively since first boot, it should be fine.&nbsp; Some growth is to be expected due to memory fragmentation.&nbsp; Here is the typical output of <code>procrank</code> after running for a while: </p>

+<pre>

+# procrank

+  PID      Vss      Rss      Pss      Uss  cmdline

+   83   44768K   27360K   18071K   16608K  system_server

+ 5780   32672K   24480K   14822K   13224K  android.process.acore

+  128   25936K   17744K    8420K    7208K  com.android.phone

+ 5787   17004K   17004K    7731K    6284K  com.google.process.gapps

+  205   21356K   13164K    4438K    3376K  com.android.inputmethod.latin

+10094   22184K   13992K    4051K    2676K  com.android.settings

+10285   13156K   13156K    3714K    2408K  android.process.media

+10224   13140K   13140K    3332K    1852K  com.google.android.gm

+10310   12444K   12444K    3017K    1516K  com.tmobile.myfaves

+   54    9152K    9152K    1811K     880K  zygote

+   55    1568K    1568K    1268K    1228K  /system/bin/mediaserver

+   53     636K     636K     435K     420K  /system/bin/rild

+10329     492K     492K     338K     288K  procrank

+   60     352K     352K     226K     220K  /system/bin/akmd

+10328     320K     320K     188K     140K  /system/bin/sh

+   61     200K     200K     188K     188K  /sbin/adbd

+    1     196K     196K     177K     176K  /init

+   51     268K     268K     132K     124K  /system/bin/vold

+   56     216K     216K     105K     100K  /system/bin/dbus-daemon

+   50     164K     164K      83K      80K  /system/bin/servicemanager

+   57     204K     204K      78K      72K  /system/bin/installd

+   59     164K     164K      76K      72K  /system/bin/keystore

+   52     152K     152K      64K      60K  /system/bin/debuggerd

+</pre>

+<p><strong>Descriptor Files</strong></p>

+<p>For file descriptors, look at the currently opened file descriptors with <code>adb shell ls -l /proc/&lt;pid&gt;/fd</code>.  Your shell must be running as root to execute this&#151;use <code>adb root</code> to restart your system as root.  Comparing before and after output will reveal leaks that happened during the test time.</p>

diff --git a/pdk/docs/index.jd b/pdk/docs/index.jd
index 4175db7..d7077d5 100644
--- a/pdk/docs/index.jd
+++ b/pdk/docs/index.jd
@@ -36,25 +36,6 @@
                               <tr>
                                       <td colspan="2"><div class="seperator">&nbsp;</div></td>
                               </tr>
-                              <tr>
-                                      <td class="imageCell"><a href="http://source.android.com"><img src="{@docRoot}assets/images/icon_contribute.jpg" style="padding:0" /></a></td>
-                                      <td>
-                                              <h2 class="green">Contribute</h2>
-                                              <p>Android Open Source Project gives you access to the entire platform source.</p>
-                                              <p><a href="http://source.android.com">Learn more &raquo;</a></p>
-                                      </td>
-                              </tr>
-                              <tr>
-                                      <td colspan="2"><div class="seperator">&nbsp;</div></td>
-                              </tr>
-                              <tr>
-                                      <td class="imageCell"><a href="http://www.youtube.com/user/androiddevelopers"><img src="{@docRoot}assets/images/video-droid.png" style="padding:0" /></a></td>
-                                      <td>
-                                              <h2 class="green">Watch</h2>
-                                              <object width="150" height="140"><param name="movie" value="http://www.youtube.com/v/GARMe7Km_gk&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GARMe7Km_gk&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="150" height="140"></embed></object>
-                                              <p style="margin-top:1em"><a href="{@docRoot}videos/index.html">More Android videos &raquo;</a></p>
-                                      </td>
-                              </tr>
 
                       </table>
               </div>
diff --git a/samples/LunarLander/AndroidManifest.xml b/samples/LunarLander/AndroidManifest.xml
index 7fdc572..301291a 100644
--- a/samples/LunarLander/AndroidManifest.xml
+++ b/samples/LunarLander/AndroidManifest.xml
@@ -22,11 +22,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.example.android.lunarlander">
     <application android:icon="@drawable/app_lunar_lander" android:label="@string/app_name">
-        <activity android:name="LunarLander">
+        <activity android:name="LunarLander" android:theme="@android:style/Theme.NoTitleBar">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
-		</activity>
+        </activity>
     </application>
 </manifest>
diff --git a/samples/LunarLander/src/com/example/android/lunarlander/LunarLander.java b/samples/LunarLander/src/com/example/android/lunarlander/LunarLander.java
index 7f54ff6..a4ffef5 100644
--- a/samples/LunarLander/src/com/example/android/lunarlander/LunarLander.java
+++ b/samples/LunarLander/src/com/example/android/lunarlander/LunarLander.java
@@ -124,9 +124,6 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        // turn off the window's title bar
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-
         // tell system to use the layout defined in our XML file
         setContentView(R.layout.lunar_layout);
 
diff --git a/samples/Snake/AndroidManifest.xml b/samples/Snake/AndroidManifest.xml
index 174e8b4..36a9939 100644
--- a/samples/Snake/AndroidManifest.xml
+++ b/samples/Snake/AndroidManifest.xml
@@ -23,6 +23,7 @@
     package="com.example.android.snake">
     <application android:label="Snake on a Phone">
       <activity android:name="Snake"
+        android:theme="@android:style/Theme.NoTitleBar"
         android:screenOrientation="portrait"
         android:configChanges="keyboardHidden|orientation">
             <intent-filter>
diff --git a/samples/Snake/src/com/example/android/snake/Snake.java b/samples/Snake/src/com/example/android/snake/Snake.java
index 5fdc024..6306693 100644
--- a/samples/Snake/src/com/example/android/snake/Snake.java
+++ b/samples/Snake/src/com/example/android/snake/Snake.java
@@ -45,9 +45,6 @@
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        // No Title bar
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-
         setContentView(R.layout.snake_layout);
 
         mSnakeView = (SnakeView) findViewById(R.id.snake);
diff --git a/simulator/app/PropertyServer.cpp b/simulator/app/PropertyServer.cpp
index c94aa75..7a211ea 100644
--- a/simulator/app/PropertyServer.cpp
+++ b/simulator/app/PropertyServer.cpp
@@ -121,7 +121,6 @@
         { "init.svc.dbus", "running" },
         { "init.svc.pppd_gprs", "running" },
         { "adb.connected", "0" },
-        //{ "use-adb-networking", "1" },
         /*
         { "status.battery.state", "Slow" },
         { "status.battery.level", "5" },