docs: fix broken links

Change-Id: I0523fb8eb8608b07cf7ca866d0c2ccfcbfc2e946
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index ba5e1f0..b89914a 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -49,13 +49,6 @@
       LocalService}</a></li>
 </ol>
 
-<h2>Articles</h2>
-<ol>
-  <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li>
-  <li><a href="{@docRoot}resources/articles/service-api-changes-starting-with.html">Service API changes starting
-      with Android 2.0</a></li>
-</ol>
-
 <h2>See also</h2>
 <ol>
 <li><a href="{@docRoot}guide/components/bound-services.html">Bound Services</a></li>
diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd
index 48ccdeb..ce59a9d 100644
--- a/docs/html/guide/practices/security.jd
+++ b/docs/html/guide/practices/security.jd
@@ -134,9 +134,8 @@
 
 <p>To provide additional protection for sensitive data, some applications
 choose to encrypt local files using a key that is not accessible to the
-application. (For example, a key can be placed in a <code><a
-href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
-protected with a user password that is not stored on the device).  While this
+application. (For example, a key can be placed in a {@link java.security.KeyStore}
+and protected with a user password that is not stored on the device).  While this
 does not protect data from a root compromise that can monitor the user
 inputting the password,  it can provide protection for a lost device without <a
 href="http://source.android.com/tech/encryption/index.html">file system
@@ -716,8 +715,7 @@
 AccountManager</a></code> using <code><a
 href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>.
 Alternatively, if only one application will use the credential, you might use a
-<code><a
-href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for
+{@link java.security.KeyStore} for
 storage.</p>
 
 <a name="Crypto"></a>
@@ -751,8 +749,8 @@
 number generator significantly weakens the strength of the algorithm, and may
 allow offline attacks.</p>
 
-<p>If you need to store a key for repeated use, use a mechanism like <code><a
-href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
+<p>If you need to store a key for repeated use, use a mechanism like
+  {@link java.security.KeyStore} that
 provides a mechanism for long term storage and retrieval of cryptographic
 keys.</p>
 
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
index f6c2247..4529797 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
@@ -58,7 +58,7 @@
 
 <h2 id="market">Application Icons on Google Play</h2>
 
-<p>If you are <a href="{@docRoot}tools/publishing/publishing.html">publishing
+<p>If you are <a href="{@docRoot}distribute/index.html">publishing
 your application on Google Play</a>, you will also need to provide a 512x512
 pixel, high-resolution application icon in the <a
 href="http://play.google.com/apps/publish">developer console</a> at upload-time.
diff --git a/docs/html/guide/samples/index.html b/docs/html/guide/samples/index.html
index f4acdbf..959eaf5 100644
--- a/docs/html/guide/samples/index.html
+++ b/docs/html/guide/samples/index.html
@@ -1,10 +1,10 @@
 <html>
 <head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/browser.html?tag=sample">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/samples/index.html">
 <title>Redirecting...</title>
 </head>
 <body>
 <p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/browser.html?tag=sample">click here</a>.</p>
+href="http://developer.android.com/tools/samples/index.html">click here</a>.</p>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd
index 602b6e8..598b08a 100644
--- a/docs/html/guide/topics/data/backup.jd
+++ b/docs/html/guide/topics/data/backup.jd
@@ -187,10 +187,7 @@
 available only on devices running API Level 8 (Android 2.2) or greater, so you should also
 set your <a
 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
-attribute to "8". However, if you implement proper <a
-href="{@docRoot}resources/articles/backward-compatibility.html">backward compatibility</a> in
-your application, you can support this feature for devices running API Level 8 or greater, while
-remaining compatible with older devices.</p>
+attribute to "8".</p>
 
 
 
diff --git a/docs/html/guide/topics/data/install-location.jd b/docs/html/guide/topics/data/install-location.jd
index 19c4b39..5abdced 100644
--- a/docs/html/guide/topics/data/install-location.jd
+++ b/docs/html/guide/topics/data/install-location.jd
@@ -111,10 +111,7 @@
 <p class="caution"><strong>Caution:</strong> Although XML markup such as this will be ignored by
 older platforms, you must be careful not to use programming APIs introduced in API Level 8
 while your {@code minSdkVersion} is less than "8", unless you perform the work necessary to
-provide backward compatibility in your code. For information about building
-backward compatibility in your application code, see the <a
-href="{@docRoot}resources/articles/backward-compatibility.html">Backward Compatibility</a>
-article.</p>
+provide backward compatibility in your code.</p>
 
 
 
@@ -141,17 +138,13 @@
     <dd>Your alarms registered with {@link android.app.AlarmManager} will be cancelled. You must
 manually re-register any alarms when external storage is remounted.</dd>
   <dt>Input Method Engines</dt>
-    <dd>Your <a href="{@docRoot}resources/articles/on-screen-inputs.html">IME</a> will be
+    <dd>Your <a href="{@docRoot}guide/topics/text/creating-input-method.html">IME</a> will be
 replaced by the default IME. When external storage is remounted, the user can open system settings
 to enable your IME again.</dd>
   <dt>Live Wallpapers</dt>
-    <dd>Your running <a href="{@docRoot}resources/articles/live-wallpapers.html">Live Wallpaper</a>
+    <dd>Your running <a href="http://android-developers.blogspot.com/2010/02/live-wallpapers.html">Live Wallpaper</a>
 will be replaced by the default Live Wallpaper. When external storage is remounted, the user can
 select your Live Wallpaper again.</dd>
-  <dt>Live Folders</dt>
-    <dd>Your <a href="{@docRoot}resources/articles/live-folders.html">Live Folder</a> will be
-removed from the home screen. When external storage is remounted, the user can add your Live Folder
-to the home screen again.</dd>
   <dt>App Widgets</dt>
     <dd>Your <a href="{@docRoot}guide/topics/appwidgets/index.html">App Widget</a> will be removed
 from the home screen. When external storage is remounted, your App Widget will <em>not</em> be
@@ -174,7 +167,7 @@
   <dt>Copy Protection</dt>
     <dd>Your application cannot be installed to a device's SD card if it uses Google Play's 
       Copy Protection feature. However, if you use Google Play's 
-      <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, your 
+      <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, your 
       application <em>can</em> be installed to internal or external storage, including SD cards.</dd>
 </dl>
 
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index a3d4a95..7a7020a 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -152,7 +152,7 @@
 
 <p class="caution"><strong>Caution:</strong> If your application uses Google Play's Copy 
   Protection feature, it cannot be installed to a device's SD card. However, if you use Google 
-  Play's <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, 
+  Play's <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, 
   your application <em>can</em> be installed to internal or external storage, including SD cards.</p>
 
 <p class="note"><strong>Note:</strong> By default, your application will be installed on the
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
index 7999033..f5e4805 100644
--- a/docs/html/guide/topics/providers/content-provider-basics.jd
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -1031,11 +1031,11 @@
     <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
     android:grantUriPermission</a></code>
     attribute of the
-    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    {@code <a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
     element, as well as the
-    {@code <a href="guide/topics/manifest/grant-uri-permission-element.html">
+    {@code <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
     &lt;grant-uri-permission&gt;</a>} child element of the
-    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    {@code <a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
     element. The URI permissions mechanism is explained in more detail in the
     <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide,
     in the section "URI Permissions".
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index c653b0c..cd88ae9 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -169,8 +169,8 @@
     <p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight
 View that consumes no layout space until you explicitly inflate it, at which point, it includes a
 layout file defined by its {@code android:layout} attribute. For more information about using {@link
-android.view.ViewStub}, read <a href="{@docRoot}resources/articles/layout-tricks-stubs.html">Layout
-Tricks: ViewStubs</a>.</p>
+android.view.ViewStub}, read <a href="{@docRoot}training/improving-layouts/loading-ondemand.html">Loading
+  Views On Demand</a>.</p>
     </dd>
 
   <dt id="merge-element"><code>&lt;merge&gt;</code></dt>
@@ -181,8 +181,7 @@
 in another layout file using <a href="#include-element"><code>&lt;include&gt;</code></a> and
 this layout doesn't require a different {@link android.view.ViewGroup} container. For more
 information about merging layouts, read <a
-href="{@docRoot}resources/articles/layout-tricks-merge.html">Layout
-Tricks: Merging</a>.</dd>
+href="{@docRoot}training/improving-layouts/reusing-layouts.html">Re-using Layouts with &lt;include/></a>.</dd>
 
   </dl>
 
diff --git a/docs/html/guide/topics/resources/runtime-changes.jd b/docs/html/guide/topics/resources/runtime-changes.jd
index f5475b4..5f39aa5 100644
--- a/docs/html/guide/topics/resources/runtime-changes.jd
+++ b/docs/html/guide/topics/resources/runtime-changes.jd
@@ -16,8 +16,8 @@
   <ol>
     <li><a href="providing-resources.html">Providing Resources</a></li>
     <li><a href="accessing-resources.html">Accessing Resources</a></li>
-    <li><a href="{@docRoot}resources/articles/faster-screen-orientation-change.html">Faster Screen
-Orientation Change</a></li>
+    <li><a href="http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html">Faster
+        Screen Orientation Change</a></li>
   </ol>
 </div>
 </div>
diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd
index a045899..726476a 100644
--- a/docs/html/guide/topics/sensors/index.jd
+++ b/docs/html/guide/topics/sensors/index.jd
@@ -18,7 +18,7 @@
 issues that we’ve noticed causing problems in some apps.</p>
     </a>
     
-    <a href="android-developers.blogspot.com/2011/06/deep-dive-into-location.html">
+    <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html">
       <h4>A Deep Dive Into Location</h4>
       <p>I’ve written an open-source reference app that incorporates all of the tips, tricks, and
 cheats I know to reduce the time between opening an app and seeing an up-to-date list of nearby
diff --git a/docs/html/guide/topics/sensors/sensors_overview.jd b/docs/html/guide/topics/sensors/sensors_overview.jd
index e38a843..a162ccf 100644
--- a/docs/html/guide/topics/sensors/sensors_overview.jd
+++ b/docs/html/guide/topics/sensors/sensors_overview.jd
@@ -662,7 +662,7 @@
 <h4>Using Google Play filters to target specific sensor configurations</h4>
 
 <p>If you are publishing your application on Google Play you can use the
-  <a href="{@docRoot}guide//topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;
+  <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;
     </code></a> element in your manifest file to filter your application from devices that do not
 have the appropriate sensor configuration for your application. The
 <code>&lt;uses-feature&gt;</code> element has several hardware descriptors that let you filter
diff --git a/docs/html/guide/topics/text/creating-input-method.jd b/docs/html/guide/topics/text/creating-input-method.jd
index e49610f..7086824 100644
--- a/docs/html/guide/topics/text/creating-input-method.jd
+++ b/docs/html/guide/topics/text/creating-input-method.jd
@@ -1,6 +1,5 @@
 page.title=Creating an Input Method
 parent.title=Articles
-parent.link=../browser.html?tag=article
 @jd:body
 
 <div id="qv-wrapper">
@@ -162,8 +161,8 @@
     In this example, {@code MyKeyboardView} is an instance of a custom implementation of 
     {@link android.inputmethodservice.KeyboardView} that renders a 
     {@link android.inputmethodservice.Keyboard}. If you’re building a traditional QWERTY keyboard, 
-    see the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample 
-    app for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class.
+    see the  Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a> for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class.
 </p>
 <h3 id="CandidateView">Candidates view</h3>
 <p>
@@ -175,7 +174,8 @@
     default behavior, so you don’t have to implement this if you don’t provide suggestions).</p>
 <p>
     For an example implementation that provides user suggestions, see the 
-    <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample app.
+    Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a>.
 </p>
 <h3 id="DesignConsiderations">UI design considerations</h3>
 <p>
@@ -388,8 +388,8 @@
     To intercept hardware keys, override 
     {@link android.inputmethodservice.InputMethodService#onKeyDown(int, KeyEvent) onKeyDown()}
     and {@link android.inputmethodservice.InputMethodService#onKeyUp(int, KeyEvent) onKeyUp()}. 
-    See the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample 
-    app for an example.
+    See the Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a> for an example.
 </p>
 <p>
     Remember to call the <code>super()</code> method for keys you don't want to handle yourself.
diff --git a/docs/html/guide/topics/text/spell-checker-framework.jd b/docs/html/guide/topics/text/spell-checker-framework.jd
index 1c2e211..7f7a0b8 100644
--- a/docs/html/guide/topics/text/spell-checker-framework.jd
+++ b/docs/html/guide/topics/text/spell-checker-framework.jd
@@ -1,6 +1,5 @@
 page.title=Spelling Checker Framework
 parent.title=Articles
-parent.link=../browser.html?tag=article
 @jd:body
 <div id="qv-wrapper">
 <div id="qv">
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index 0c1d065..7d36181 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -10,7 +10,7 @@
   <ol>
     <li><a href="#manifest">Manifest Declarations and Permissions</a>
       <ol>
-        <li><a href="service-declaration">Accessibility service declaration</a></li>
+        <li><a href="#service-declaration">Accessibility service declaration</a></li>
         <li><a href="#service-config">Accessibility service configuration</a></li>
       </ol>
     </li>
diff --git a/docs/html/guide/topics/ui/layout/relative.jd b/docs/html/guide/topics/ui/layout/relative.jd
index ee6cf02..47f9417 100644
--- a/docs/html/guide/topics/ui/layout/relative.jd
+++ b/docs/html/guide/topics/ui/layout/relative.jd
@@ -44,19 +44,19 @@
 include:</p>
 <dl>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop"
 >{@code android:layout_alignParentTop}</a></dt>
     <dd>If {@code "true"}, makes the top edge of this view match the top edge of the parent. </dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical"
 >{@code android:layout_centerVertical}</a></dt>
     <dd>If {@code "true"}, centers this child vertically within its parent.</dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below"
 >{@code android:layout_below}</a></dt>
     <dd>Positions the top edge of this view below the view specified with a resource ID.</dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf"
 >{@code android:layout_toRightOf}</a></dt>
     <dd>Positions the left edge of this view to the right of the view specified with a resource ID.</dd>
 </dl>