Merge "docs: fix broken links" into jb-dev
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 0038fac..df97855 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -2,21 +2,21 @@
 header.hide=1
 page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
 
-sdk.win_installer=installer_r20-windows.exe
-sdk.win_installer_bytes=70497095
-sdk.win_installer_checksum=0f25321554e2f88b247320d6a3bc1a7a
+sdk.win_installer=installer_r20.0.1-windows.exe
+sdk.win_installer_bytes=70486979
+sdk.win_installer_checksum=a8df28a29c7b8598e4c50f363692256d
 
-sdk.win_download=android-sdk_r20-windows.zip
-sdk.win_bytes=90353014
-sdk.win_checksum=b62b0f80f559c0ac670e9f058a21f0df
+sdk.win_download=android-sdk_r20.0.1-windows.zip
+sdk.win_bytes=90370975
+sdk.win_checksum=5774f536892036f87d3bf6502862cea5
 
-sdk.mac_download=android-sdk_r20-macosx.zip
-sdk.mac_bytes=58203018
-sdk.mac_checksum=b6b6035ccec55ec2aa057438eb1db1f4
+sdk.mac_download=android-sdk_r20.0.1-macosx.zip
+sdk.mac_bytes=58217336
+sdk.mac_checksum=cc132d04bc551b23b0c507cf5943df57
 
-sdk.linux_download=android-sdk_r20-linux.tgz
-sdk.linux_bytes=82589455
-sdk.linux_checksum=22a81cf1d4a951c62f71a8758290e9bb
+sdk.linux_download=android-sdk_r20.0.1-linux.tgz
+sdk.linux_bytes=82607616
+sdk.linux_checksum=cd7176831087f53e46123dd91551be32
 
 @jd:body
 
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index b276da4..60f67a2 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,9 +1,9 @@
 page.title=Installing the Eclipse Plugin
 walkthru=1
-adt.zip.version=20.0.0
-adt.zip.download=ADT-20.0.0.zip
-adt.zip.bytes=12387628
-adt.zip.checksum=ea0fc934af3b6b89097f0146c7822ed0
+adt.zip.version=20.0.1
+adt.zip.download=ADT-20.0.1.zip
+adt.zip.bytes=12387574
+adt.zip.checksum=6ebd7f8566bfd2cd031b07d56d49542d
 
 @jd:body
 
diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd
index db0cbab..6163fbc 100644
--- a/docs/html/tools/revisions/platforms.jd
+++ b/docs/html/tools/revisions/platforms.jd
@@ -36,6 +36,107 @@
 
 
 
+
+<h2 id="4.1">Android 4.1</h2>
+
+
+<p class="caution"><strong>Important:</strong> To download the new Android
+4.0.x system components from the Android SDK Manager, you must first update the
+SDK tools to revision 20 or later and restart the Android SDK Manager. If you do not,
+the Android 4.1 system components will not be available for download.</p>
+
+<div class="toggle-content opened">
+
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-opened.png"
+class="toggle-content-img" alt="" />Revision 2</a> <em>(July 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <p>Maintenance update. The system version is 4.1.1.</p>
+    <dl>
+      <dt>Dependencies:</dt>
+      <dd>SDK Tools r20 or higher is required.</dd>
+    </dl>
+
+  </div>
+</div>
+
+<div class="toggle-content closed" >
+
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />Revision 1</a> <em>(June 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <p>Initial release. The system version is 4.1.0.</p>
+    <dl>
+      <dt>Dependencies:</dt>
+      <dd>SDK Tools r20 or higher is required.</dd>
+    </dl>
+
+  </div>
+</div>
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skins:</p>
+
+<ul>
+  <li>
+    QVGA (240x320, low density, small screen)
+  </li>
+  <li>
+    WQVGA400 (240x400, low density, normal screen)
+  </li>
+  <li>
+    WQVGA432 (240x432, low density, normal screen)
+  </li>
+  <li>
+    HVGA (320x480, medium density, normal screen)
+  </li>
+  <li>
+    WVGA800 (480x800, high density, normal screen)
+  </li>
+  <li>
+    WVGA854 (480x854 high density, normal screen)
+  </li>
+  <li>
+    WXGA720 (1280x720, extra-high density, normal screen)
+  </li>
+  <li>
+    WSVGA (1024x600, medium density, large screen)
+  </li>
+  <li>
+    WXGA800-7in (1280x800, high density, large screen) <span class="new">new</span>
+  </li>
+  <li>
+    WXGA800 (1280x800, medium density, xlarge screen)
+  </li>
+</ul>
+
+<p>To test your application on an emulator that represents the <a
+href="http://play.google.com/nexus7">Nexus 7</a> tablet device, you can create an AVD with
+the new WXGA800-7in skin. For best performance, make sure to enable <a
+href="{@docRoot}tools/devices/emulator.html#accel-graphics">graphics acceleration</a> in the
+emulator configuration.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 <h2 id="4.0.3">Android 4.0.3</h2>
 
 
@@ -44,10 +145,10 @@
 SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
 the Android 4.0.x system components will not be available for download.</p>
 
-<div class="toggle-content opened">
+<div class="toggle-content closed">
 
   <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/triangle-opened.png"
+    <img src="{@docRoot}assets/images/triangle-closed.png"
 class="toggle-content-img" alt="" />Revision 3</a> <em>(March 2012)</em>
   </p>
 
@@ -135,15 +236,6 @@
   </li>
 </ul>
 
-<p>To test your application on an emulator that represents the latest Android device, you can create
-an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
-currently doesn't support the new on-screen navigation bar for devices without hardware navigation
-buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
-<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
-
-<p>However, due to performance issues in the emulator when running high-resolution screens such as
-the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
-(hdpi, normal screen) to test your application.</p>
 
 
 
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index aa21423..947e463 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -95,7 +95,47 @@
 
 <div class="toggleable opened">
   <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
+  <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
+    width="9px" />
+ADT 20.0.1</a> <em>(June 2012)</em>
+  <div class="toggleme">
+<dl>
+  <dt>Dependencies:</dt>
+
+  <dd>
+    <ul>
+      <li>Java 1.6 or higher is required for ADT 20.0.1.</li>
+      <li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 20.0.1.</li>
+      <li>ADT 20.0.1 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK
+      Tools r20.0.1</a>. If you haven't already installed SDK Tools r20.0.1 into your SDK, use the
+      Android SDK Manager to do so.</li>
+    </ul>
+  </dd>
+
+  <dt>Bug fixes:</dt>
+  <dd>
+    <ul>
+      <li>Fixed issue in the New Project Wizard related to installation of the Support Library.</li>
+      <li>Fixed several issues with New Project Wizard related to templates.</li>
+      <li>Fixed issue with the text-based launcher icon in New Project Wizard.</li>
+      <li>Fixed issue with sticky error markers in Java files.</li>
+      <li>Fixed problem with manifest merger when exporting release {@code .apk} files.</li>
+      <li>Fixed NDK support to automatically find include path on Windows.</li>
+      <li>Fixed editor startup exception for new configurations where editor would come up blank.</li>
+      <li>Added support for {@code xxhdpi} density, which was included in API Level 16.</li>
+      <li>Fixed a bug in the {@code lint} check for unprotected broadcast receivers to ignore
+unprotected receivers for default Android actions.</li>
+    </ul>
+  </dd>
+
+</dl>
+
+</div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
 width="9px" />
 ADT 20.0.0</a> <em>(June 2012)</em>
   <div class="toggleme">
@@ -325,7 +365,7 @@
     <ul>
       <li>Fixed problem using Layout Editor with {@link android.widget.SlidingDrawer} which could
         not be dragged into the layout on some platforms.</li>
-      <li>Fixed preview rendering for {@link android.widget.SlidingDrawer} and 
+      <li>Fixed preview rendering for {@link android.widget.SlidingDrawer} and
         {@link android.widget.TabHost}.
         (<a href="http://code.google.com/p/android/issues/detail?id=23022">Issue 23022</a>).</li>
       <li>Fixed issues that could prevent layout rendering due to unresolvable resources.
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index 6be3168..216a304 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
 ndk=true
 
-ndk.win_download=android-ndk-r8-windows.zip
-ndk.win_bytes=109928336
-ndk.win_checksum=37b1a2576f28752fcc09e1b9c07e3f14
+ndk.win_download=android-ndk-r8b-windows.zip
+ndk.win_bytes=188724991
+ndk.win_checksum=6d290d4f2729ef2063c5ae5b1e335622
 
-ndk.mac_download=android-ndk-r8-darwin-x86.tar.bz2
-ndk.mac_bytes=96650992
-ndk.mac_checksum=81ce5de731f945692123b377afe0bad9
+ndk.mac_download=android-ndk-r8b-darwin-x86.tar.bz2
+ndk.mac_bytes=181255568
+ndk.mac_checksum=94fe392194ea41f8a70cfce0dee3870f
 
-ndk.linux_download=android-ndk-r8-linux-x86.tar.bz2
-ndk.linux_bytes=88310791
-ndk.linux_checksum=5c9afc9695ad67c61f82fbf896803c05
+ndk.linux_download=android-ndk-r8b-linux-x86.tar.bz2
+ndk.linux_bytes=160466240
+ndk.linux_checksum=6694ccc04d543500f0661a75f6c46526
 
 page.title=Android NDK
 
@@ -41,7 +41,7 @@
       </ol>
     </div>
   </div>
-  
+
   <p>The NDK is a toolset that allows you to implement parts
   of your app using native-code languages such as C and C++. For certain types of apps,
   this can be helpful so that you may reuse existing code libraries written in these
@@ -62,12 +62,12 @@
 
 <h2 id="Downloads">Downloads</h2>
 
-  
+
 <script>
 $('#Downloads').after($('#download-table'));
 </script>
-  
-  
+
+
 <h2 id="Revisions">Revisions</h2>
 
 <p>The sections below provide information and notes about successive releases of
@@ -115,12 +115,204 @@
 <div class="toggleable open">
   <a href="#" onclick="return toggleDiv(this)"><img src=
   "{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px">
+  Android NDK, Revision 8b</a> <em>(July 2012)</em>
+
+  <div class="toggleme">
+    <p>The main features of this release are a new GNU Compiler Collection (GCC) 4.6 toolchain and
+GNU Debugger (GDB) 7.3.x which adds debugging support for the Android 4.1 (API Level 16) system
+image.</p>
+
+    <dl>
+      <dt>Important bug fixes:</dt>
+
+      <dd>
+        <ul>
+          <li>Fixed {@code LOCAL_SHORT_COMMANDS} issues on Mac OS, Windows Cygwin environments for
+static libraries. List file generation is faster, and it is not regenerated to avoid repeated
+project rebuilds.</li>
+          <li>Fixed several issues in {@code ndk-gdb}:
+            <ul>
+              <li>Updated tool to pass flags {@code -e}, {@code -d} and {@code -s} to adb more
+consistently.</li>
+              <li>Updated tool to accept device serial names containing spaces.</li>
+              <li>Updated tool to retrieve {@code /system/bin/link} information, so {@code gdb} on
+the host can set a breakpoint in {@code __dl_rtld_db_dlactivity} and be aware of linker activity
+(e.g., rescan {@code solib} symbols when {@code dlopen()} is called).</li>
+            </ul>
+          </li>
+          <li>Fixed {@code ndk-build clean} on Windows, which was failing to remove
+{@code ./libs/*/lib*.so}.</li>
+          <li>Fixed {@code ndk-build.cmd} to return a non-zero {@code ERRORLEVEL} when {@code make}
+fails.</li>
+          <li>Fixed {@code libc.so} to stop incorrectly exporting the {@code __exidx_start} and
+{@code __exidx_end} symbols.</li>
+          <li>Fixed {@code SEGV} when unwinding the stack past {@code __libc_init} for ARM and
+MIPS.</li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Important changes:</dt>
+
+      <dd>
+        <ul>
+          <li>Added GCC 4.6 toolchain ({@code binutils} 2.21 with {@code gold} and GDB 7.3.x) to
+co-exist with the original GCC 4.4.3 toolchain ({@code binutils} 2.19 and GDB 6.6).</p>
+            <ul>
+              <li>GCC 4.6 is now the default toolchain. You may set {@code
+NDK_TOOLCHAIN_VERSION=4.4.3} in {@code Android.mk} to select the original one.</li>
+              <li>Support for the {@code gold} linker is only available for ARM and x86
+architectures on Linux and Mac OS hosts. This support is disabled by default. Add {@code
+LOCAL_C_FLAGS += -fuse-ld=gold} in {@code Android.mk} to enable it.</li>
+              <li>Programs compiled with {@code -fPIE} require the new {@code GDB} for debugging,
+including binaries in Android 4.1 (API Level 16) system images.</li>
+              <li>The {@code binutils} 2.21 {@code ld} tool contains back-ported fixes from
+version 2.22:
+                <ul>
+                  <li>Fixed {@code ld --gc-sections}, which incorrectly retains zombie references to
+external libraries. (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=13177">more
+info</a>).</li>
+                  <li>Fixed ARM {@code strip} command to preserve the original {@code p_align} and
+{@code p_flags} in {@code GNU_RELRO} section if they are valid. Without this fix, programs
+built with {@code -fPIE} could not be debugged. (<a
+href="http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.552&r2=1.553">more info</a>)</li>
+                </ul>
+              </li>
+              <li>Disabled {@code sincos()} optimization for compatibility with older
+                platforms.</li>
+            </ul>
+          </li>
+
+          <li>Updated build options to enable the Never eXecute (NX) bit and {@code relro}/{@code
+bind_now} protections by default:
+            <ul>
+              <li>Added {@code --noexecstack} to assembler and {@code -z noexecstack} to linker
+that provides NX protection against buffer overflow attacks by enabling NX bit on stack and
+heap.</li>
+              <li>Added {@code -z relro} and  {@code -z now} to linker for hardening of internal
+data sections after linking to guard against security vulnerabilities caused by memory corruption.
+(more info: <a href="http://www.akkadia.org/drepper/nonselsec.pdf">1</a>,
+<a href="http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html">2</a>)</li>
+
+              <li>These features can be disabled using the following options:
+                <ol>
+                  <li>Disable NX protection by setting the {@code --execstack} option for the
+assembler and {@code -z execstack} for the linker.</li>
+                  <li>Disable hardening of internal data by setting the {@code -z norelro} and
+{@code -z lazy} options for the linker.</li>
+                  <li>Disable these protections in the NDK {@code jni/Android.mk} by setting the
+following options:
+<pre>
+LOCAL_DISABLE_NO_EXECUTE=true  # disable "--noexecstack" and "-z noexecstack"
+DISABLE_RELRO=true             # disable "-z relro" and "-z now"</li>
+</pre>
+                </ol>
+                <p>See {@code docs/ANDROID-MK.html} for more details.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>Added branding for Android executables with the {@code .note.ABI-tag} section (in
+{@code crtbegin_static/dynamic.o}) so that debugging tools can act accordingly. The structure
+member and values are defined as follows:</p>
+<pre>
+static const struct {
+  int32_t namesz;  /* = 4,  sizeof ("GNU") */
+  int32_t descsz;  /* = 6 * sizeof(int32_t) */
+  int32_t type;    /* = 1 */
+  char  name[sizeof "GNU"];  /* = "GNU" */
+  int32_t os;      /* = 0 */
+  int32_t major;   /* = 2 */
+  int32_t minor;   /* = 6 */
+  int32_t teeny;   /* = 15 */
+  int32_t os_variant;  /* = 1 */
+  int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */
+}</pre>
+          </li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Other bug fixes:</dt>
+
+      <dd>
+        <ul>
+          <li>Fixed {@code mips-linux-gnu} relocation truncated to fit {@code R_MIPS_TLS_LDM} issue.
+            (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12637">more info</a>)</li>
+          <li>Fixed {@code ld} tool segfaults when using {@code --gc-sections}.
+            (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12845">more info</a>)
+          </li>
+          <li>Fixed MIPS {@code GOT_PAGE} counting issue.
+            (<a href="http://sourceware.org/ml/binutils/2011-05/msg00198.html">more info</a>)</li>
+          <li>Fixed follow warning symbol link for {@code mips_elf_count_got_symbols}.</li>
+          <li>Fixed follow warning symbol link for {@code mips_elf_allocate_lazy_stub}.</li>
+          <li>Moved MIPS {@code .dynamic} to the data segment, so that it is writable.</li>
+          <li>Replaced hard-coded values for symbols with correct segment sizes for MIPS.</li>
+          <li>Removed the {@code -mno-shared} option from the defaults in the MIPS toolchain.
+The default for Android toolchain is {@code -fPIC} (or {@code -fpic} if supported). If you do not
+explicitly specify {@code -mshared}, {@code -fpic}, {@code -fPIC}, {@code -fpie}, or {@code -fPIE},
+the MIPS compiler adds {@code -mno-shared} that turns off PIC. Fixed compiler not to add
+{@code -mno-shared} in this case.</li>
+          <li>Fixed wrong package names in samples {@code hello-jni} and {@code two-libs} so that
+the {@code tests} project underneath it can compile.</li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Other Changes:</dt>
+
+      <dd>
+        <ul>
+          <li>Changed locations of binaries:
+            <ul>
+              <li>Moved {@code gdbserver} from
+{@code toolchain/&lt;arch-os-ver&gt;/prebuilt/gdbserver} to
+{@code prebuilt/android-&lt;arch&gt;/gdbserver/gdbserver}.</li>
+              <li>Renamed x86 toolchain prefix from {@code i686-android-linux-} to
+{@code i686-linux-android-}.</li>
+              <li>Moved {@code sources/cxx-stl/gnu-libstdc++/include} and {@code lib} to
+{@code sources/cxx-stl/gnu-libstdc++/4.6} when compiled with GCC 4.6, or
+{@code sources/cxx-stl/gnu-libstdc++/4.4.3} when compiled with GCC 4.4.3.</li>
+              <li>Moved {@code libbfd.a} and {@code libintl.a} from {@code lib/} to {@code
+lib32/}.</li>
+            </ul>
+          </li>
+
+          <li>Added and improved various scripts in the rebuild and test NDK toolchain:
+            <ul>
+              <li>Added {@code build-mingw64-toolchain.sh} to generate a new Linux-hosted toolchain
+that generates Win32 and Win64 executables.</li>
+              <li>Improved speed of {@code download-toolchain-sources.sh} by using the {@code
+clone} command and only using {@code checkout} for the directories that are needed to build the NDK
+toolchain binaries.</li>
+              <li>Added {@code build-host-gcc.sh} and {@code build-host-gdb.sh} scripts.</li>
+              <li>Added {@code tests/check-release.sh} to check the content of a given NDK
+installation directory, or an existing NDK package.</li>
+              <li>Rewrote the {@code tests/standalone/run.sh} standalone tests .</li>
+            </ul>
+          </li>
+          <li>Removed {@code if_dl.h} header from all platforms and architectures. The {@code
+AF_LINK} and {@code sockaddr_dl} elements it describes are specific to BSD (i.e., they don't exist
+in Linux).</li>
+        </ul>
+      </dd>
+    </dl>
+
+  </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)"><img src=
+  "{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px">
   Android NDK, Revision 8</a> <em>(May 2012)</em>
 
   <div class="toggleme">
     <p>This release of the NDK includes support for MIPS ABI and a few additional fixes.</p>
 
-    </dl>
+    <dl>
       <dt>New features:</dt>
 
       <dd>
@@ -910,7 +1102,7 @@
                 as well as control over platform audio effects</li>
 
                 <li>Access to assets packaged in an <code>.apk</code> file.</li>
-                
+
               </ul>
             </li>
 
@@ -927,7 +1119,7 @@
             <li>Provides a default C++ STL implementation (based on STLport) as a helper module. It can be used either
             as a static or shared library (details and usage examples are in sources/android/stlport/README). Prebuilt
             binaries for STLport (static or shared) and GNU libstdc++ (static only) are also provided if you choose to
-            compile against those libraries instead of the default C++ STL implementation. 
+            compile against those libraries instead of the default C++ STL implementation.
             C++ Exceptions and RTTI are not supported in the default STL implementation. For more information, see
             docs/CPLUSPLUS-SUPPORT.HTML.</li>
 
@@ -938,8 +1130,8 @@
 
             <li>Adds an EGL library that lets you create and manage OpenGL ES textures and
               services.</li>
-                
-            <li>Adds new sample applications, <code>native-plasma</code> and <code>native-activity</code>, 
+
+            <li>Adds new sample applications, <code>native-plasma</code> and <code>native-activity</code>,
             to demonstrate how to write a native activity.</li>
 
             <li>Includes many bugfixes and other small improvements; see docs/CHANGES.html for a more
@@ -1103,25 +1295,25 @@
       </dl>
     </div>
   </div>
-  
-  
-  
-  
-  
+
+
+
+
+
 <!-- ####################### END OF RELEASE NOTES ####################### -->
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -1287,32 +1479,32 @@
     android:minSdkVersion="8" /&gt;</code> attribute value in its manifest.</li>
   </ul>
 
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
 
 
 
-  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
   <h2 id="Installing">Installing the NDK</h2>
   <p>Installing the NDK on your development computer is straightforward and involves extracting the
   NDK from its download package.</p>
@@ -1339,7 +1531,7 @@
 
   <p>You are now ready to start working with the NDK.</p>
 
-  
+
 <h2 id="GetStarted">Getting Started with the NDK</h2>
 
 <p>Once you've installed the NDK successfully, take a few minutes to read the documentation
@@ -1402,13 +1594,13 @@
     to use them or any other framework API, you can still write JNI code to do so.</p>
   </li>
 </ul>
-  
-  
-  
-  
-  
+
+
+
+
+
   <h2 id="Contents">Contents of the NDK</h2>
-  
+
   <p>The NDK contains the APIs, documentation, and sample
   applications that help you write your native code. Specifically:</p>
 
@@ -1478,9 +1670,9 @@
     <li>libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).</li>
 
     <li>A Minimal set of headers for C++ support</li>
-    
+
     <li>OpenSL ES native audio libraries</li>
-    
+
     <li>Android native application APIS</li>
   </ul>
 
@@ -1510,13 +1702,13 @@
     system</li>
 
     <li>OVERVIEW.HTML &mdash; provides an overview of the NDK capabilities and usage</li>
-    
+
     <li>ANDROID-MK.HTML &mdash; describes the use of the Android.mk file, which defines the native
     sources you want to compile</li>
-    
+
     <li>APPLICATION-MK.HTML &mdash; describes the use of the Application.mk file, which describes
-    the native sources required by your Android application</li>    
-    <li>CPLUSPLUS-SUPPORT.HTML &mdash; describes the C++ support provided in the Android NDK</li>    
+    the native sources required by your Android application</li>
+    <li>CPLUSPLUS-SUPPORT.HTML &mdash; describes the C++ support provided in the Android NDK</li>
     <li>CPU-ARCH-ABIS.HTML &mdash; a description of supported CPU architectures and how to target
     them.</li>
 
@@ -1527,15 +1719,15 @@
     <li>CHANGES.HTML &mdash; a complete list of changes to the NDK across all releases.</li>
 
     <li>DEVELOPMENT.HTML &mdash; describes how to modify the NDK and generate release packages for it</li>
-    
+
     <li>HOWTO.HTML &mdash; information about common tasks associated with NDK development</li>
-    
+
     <li>IMPORT-MODULE.HTML &mdash; describes how to share and reuse modules</li>
-    
+
     <li>LICENSES.HTML  &mdash; information about the various open source licenses that govern the Android NDK</li>
- 
+
     <li>NATIVE-ACTIVITY.HTML &mdash; describes how to implement native activities</li>
-    
+
     <li>NDK-BUILD.HTML &mdash; describes the usage of the ndk-build script</li>
 
     <li>NDK-GDB.HTML &mdash; describes how to use the native code debugger</li>
@@ -1544,13 +1736,13 @@
 
     <li>STANDALONE-TOOLCHAIN.HTML &mdash; describes how to use Android NDK toolchain as a standalone
     compiler (still in beta).</li>
-    
+
     <li>SYSTEM-ISSUES.HTML &mdash; known issues in the Android system images that you should be
     aware of, if you are developing using the NDK.</li>
 
     <li>STABLE-APIS.HTML &mdash; a complete list of the stable APIs exposed by headers in the
     NDK.</li>
-    
+
   </ul>
 
   <p>Additionally, the package includes detailed information about the "bionic" C library provided
@@ -1562,10 +1754,10 @@
     offers.</li>
   </ul>
 
-  
-  
-  
-  
+
+
+
+
 <h3 id="Samples">Sample apps</h3>
 
 <p>The NDK includes sample applications that illustrate how to use native code in your Android
@@ -1624,10 +1816,10 @@
     <li>If you are developing with Ant, use the <code>android</code> tool to create the build file
     for each of the sample projects at <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>.
     Then set up an AVD, if necessary, build your project in the usual way, and run it in the
-    emulator.</li>    
-    
+    emulator.</li>
+
   </ul>
-  
+
   <p>For more information about developing with the Android SDK tools and what
   you need to do to create, build, and run your applications, see
   the <a href="{@docRoot}tools/workflow/index.html">Overview</a>
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 14d1aa4..039c4b5 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -24,51 +24,51 @@
 <p>For a summary of all known issues in SDK Tools, see <a
 href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
 
-<script type="text/javascript">
-function toggleDiv(link) {
-  var toggleable = $(link).parent();
-  if (toggleable.hasClass("closed")) {
-    //$(".toggleme", toggleable).slideDown("fast");
-    toggleable.removeClass("closed");
-    toggleable.addClass("open");
-    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
-  } else {
-    //$(".toggleme", toggleable).slideUp("fast");
-    toggleable.removeClass("open");
-    toggleable.addClass("closed");
-    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
-  }
-  return false;
-}
-</script>
-<style>
-.toggleable {
-padding: 5px 0 0;
-}
-.toggleme {
-  padding: 10px 0 0 20px;
-}
-.toggleable a {
-  text-decoration:none;
-}
-.toggleme a {
-  text-decoration:underline;
-}
-.toggleable.closed .toggleme {
-  display:none;
-}
-#jd-content .toggle-img {
-  margin:0 5px 3px 0;
-}
-</style>
 
-<div class="toggleable opened">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 20</a> <em>(June 2012)</em>
+<div class="toggle-content opened">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 20.0.1</a> <em>(July 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
+
+    <dl>
+    <dt>Dependencies:</dt>
+    <dd>
+      <ul>
+        <li>Android SDK Platform-tools revision 12 or later.</li>
+        <li>If you are developing in Eclipse with ADT, note that the SDK Tools r20.0.1 is designed
+        for use with ADT 20.0.1 and later. If you haven't already, update your
+        <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 20.0.1.</li>
+        <li>If you are developing outside Eclipse, you must have
+          <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+    </ul>
+    </dd>
+    <dt>Bug fixes:</dt>
+    <dd>
+      <ul>
+        <li>Fixed wrong check on build state that forced repetitive Java code recompilation.</li>
+        <li>Fixed problems with running more than one emulator and running multiple emulators
+with GPU acceleration.</li>
+        <li>Improved resize algorithm for better rendering on scaled emulator windows.</li>
+        <li>Fixed a bug in the {@code lint} check for unprotected broadcast receivers to ignore
+unprotected receivers for default Android actions.</li>
+        <li>Fixed build issue for projects using Renderscript.</li>
+        <li>Fixed memory leak in the emulator.</li>
+      </ul>
+    </dd>
+    </dl>
+  </div>
+</div>
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 20</a> <em>(June 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
     <dt>Dependencies:</dt>
     <dd>
@@ -137,13 +137,13 @@
   </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 19</a> <em>(April 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 19</a> <em>(April 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="note"><strong>Note:</strong> This update of SDK Tools is only available through
 the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>. Use this tool to
 download and install this update.</p>
@@ -171,13 +171,13 @@
   </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 18</a> <em>(April 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 18</a> <em>(April 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="caution"><strong>Important:</strong> To download the new Android
     4.0 system components from the Android SDK Manager, you must first update the
     SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -213,13 +213,13 @@
   </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 17</a> <em>(March 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 17</a> <em>(March 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="caution"><strong>Important:</strong> To download the new Android
     4.0 system components from the Android SDK Manager, you must first update the
     SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -317,13 +317,13 @@
   </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 16</a> <em>(December 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 16</a> <em>(December 2011)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="caution"><strong>Important:</strong> To download the new Android
     4.0 system components from the Android SDK Manager, you must first update the
     SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -367,13 +367,13 @@
 </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 15</a> <em>(October 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 15</a> <em>(October 2011)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="caution"><strong>Important:</strong> To download the new Android
     4.0 system components from the Android SDK Manager, you must first update the
     SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -415,13 +415,13 @@
 </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-    width="9px" />
-    SDK Tools, Revision 14</a> <em>(October 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 14</a> <em>(October 2011)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p class="note"><strong>Important:</strong> To download the new Android
     4.0 system components from the Android SDK Manager, you must first update the
     SDK tools to revision 14 and restart the Android SDK Manager. If you do not,
@@ -470,12 +470,13 @@
 </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-        width="9px" />
-SDK Tools, Revision 13</a> <em>(September 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 13</a> <em>(September 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -500,11 +501,13 @@
 </div>
 
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 12</a> <em>(July 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 12</a> <em>(July 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -526,11 +529,13 @@
 </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 11</a> <em>(May 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 11</a> <em>(May 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -552,12 +557,13 @@
 </div>
 
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-width="9px" />
-SDK Tools, Revision 10</a> <em>(February 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 10</a> <em>(February 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -582,11 +588,13 @@
 
 
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 9</a> <em>(January 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 9</a> <em>(January 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
   <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -639,12 +647,13 @@
 </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 8</a> <em>(December 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 8</a> <em>(December 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -706,12 +715,13 @@
  </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 7</a> <em>(September 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 7</a> <em>(September 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -739,12 +749,13 @@
  </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 6</a> <em>(May 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 6</a> <em>(May 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd>
@@ -769,12 +780,13 @@
  </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 5</a> <em>(March 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 5</a> <em>(March 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd><ul>
@@ -817,12 +829,13 @@
  </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 4</a> <em>(December 2009)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 4</a> <em>(December 2009)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd><p>SDK Tools r4 is compatible with ADT 0.9.5 and later, but not
@@ -866,12 +879,13 @@
  </div>
 </div>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 3</a> <em>(October 2009)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 3</a> <em>(October 2009)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 <dd><p>SDK Tools r3 is compatible with ADT 0.9.4 and later, but not
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 6b863a7..a971066 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -2374,7 +2374,7 @@
         }
 
         String operator = mPhone.mIccRecords.getOperatorNumeric();
-        int networkType = mPhone.getServiceState().getNetworkType();
+        int radioTech = mPhone.getServiceState().getRilRadioTechnology();
 
         if (canSetPreferApn && mPreferredApn != null &&
                 mPreferredApn.canHandleType(requestedApnType)) {
@@ -2383,7 +2383,7 @@
                         + mPreferredApn.numeric + ":" + mPreferredApn);
             }
             if (mPreferredApn.numeric.equals(operator)) {
-                if (mPreferredApn.bearer == 0 || mPreferredApn.bearer == networkType) {
+                if (mPreferredApn.bearer == 0 || mPreferredApn.bearer == radioTech) {
                     apnList.add(mPreferredApn);
                     if (DBG) log("buildWaitingApns: X added preferred apnList=" + apnList);
                     return apnList;
@@ -2401,7 +2401,7 @@
         if (mAllApns != null) {
             for (ApnSetting apn : mAllApns) {
                 if (apn.canHandleType(requestedApnType)) {
-                    if (apn.bearer == 0 || apn.bearer == networkType) {
+                    if (apn.bearer == 0 || apn.bearer == radioTech) {
                         if (DBG) log("apn info : " +apn.toString());
                         apnList.add(apn);
                     }