Merge "docs: b/15790433 updated for xxhdpi and xxxhdpi" into klp-modular-docs
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index d95bcb5..4de486b 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -345,7 +345,7 @@
      * A sensor of this type returns the number of steps taken by the user since the last reboot
      * while activated. The value is returned as a float (with the fractional part set to zero) and
      * is reset to zero only on a system reboot. The timestamp of the event is set to the time when
-     * the first step for that event was taken. This sensor is implemented in hardware and is
+     * the last step for that event was taken. This sensor is implemented in hardware and is
      * expected to be low power.
      * <p>
      * See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 93bf051..d307256 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1637,9 +1637,12 @@
      * <ul>
      * <li> This method can be used to allow JavaScript to control the host
      * application. This is a powerful feature, but also presents a security
-     * risk for applications targeted to API level
-     * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or below, because
-     * JavaScript could use reflection to access an
+     * risk for apps targeting {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or earlier.
+     * Apps that target a version later than {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
+     * are still vulnerable if the app runs on a device running Android earlier than 4.2.
+     * The most secure way to use this method is to target {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
+     * and to ensure the method is called only when running on Android 4.2 or later.
+     * With these older versions, JavaScript could use reflection to access an
      * injected object's public fields. Use of this method in a WebView
      * containing untrusted content could allow an attacker to manipulate the
      * host application in unintended ways, executing Java code with the
@@ -1647,7 +1650,8 @@
      * method in a WebView which could contain untrusted content.</li>
      * <li> JavaScript interacts with Java object on a private, background
      * thread of this WebView. Care is therefore required to maintain thread
-     * safety.</li>
+     * safety.
+     * </li>
      * <li> The Java object's fields are not accessible.</li>
      * </ul>
      *
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index c5b6c24..1e32d43 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -1,3 +1,10 @@
+# WARNING: THIS FILE IS NOT USED IN PRODUCTION
+# CHANGES MADE HERE **DO NOT EFFECT** developer.android.com
+
+# Instead, update the following file in the current docs release branch:
+# <docs-release-branch>/vendor/google/docs/app-engine-server/v3/redirects.yaml
+
+#=============================================================================
 # Redirects file.
 # This file contains the list of rewrite rules that are applied when serving
 # pages. Add "pattern: True" to use python regex in to or from.
@@ -59,6 +66,9 @@
 - from: /guide/google/gcm/server-javadoc/...
   to: /reference/com/google/android/gcm/server/package-summary.html
 
+- from: /google/play-services/auth.html
+  to: /google/auth/http-auth.html
+
 - from: /guide/google/play/services.html
   to: /google/play-services/index.html
 
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index 2a2417a..1e5fc4d 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -64,7 +64,7 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on July 7, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014.
 <br/>Any versions with less than 0.1% distribution are not shown.</em>
 </p>
 
@@ -95,7 +95,7 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on July 7, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014.
 <br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p>
 
 
@@ -114,7 +114,7 @@
 
 
 <img alt="" style="float:right"
-src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A0.1%2C81.7%2C18.2&chf=bg%2Cs%2C00000000&chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
+src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A0.1%2C80.2%2C19.7&chf=bg%2Cs%2C00000000&chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
 
 <p>To declare which version of OpenGL ES your application requires, you should use the {@code
 android:glEsVersion} attribute of the <a
@@ -136,17 +136,17 @@
 </tr>
 <tr>
 <td>2.0</th>
-<td>81.7%</td>
+<td>80.2%</td>
 </tr>
 <tr>
 <td>3.0</th>
-<td>18.2%</td>
+<td>19.7%</td>
 </tr>
 </table>
 
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on July 7, 2014</em></p>
+<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014</em></p>
 
 
 
@@ -164,7 +164,7 @@
 var VERSION_DATA =
 [
   {
-    "chart": "//chart.googleapis.com/chart?cht=p&chs=500x250&chf=bg%2Cs%2C00000000&chd=t%3A0.7%2C13.5%2C11.4%2C56.5%2C17.9&chco=c4df9b%2C6fad0c&chl=Froyo%7CGingerbread%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat",
+    "chart": "//chart.googleapis.com/chart?cht=p&chs=500x250&chl=Froyo%7CGingerbread%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chd=t%3A0.7%2C13.6%2C10.6%2C54.2%2C20.9&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c",
     "data": [
       {
         "api": 8,
@@ -174,32 +174,32 @@
       {
         "api": 10,
         "name": "Gingerbread",
-        "perc": "13.5"
+        "perc": "13.6"
       },
       {
         "api": 15,
         "name": "Ice Cream Sandwich",
-        "perc": "11.4"
+        "perc": "10.6"
       },
       {
         "api": 16,
         "name": "Jelly Bean",
-        "perc": "27.8"
+        "perc": "26.5"
       },
       {
         "api": 17,
         "name": "Jelly Bean",
-        "perc": "19.7"
+        "perc": "19.8"
       },
       {
         "api": 18,
         "name": "Jelly Bean",
-        "perc": "9.0"
+        "perc": "7.9"
       },
       {
         "api": 19,
         "name": "KitKat",
-        "perc": "17.9"
+        "perc": "20.9"
       }
     ]
   }
@@ -215,28 +215,28 @@
     "data": {
       "Large": {
         "hdpi": "0.6",
-        "ldpi": "0.6",
-        "mdpi": "4.5",
-        "tvdpi": "1.7",
-        "xhdpi": "0.6"
+        "ldpi": "0.5",
+        "mdpi": "4.2",
+        "tvdpi": "1.6",
+        "xhdpi": "0.5"
       },
       "Normal": {
-        "hdpi": "34.5",
-        "mdpi": "11.4",
-        "xhdpi": "19.4",
-        "xxhdpi": "15.3"
+        "hdpi": "35.5",
+        "mdpi": "11.8",
+        "xhdpi": "18.4",
+        "xxhdpi": "15.2"
       },
       "Small": {
-        "ldpi": "6.8"
+        "ldpi": "7.4"
       },
       "Xlarge": {
         "hdpi": "0.3",
-        "mdpi": "3.9",
+        "mdpi": "3.6",
         "xhdpi": "0.4"
       }
     },
-    "densitychart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg%2Cs%2C00000000&chd=t%3A7.4%2C19.8%2C1.7%2C35.4%2C20.4%2C15.3&chco=c4df9b%2C6fad0c&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi",
-    "layoutchart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg%2Cs%2C00000000&chd=t%3A4.6%2C8.0%2C80.6%2C6.8&chco=c4df9b%2C6fad0c&chl=Xlarge%7CLarge%7CNormal%7CSmall"
+    "densitychart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chd=t%3A7.9%2C19.6%2C1.6%2C36.4%2C19.3%2C15.2&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c",
+    "layoutchart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chl=Xlarge%7CLarge%7CNormal%7CSmall&chd=t%3A4.3%2C7.4%2C80.9%2C7.4&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c"
   }
 ];
 
diff --git a/docs/html/google/auth/http-auth.jd b/docs/html/google/auth/http-auth.jd
index 3b2a83f..804ba12 100644
--- a/docs/html/google/auth/http-auth.jd
+++ b/docs/html/google/auth/http-auth.jd
@@ -342,9 +342,9 @@
 "{@docRoot}reference/com/google/android/gms/auth/GoogleAuthUtil.html#getToken(android.content.Context,%20java.lang.String,%20java.lang.String)">
 {@code GoogleAuthUtil.getToken()}</a>, you must provide the app {@link android.content.Context},
 the account name retrieved from the account picker, and the scope for your auth
-token request. The above sample code (and the attached sample) defines these arguments with
-class members that the host activity passes to
-the {@link android.os.AsyncTask} class constructor.</p>
+token request. The above sample code (and the attached sample) defines these
+arguments with class members that the host activity passes to the {@link android.os.AsyncTask} class constructor. For more information about setting the scope, see
+the <a href="#SpecifyingScopes">Specifying Scopes</a> section below. </p>
 
 <p class="note"><strong>Note:</strong>
 As shown by the {@code fetchToken()} method above, you must handle
@@ -397,8 +397,32 @@
 "{@docRoot}reference/com/google/android/gms/auth/GoogleAuthUtil.html#getToken(android.content.Context,%20java.lang.String,%20java.lang.String)">
 {@code GoogleAuthUtil.getToken()}</a>.</p>
 
-
-
+<h3 id="SpecifyingScopes">Specifying scopes</h3>
+<p>The scope string is used to specify which Google services can be accessed by
+  an app using the requested auth token. An auth token can be associated with
+  multiple scopes.</p>
+<p>When specifying the scopes in your auth token request, prefix the
+  scope string with {@code "oauth2:"} followed by a list of one or more OAuth scope
+  values. Use a space to separate each scope value in the list. To see a list of
+  valid OAuth scope values for Google services, browse
+  the <a href="https://developers.google.com/oauthplayground/"
+  class="external-link">OAuth 2.0 Playground</a>.</p>
+<p class="note"><strong>Tip:</strong> Specify {@code "oauth2:&lt;scope&gt;"}
+  for a single scope. Specify
+  {@code "oauth2:&lt;scope1&gt; &lt;scope2&gt; &lt;scopeN&gt;"} for multiple
+  scopes (using a space to separate each scope).</p>
+<p>For example, to access the Google Books API, the scope is
+  {@code "oauth2:https://www.googleapis.com/auth/books"}. To add an additional
+  scope, say for Google+ login, your code might look like this:</p>
+<pre>
+private final static String BOOKS_API_SCOPE
+        = "https://www.googleapis.com/auth/books";
+private fina; static String GPLUS_SCOPE
+        = "https://www.googleapis.com/auth/plus.login";
+private final static String mScopes
+        = "oauth2:" + BOOKS_API_SCOPE + " " + GPLUS_SCOPE;
+String token = GoogleAuthUtil.getToken(mActivity, mEmail, mScopes);
+</pre>
 
 <h2 id="HandleExceptions">Handle Exceptions</h2>
 
diff --git a/docs/html/google/gcm/ccs.jd b/docs/html/google/gcm/ccs.jd
index 90d8d4c..1c7c802 100644
--- a/docs/html/google/gcm/ccs.jd
+++ b/docs/html/google/gcm/ccs.jd
@@ -40,8 +40,6 @@
 <li><a href="{@docRoot}google/gcm/gs.html">Getting Started</a></li>
 <li><a href="{@docRoot}google/gcm/server.html">Implementing GCM Server</a></li>
 <li><a href="{@docRoot}google/gcm/client.html">Implementing GCM Client</a></li>
-<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link"
-target="_android">CCS and User Notifications Signup Form</a></li>
 </ol>
 
 </div>
diff --git a/docs/html/google/gcm/gs.jd b/docs/html/google/gcm/gs.jd
index d937955..d357401 100644
--- a/docs/html/google/gcm/gs.jd
+++ b/docs/html/google/gcm/gs.jd
@@ -20,7 +20,6 @@
 <ol class="toc">
 <li><a href="https://cloud.google.com/console">Google Cloud Console</a></li>
 <li><a href="https://developers.google.com/console/help/new/">Google Cloud Console Help</a></li>
-<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
 </ol>
 
 </div>
diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd
index ebd3694..d7e449b 100644
--- a/docs/html/google/play-services/setup.jd
+++ b/docs/html/google/play-services/setup.jd
@@ -66,8 +66,8 @@
 ...
 
 dependencies {
-    compile 'com.android.support:appcompat-v7:+'
-    <strong>compile 'com.google.android.gms:play-services:5.0.77'</strong>
+    compile 'com.android.support:appcompat-v7:20.+'
+    <strong>compile 'com.google.android.gms:play-services:5.+'</strong>
 }
 </pre>
 <p>Be sure you update this version number each time Google Play services is updated.</p>
diff --git a/docs/html/google/play/billing/billing_reference.jd b/docs/html/google/play/billing/billing_reference.jd
index e168d70..4f5e65c 100644
--- a/docs/html/google/play/billing/billing_reference.jd
+++ b/docs/html/google/play/billing/billing_reference.jd
@@ -102,15 +102,28 @@
   </tr>
   <tr>
     <td>{@code type}</td>
-    <td>Value must be “inapp” for an in-app product or "subs" for 
+    <td>Value must be “inapp” for an in-app product or "subs" for
 subscriptions.</td>
   </tr>
   <tr>
     <td>{@code price}</td>
-    <td>Formatted price of the item, including its currency sign. The price 
+    <td>Formatted price of the item, including its currency sign. The price
 does not include tax.</td>
   </tr>
   <tr>
+    <td>{@code price_amount_micros}</td>
+    <td>Price in micro-units, where 1,000,000 micro-units equal one unit of the
+    currency. For example, if {@code price} is {@code "€7.99"}, {@code
+    price_amount_micros} is {@code "7990000"}.</td>
+  </tr>
+  <tr>
+    <td>{@code price_currency_code}</td>
+    <td><a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes">ISO 4217
+    currency code</a> for {@code price}. For example, if {@code price} is
+    specified in British pounds sterling, {@code price_currency_code} is {@code
+    "GBP"}.</td>
+  </tr>
+  <tr>
     <td>{@code title}</td>
     <td>Title of the product.</td>
   </tr>
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index b4813a5..af9456d 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -1316,7 +1316,7 @@
 <dt>{@link android.provider.MediaStore#EXTRA_MEDIA_FOCUS MediaStore.EXTRA_MEDIA_FOCUS} (required)</dt>
 <dd>
 <p>Indicates the search mode (whether the user is looking for a particular artist, album, song,
-playlist, or radio channel). Most search modes take additional extras. For example, if the user
+or playlist). Most search modes take additional extras. For example, if the user
 is interested in listening to a particular song, the intent might have three additional extras:
 the song title, the artist, and the album. This intent supports the following search modes for
 each value of {@link android.provider.MediaStore#EXTRA_MEDIA_FOCUS}:</p>
@@ -1399,24 +1399,6 @@
       intent as an unstructured search.</li>
 </ul>
 </dd>
-<dt><p><em>Radio channel</em> - <code>"vnd.android.cursor.item/radio"</code></p></dt>
-<dd>
-<p>Play a particular radio channel or a radio channel that matches some criteria specified
-by additional extras.</p>
-<p>Additional extras:</p>
-<ul>
-  <li>{@link android.provider.MediaStore#EXTRA_MEDIA_ALBUM} - The album.</li>
-  <li>{@link android.provider.MediaStore#EXTRA_MEDIA_ARTIST} - The artist.</li>
-  <li><code>"android.intent.extra.genre"</code> - The genre.</li>
-  <li><code>"android.intent.extra.radio_channel"</code> - The radio channel.</li>
-  <li>{@link android.provider.MediaStore#EXTRA_MEDIA_TITLE} - The song name that the radio
-      channel is based on.</li>
-  <li>{@link android.app.SearchManager#QUERY} (required) - A string that contains any combination
-      of: the album, the artist, the genre, the radio channel, or the title. This extra is
-      always provided for backward compatibility: existing apps that do not know about search
-      modes can process this intent as an unstructured search.</li>
-</ul>
-</dd>
 <dt><p><em>Playlist</em> - {@link android.provider.MediaStore.Audio.Playlists#ENTRY_CONTENT_TYPE Audio.Playlists.ENTRY_CONTENT_TYPE}</p></dt>
 <dd>
 <p>Play a particular playlist or a playlist that matches some criteria specified
@@ -1444,13 +1426,13 @@
 
 
 <p><b>Example intent:</b></p>
-<p>If the user wants to listen to a radio station that plays songs from a particular artist,
-a search app may generate the following intent:</p>
+<p>If the user wants to listen to music from a particular artist, a search app may generate the
+following intent:</p>
 <pre>
-public void playSearchRadioByArtist(String artist) {
+public void playSearchArtist(String artist) {
     Intent intent = new Intent(MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH);
     intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS,
-                    "vnd.android.cursor.item/radio");
+                    MediaStore.Audio.Artists.ENTRY_CONTENT_TYPE);
     intent.putExtra(MediaStore.EXTRA_MEDIA_ARTIST, artist);
     intent.putExtra(SearchManager.QUERY, artist);
     if (intent.resolveActivity(getPackageManager()) != null) {
@@ -1488,7 +1470,6 @@
         String artist = intent.getStringExtra(MediaStore.EXTRA_MEDIA_ARTIST);
         String genre = intent.getStringExtra("android.intent.extra.genre");
         String playlist = intent.getStringExtra("android.intent.extra.playlist");
-        String rchannel = intent.getStringExtra("android.intent.extra.radio_channel");
         String title = intent.getStringExtra(MediaStore.EXTRA_MEDIA_TITLE);
 
         // Determine the search mode and use the corresponding extras
@@ -1521,10 +1502,6 @@
             // 'Song' search mode
             playSong(album, artist, genre, title);
 
-        } else if (mediaFocus.compareTo("vnd.android.cursor.item/radio") == 0) {
-            // 'Radio channel' search mode
-            playRadioChannel(album, artist, genre, rchannel, title);
-
         } else if (mediaFocus.compareTo(MediaStore.Audio.Playlists.ENTRY_CONTENT_TYPE) == 0) {
             // 'Playlist' search mode
             playPlaylist(album, artist, genre, playlist, title);
@@ -1701,7 +1678,7 @@
 <p><b>Example intent:</b></p>
 <pre>
 public void composeMmsMessage(String message, Uri attachment) {
-    Intent intent = new Intent(Intent.ACTION_SEND);
+    Intent intent = new Intent(Intent.ACTION_SENDTO);
     intent.setType(HTTP.PLAIN_TEXT_TYPE);
     intent.putExtra("sms_body", message);
     intent.putExtra(Intent.EXTRA_STREAM, attachment);
diff --git a/docs/html/guide/topics/admin/device-admin.jd b/docs/html/guide/topics/admin/device-admin.jd
index a474498..2d02e51 100644
--- a/docs/html/guide/topics/admin/device-admin.jd
+++ b/docs/html/guide/topics/admin/device-admin.jd
@@ -28,12 +28,6 @@
       <li>{@link android.app.admin.DevicePolicyManager}</li>
       <li>{@link android.app.admin.DeviceAdminInfo}</li>
     </ol>
-    <h2>Related samples</h2>
-    <ol>
-      <li><a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
-DeviceAdminSample</a></li>
-</ol>
 </div>
 </div>
 
@@ -232,18 +226,12 @@
 
 <h2 id="sample">Sample Application</h2>
 
-<p>The examples used in this document are based on the <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
-Device Administration API
-sample</a>, which is included in the SDK samples. For information on downloading and
-installing the SDK samples, see <a
-href="{@docRoot}resources/samples/get.html">
-Getting the Samples</a>. Here is the  <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html">
-complete code</a> for
-the sample. </p>
-<p>The
-sample application offers a demo of device admin features. It presents users
+<p>The examples used in this document are based on the Device Administration API
+sample, which is included in the SDK samples (available through the
+Android SDK Manager) and located on your system as 
+<code>&lt;sdk_root&gt;/ApiDemos/app/src/main/java/com/example/android/apis/app/DeviceAdminSample.java</code>.</p>
+
+<p>The sample application offers a demo of device admin features. It presents users
 with a user interface that lets them enable the device admin application. Once
 they've enabled the application, they can use the buttons in the user interface
 to do the following:</p>
@@ -676,7 +664,8 @@
 <p>You can also programmatically tell the device to lock immediately:</p>
 <pre>
 DevicePolicyManager mDPM;
-mDPM.lockNow();</pre>
+mDPM.lockNow();
+</pre>
 
 
 
@@ -692,12 +681,12 @@
 <pre>
 DevicePolicyManager mDPM;
 mDPM.wipeData(0);</pre>
-<p>The {@link android.app.admin.DevicePolicyManager#wipeData wipeData()} method takes as its parameter a bit mask of
-additional options. Currently the value must be 0. </p>
+<p>The {@link android.app.admin.DevicePolicyManager#wipeData wipeData()} method takes as its
+  parameter a bit mask of additional options. Currently the value must be 0. </p>
 
 <h4>Disable camera</h4>
 <p>Beginning with Android 4.0, you can disable the camera. Note that this doesn't have to be a permanent disabling. The camera can be enabled/disabled dynamically based on context, time, and so on. </p>
-<p>You control whether the camera is disabled by using the 
+<p>You control whether the camera is disabled by using the
 {@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName, boolean) setCameraDisabled()} method. For example, this snippet sets the camera to be enabled or disabled based on a checkbox setting:</p>
 
 <pre>private CheckBoxPreference mDisableCameraCheckbox;
@@ -708,8 +697,8 @@
 </pre>
 
 
-<h4 id=storage">Storage encryption</h4>
-<p>Beginning with Android 3.0, you can use the 
+<h4 id="storage">Storage encryption</h4>
+<p>Beginning with Android 3.0, you can use the
 {@link android.app.admin.DevicePolicyManager#setStorageEncryption(android.content.ComponentName,boolean) setStorageEncryption()} 
 method to set a policy requiring encryption of the storage area, where supported.</p>
 
@@ -722,5 +711,5 @@
 mDPM.setStorageEncryption(mDeviceAdminSample, true);
 </pre>
 <p>
-See the <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.html"> Device Administration API sample</a> for a complete
-example of how to enable storage encryption.</p>
+See the Device Administration API sample for a complete example of how to enable storage encryption.
+</p>
\ No newline at end of file
diff --git a/docs/html/guide/topics/renderscript/compute.jd b/docs/html/guide/topics/renderscript/compute.jd
index c62510b..100894c 100644
--- a/docs/html/guide/topics/renderscript/compute.jd
+++ b/docs/html/guide/topics/renderscript/compute.jd
@@ -157,8 +157,7 @@
 
 <ul>
   <li><strong>{@link android.renderscript}</strong> - The APIs in this class package are
-    available on devices running Android 3.0 (API level 11) and higher. These are the original APIs
-    for RenderScript and are not currently being updated.</li>
+    available on devices running Android 3.0 (API level 11) and higher. </li>
   <li><strong>{@link android.support.v8.renderscript}</strong> - The APIs in this package are
     available through a <a href="{@docRoot}tools/support-library/features.html#v8">Support
     Library</a>, which allows you to use them on devices running Android 2.2 (API level 8) and
@@ -166,8 +165,8 @@
 </ul>
 
 <p>We strongly recommend using the Support Library APIs for accessing RenderScript because they
-  include the latest improvements to the RenderScript compute framework and provide a wider range
-  of device compatibility.</p>
+  provide a wider range of device compatibility. Developers targeting specific versions of 
+  Android can use {@link android.renderscript} if necessary.</p>
 
 
 <h3 id="ide-setup">Using the RenderScript Support Library APIs</h3>
@@ -308,4 +307,4 @@
 <li><strong>Tear down the RenderScript context.</strong> The RenderScript context can be destroyed
 with {@link android.renderscript.RenderScript#destroy} or by allowing the RenderScript context
 object to be garbage collected. This will cause any further use of any object belonging to that
-context to throw an exception.</li> </ol>
\ No newline at end of file
+context to throw an exception.</li> </ol>
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index c868080..d69af9f 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -71,24 +71,30 @@
 
 <h3 id="service-declaration">Accessibility service declaration</h3>
 
-<p>In order to be treated as an accessibility service, your application must include the
+<p>In order to be treated as an accessibility service, you must include a
 {@code service} element (rather than the {@code activity} element) within the {@code application}
-element in its manifest. In addition, within the {@code service} element, you must also include an
+element in your manifest. In addition, within the {@code service} element, you must also include an
 accessibility service intent filter. For compatiblity with Android 4.1 and higher, the manifest
 must also request the {@link android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE} permission
 as shown in the following sample:</p>
 
 <pre>
-&lt;application&gt;
-  &lt;service android:name=&quot;.MyAccessibilityService&quot;
-      android:label=&quot;@string/accessibility_service_label&quot;
-      android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
-    &lt;intent-filter&gt;
-      &lt;action android:name=&quot;android.accessibilityservice.AccessibilityService&quot; /&gt;
-    &lt;/intent-filter&gt;
-  &lt;/service&gt;
-  &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
-&lt;/application&gt;
+&lt;manifest&gt;
+  ...
+  &lt;uses-permission ... /&gt;
+  ...
+  &lt;application&gt;
+    ...
+    &lt;service android:name=&quot;.MyAccessibilityService&quot;
+        android:label=&quot;@string/accessibility_service_label&quot;
+        android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
+      &lt;intent-filter&gt;
+        &lt;action android:name=&quot;android.accessibilityservice.AccessibilityService&quot; /&gt;
+      &lt;/intent-filter&gt;
+    &lt;/service&gt;
+    &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
+  &lt;/application&gt;
+&lt;/manifest&gt;
 </pre>
 
 <p>These declarations are required for all accessibility services deployed on Android 1.6 (API Level
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index c08128b..e1d51e6 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -31,7 +31,7 @@
     <li>{@link android.view.ViewGroup}</li>
     <li>{@link android.view.ViewGroup.LayoutParams}</li>
   </ol>
-  
+
   <h2>See also</h2>
   <ol>
     <li><a href="{@docRoot}training/basics/firstapp/building-ui.html">Building a Simple User
@@ -43,9 +43,9 @@
 href="{@docRoot}guide/topics/appwidgets/index.html">app widget</a>.
 You can declare a layout in two ways:</p>
 <ul>
-<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML 
+<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML
 vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts.</li>
-<li><strong>Instantiate layout elements at runtime</strong>. Your 
+<li><strong>Instantiate layout elements at runtime</strong>. Your
 application can create View and ViewGroup objects (and manipulate their properties) programmatically. </li>
 </ul>
 
@@ -55,12 +55,12 @@
 <div class="sidebox">
   <ul>
   <li>The <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT
-  Plugin for Eclipse</a> offers a layout preview of your XML &mdash; 
+  Plugin for Eclipse</a> offers a layout preview of your XML &mdash;
   with the XML file opened, select the <strong>Layout</strong> tab.</li>
-  <li>You should also try the 
-  <a href="{@docRoot}tools/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool, 
-  for debugging layouts &mdash; it reveals layout property values, 
-  draws wireframes with padding/margin indicators, and full rendered views while 
+  <li>You should also try the
+  <a href="{@docRoot}tools/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool,
+  for debugging layouts &mdash; it reveals layout property values,
+  draws wireframes with padding/margin indicators, and full rendered views while
   you debug on the emulator or device.</li>
   <li>The <a href="{@docRoot}tools/debugging/debugging-ui.html#layoutopt">layoutopt</a> tool lets
   you quickly analyze your layouts and hierarchies for inefficiencies or other problems.</li>
@@ -68,7 +68,7 @@
 </div>
 
 <p>The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're
-interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and 
+interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and
 {@link android.view.View} class references.</p>
 
 <p>In general, the XML vocabulary for declaring UI elements closely follows the structure and naming of the classes and methods, where element names correspond to class names and attribute names correspond to methods. In fact, the correspondence is often so direct that you can guess what XML attribute corresponds to a class method, or guess what class corresponds to a given XML element. However, note that not all vocabulary is identical. In some cases, there are slight naming differences. For
@@ -102,7 +102,7 @@
 &lt;/LinearLayout>
 </pre>
 
-<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension, 
+<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension,
 in your Android project's <code>res/layout/</code> directory, so it will properly compile. </p>
 
 <p>More information about the syntax for a layout XML file is available in the <a
@@ -111,11 +111,11 @@
 <h2 id="load">Load the XML Resource</h2>
 
 <p>When you compile your application, each XML layout file is compiled into a
-{@link android.view.View} resource. You should load the layout resource from your application code, in your 
+{@link android.view.View} resource. You should load the layout resource from your application code, in your
 {@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()} callback implementation.
-Do so by calling <code>{@link android.app.Activity#setContentView(int) setContentView()}</code>, 
-passing it the reference to your layout resource in the form of: 
-<code>R.layout.<em>layout_file_name</em></code>. 
+Do so by calling <code>{@link android.app.Activity#setContentView(int) setContentView()}</code>,
+passing it the reference to your layout resource in the form of:
+<code>R.layout.<em>layout_file_name</em></code>.
 For example, if your XML layout is saved as <code>main_layout.xml</code>, you would load it
 for your Activity like so:</p>
 <pre>
@@ -126,7 +126,7 @@
 </pre>
 
 <p>The <code>onCreate()</code> callback method in your Activity is called by the Android framework when
-your Activity is launched (see the discussion about lifecycles, in the 
+your Activity is launched (see the discussion about lifecycles, in the
 <a href="{@docRoot}guide/components/activities.html#Lifecycle">Activities</a>
 document).</p>
 
@@ -136,18 +136,18 @@
 <p>Every View and ViewGroup object supports their own variety of XML attributes.
 Some attributes are specific to a View object (for example, TextView supports the <code>textSize</code>
 attribute), but these attributes are also inherited by any View objects that may extend this class.
-Some are common to all View objects, because they are inherited from the root View class (like 
-the <code>id</code> attribute). And, other attributes are considered "layout parameters," which are 
+Some are common to all View objects, because they are inherited from the root View class (like
+the <code>id</code> attribute). And, other attributes are considered "layout parameters," which are
 attributes that describe certain layout orientations of the View object, as defined by that object's
 parent ViewGroup object.</p>
 
 <h3 id="id">ID</h3>
 
 <p>Any View object may have an integer ID associated with it, to uniquely identify the View within the tree.
-When the application is compiled, this ID is referenced as an integer, but the ID is typically 
+When the application is compiled, this ID is referenced as an integer, but the ID is typically
 assigned in the layout XML file as a string, in the <code>id</code> attribute.
 This is an XML attribute common to all View objects
-(defined by the {@link android.view.View} class) and you will use it very often. 
+(defined by the {@link android.view.View} class) and you will use it very often.
 The syntax for an ID, inside an XML tag is:</p>
 <pre>android:id="&#64;+id/my_button"</pre>
 
@@ -170,7 +170,7 @@
         android:text="&#64;string/my_button_text"/>
 </pre>
   </li>
-  <li>Then create an instance of the view object and capture it from the layout 
+  <li>Then create an instance of the view object and capture it from the layout
 (typically in the <code>{@link android.app.Activity#onCreate(Bundle) onCreate()}</code> method):
 <pre>
 Button myButton = (Button) findViewById(R.id.my_button);
@@ -178,16 +178,16 @@
   </li>
 </ol>
 <p>Defining IDs for view objects is important when creating a {@link android.widget.RelativeLayout}.
-In a relative layout, sibling views can define their layout relative to another sibling view, 
+In a relative layout, sibling views can define their layout relative to another sibling view,
 which is referenced by the unique ID.</p>
 <p>An ID need not be unique throughout the entire tree, but it should be
-unique within the part of the tree you are searching (which may often be the entire tree, so it's best 
+unique within the part of the tree you are searching (which may often be the entire tree, so it's best
 to be completely unique when possible).</p>
 
 
 <h3 id="layout-params">Layout Parameters</h3>
 
-<p>XML layout attributes named <code>layout_<em>something</em></code> define 
+<p>XML layout attributes named <code>layout_<em>something</em></code> define
 layout parameters for the View that are appropriate for the ViewGroup in which it resides.</p>
 
 <p>Every ViewGroup class implements a nested class that extends {@link
@@ -201,7 +201,7 @@
 parameters associated with each view.</p>
 
 <p>Note that every LayoutParams subclass has its own syntax for setting
-values. Each child element must define LayoutParams that are appropriate for its parent, 
+values. Each child element must define LayoutParams that are appropriate for its parent,
 though it may also define different LayoutParams for its own children. </p>
 
 <p>All view groups include a width and height (<code>layout_width</code> and
@@ -236,7 +236,7 @@
    two dimensions, expressed as a width and a height. The unit for location
    and dimensions is the pixel.
    </p>
-  
+
    <p>
    It is possible to retrieve the location of a view by invoking the methods
    {@link android.view.View#getLeft()} and {@link android.view.View#getTop()}. The former returns the left, or X,
@@ -246,7 +246,7 @@
    when <code>getLeft()</code> returns 20, that means the view is located 20 pixels to the
    right of the left edge of its direct parent.
    </p>
-  
+
    <p>
    In addition, several convenience methods are offered to avoid unnecessary
    computations, namely {@link android.view.View#getRight()} and {@link android.view.View#getBottom()}.
@@ -254,14 +254,14 @@
    rectangle representing the view. For instance, calling {@link android.view.View#getRight()}
    is similar to the following computation: <code>getLeft() + getWidth()</code>.
    </p>
-   
+
 
 <h2 id="SizePaddingMargins">Size, Padding and Margins</h2>
    <p>
    The size of a view is expressed with a width and a height. A view actually
    possess two pairs of width and height values.
    </p>
-  
+
    <p>
    The first pair is known as <em>measured width</em> and
    <em>measured height</em>. These dimensions define how big a view wants to be
@@ -269,16 +269,16 @@
    measured dimensions can be obtained by calling {@link android.view.View#getMeasuredWidth()}
    and {@link android.view.View#getMeasuredHeight()}.
    </p>
-  
+
    <p>
    The second pair is simply known as <em>width</em> and <em>height</em>, or
    sometimes <em>drawing width</em> and <em>drawing height</em>. These
    dimensions define the actual size of the view on screen, at drawing time and
    after layout. These values may, but do not have to, be different from the
    measured width and height. The width and height can be obtained by calling
-   {@link android.view.View#getWidth()} and {@link android.view.View#getHeight()}. 
+   {@link android.view.View#getWidth()} and {@link android.view.View#getHeight()}.
    </p>
-  
+
    <p>
    To measure its dimensions, a view takes into account its padding. The padding
    is expressed in pixels for the left, top, right and bottom parts of the view.
@@ -287,9 +287,9 @@
    2 pixels to the right of the left edge. Padding can be set using the
    {@link android.view.View#setPadding(int, int, int, int)} method and queried by calling
    {@link android.view.View#getPaddingLeft()}, {@link android.view.View#getPaddingTop()},
-   {@link android.view.View#getPaddingRight()} and {@link android.view.View#getPaddingBottom()}.  
+   {@link android.view.View#getPaddingRight()} and {@link android.view.View#getPaddingBottom()}.
    </p>
-  
+
    <p>
    Even though a view can define a padding, it does not provide any support for
    margins. However, view groups provide such a support. Refer to
@@ -297,13 +297,13 @@
    {@link android.view.ViewGroup.MarginLayoutParams} for further information.
    </p>
 
-   <p>For more information about dimensions, see 
+   <p>For more information about dimensions, see
    <a href="{@docRoot}guide/topics/resources/more-resources.html#Dimension">Dimension Values</a>.
    </p>
-   
 
-   
-   
+
+
+
 
 
 <style type="text/css">
@@ -332,7 +332,7 @@
 possible. Your layout draws faster if it has fewer nested layouts (a wide view hierarchy is
 better than a deep view hierarchy).</p>
 
-<!-- 
+<!--
 <h2 id="framelayout">FrameLayout</h2>
 <p>{@link android.widget.FrameLayout FrameLayout} is the simplest type of layout
 object. It's basically a blank space on your screen that you can
@@ -417,7 +417,7 @@
 android.widget.ListView}, initialize a new {@link android.widget.ArrayAdapter} using a
 constructor to specify the layout for each string and the string array:</p>
 <pre>
-ArrayAdapter adapter = new ArrayAdapter&lt;String>(this, 
+ArrayAdapter&lt;String> adapter = new ArrayAdapter&lt;String>(this,
         android.R.layout.simple_list_item_1, myStringArray);
 </pre>
 <p>The arguments for this constructor are:</p>
@@ -453,14 +453,14 @@
 android.database.Cursor} you want in the layout for each result and an integer array specifying the
 corresponding views that each column should be placed:</p>
 <pre>
-String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME, 
+String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME,
                         ContactsContract.CommonDataKinds.Phone.NUMBER};
 int[] toViews = {R.id.display_name, R.id.phone_number};
 </pre>
 <p>When you instantiate the {@link android.widget.SimpleCursorAdapter}, pass the layout to use for
 each result, the {@link android.database.Cursor} containing the results, and these two arrays:</p>
 <pre>
-SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, 
+SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
         R.layout.person_name_and_number, cursor, fromColumns, toViews, 0);
 ListView listView = getListView();
 listView.setAdapter(adapter);
@@ -490,7 +490,7 @@
     }
 };
 
-listView.setOnItemClickListener(mMessageClickedHandler); 
+listView.setOnItemClickListener(mMessageClickedHandler);
 </pre>
 
 
diff --git a/docs/html/images/tools/projectview01.png b/docs/html/images/tools/projectview01.png
new file mode 100644
index 0000000..90589fb
--- /dev/null
+++ b/docs/html/images/tools/projectview01.png
Binary files differ
diff --git a/docs/html/images/tools/projectview03.png b/docs/html/images/tools/projectview03.png
new file mode 100644
index 0000000..f527ff1
--- /dev/null
+++ b/docs/html/images/tools/projectview03.png
Binary files differ
diff --git a/docs/html/images/tools/signadt3.png b/docs/html/images/tools/signadt3.png
new file mode 100644
index 0000000..3f5650b
--- /dev/null
+++ b/docs/html/images/tools/signadt3.png
Binary files differ
diff --git a/docs/html/images/tools/signadt4.png b/docs/html/images/tools/signadt4.png
new file mode 100644
index 0000000..2adfff0
--- /dev/null
+++ b/docs/html/images/tools/signadt4.png
Binary files differ
diff --git a/docs/html/images/tools/signadt5.png b/docs/html/images/tools/signadt5.png
new file mode 100644
index 0000000..e1861e8
--- /dev/null
+++ b/docs/html/images/tools/signadt5.png
Binary files differ
diff --git a/docs/html/images/tools/signstudio1.png b/docs/html/images/tools/signstudio1.png
new file mode 100644
index 0000000..374e04f
--- /dev/null
+++ b/docs/html/images/tools/signstudio1.png
Binary files differ
diff --git a/docs/html/images/tools/signstudio10.png b/docs/html/images/tools/signstudio10.png
new file mode 100644
index 0000000..5b9ae6d
--- /dev/null
+++ b/docs/html/images/tools/signstudio10.png
Binary files differ
diff --git a/docs/html/images/tools/signstudio11.png b/docs/html/images/tools/signstudio11.png
new file mode 100644
index 0000000..0bf0d51
--- /dev/null
+++ b/docs/html/images/tools/signstudio11.png
Binary files differ
diff --git a/docs/html/images/tools/signstudio2.png b/docs/html/images/tools/signstudio2.png
new file mode 100644
index 0000000..5e8e416
--- /dev/null
+++ b/docs/html/images/tools/signstudio2.png
Binary files differ
diff --git a/docs/html/images/tools/signstudio3.png b/docs/html/images/tools/signstudio3.png
new file mode 100644
index 0000000..f25bf00
--- /dev/null
+++ b/docs/html/images/tools/signstudio3.png
Binary files differ
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index cf594dc..beea0ca 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -19,6 +19,7 @@
       <li><a href="#BehaviorNotifications">If your app implements notifications...</a></li>
       <li><a href="#BehaviorMediaControl">If your app uses RemoteControlClient...</a></li>
 <li><a href="#BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</a></li>
+<li><a href="#64BitSupport">If you are using the Android Native Development Kit (NDK)...</a></li>
     </ol>
   </li>
   <li><a href="#UI">User Interface</a>
@@ -246,6 +247,29 @@
 its own tasks, use {@code android.app.ActivityManager.getAppTasks()} instead to
 retrieve that information.</p>
 
+<h3 id="64BitSupport">If you are using the Android Native Development Kit (NDK)...</h3>
+
+<p>The L Developer Preview introduces support for 64-bit systems and other
+  preview NDK APIs. The 64-bit enhancement adds needed address space as Android
+  usage diversifies and increases performance while still supporting existing
+  32-bit apps fully. Use of OpenSSL for cryptography in the platform is also
+  faster. In addition, this release introduces new native audio and media NDK
+  APIs and native OpenGL ES (GLES) 3.1 support.</p>
+
+<p>To use this enhancement, download and install NDK Revision 10 from the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK page</a>. Refer to the
+Revision 10 <a href="{@docRoot}tools/sdk/ndk/index.html#Revisions">release notes</a>
+for more information about important changes and bug fixes to the NDK.</p>
+
+<p>If you are using the NDK and want to use the features provided in the L
+  Developer Preview, download the {@code android-ndk64-r10} package for your
+  target platform. Due to a
+  <a href="https://code.google.com/p/android/issues/detail?id=73705">known issue</a>,
+  you must still download the 64-bit package even if you only want to compile
+  apps for 32-bit systems. The package also includes
+  the {@code gcc-4.9} compiler for both 32- and 64-bit apps. The L Developer
+  Preview API library is located under the {@code platforms/android-L/} API directory.</p>
+
 <h2 id="UI">User Interface</h2>
 
 <h3 id="MaterialDesign">Material design support</h3>
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index a505905..819976e 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -68,6 +68,8 @@
             Recommendations</a></li>
         </ul>
       </li>
+      <li><a href="<?cs var:toroot ?>preview/tv/tif/index.html">
+        TV Input Framework</a></li>
       <li><a href="<?cs var:toroot ?>preview/tv/games/index.html">
         Games on TV</a></li>
       <li><a href="<?cs var:toroot ?>preview/tv/start/hardware-features.html">
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
index 9d7844b..3220d63 100644
--- a/docs/html/preview/support.jd
+++ b/docs/html/preview/support.jd
@@ -106,3 +106,15 @@
 <li>Deleting a Android work profile may take several minutes to complete. You
 cannot create a new Android work profile until the deletion operation is over.</li>
 </ul>
+
+<h3 id="64bitsupport">64-bit support</h3>
+<ul>
+<li><p>If you are using the NDK to compile apps for 32- or 64-bit systems and
+want to use the features provided in the L Developer Preview, download the
+{@code android-ndk64-r10} package for your target platform from the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK page</a>. The
+{@code android-ndk64-r10} package contains the L Developer Preview API
+library (located under the {@code platforms/android-L/} API directory) for both
+32- and 64-bit systems. The package also includes the {@code gcc-4.9} compiler
+for both 32- and 64-bit apps.</p></li>
+</ul>
diff --git a/docs/html/preview/tv/adt-1/index.jd b/docs/html/preview/tv/adt-1/index.jd
index 882f421..b37a55a 100644
--- a/docs/html/preview/tv/adt-1/index.jd
+++ b/docs/html/preview/tv/adt-1/index.jd
@@ -52,16 +52,16 @@
 </p>
 <p>Unplug the included power cable from the back of ADT-1. The device does not have an on/off
   switch. However, ADT-1 will begin sleeping (daydream) based on user settings in
-  <strong>Settings &gt; Display &gt; Daydream</strong>.
+  <strong>Settings &gt; Device &gt; Display &gt; Daydream</strong>.
   </p>
 
 <p>
   <strong>How do I connect to the network?</strong>
 </p>
 <p>ADT-1 has both wireless and Ethernet for connecting to your network. To change your wireless
-  network, go to <strong>Settings -&gt; Wi-Fi</strong>. To use an Ethernet network connection,
-  simply plug an Ethernet cable (that is connected to your network) into the port on the back of
-  ADT-1.</p>
+  network, go to <strong>Settings &gt; Device &gt; Wi-Fi</strong>. To use an Ethernet network
+  connection, simply plug an Ethernet cable (that is connected to your network) into the port on
+  the back of ADT-1.</p>
 
 <p>
   <strong>How do I use the developer cable?</strong>
@@ -70,6 +70,35 @@
   power port on the back of ADT-1, a standard male USB-A connector that connects your PC, and a
   small, female power connector that the included power supply plugs into.</p>
 
+<p class="note">
+  <strong>Note:</strong> Make sure you have enabled USB debugging in <strong>Settings &gt;
+  Preferences &gt; Developer options &gt; Debugging &gt; USB debugging</strong>, so that you can
+  use the Android Debug Bridge (adb) to connect with the ADT-1 device.
+</p>
+
+<p id="adb-tcp">
+  <strong>Can I connect without a developer cable?</strong>
+</p>
+<p>
+  Yes. The ADT-1 device is enabled for Android Debug Bridge (adb) connections over TCP/IP. To
+  connect to the ADT-1 device using this method:
+</p>
+<ol>
+  <li>Make sure that your development computer and the ADT-1 device are on the same network.</li>
+  <li>Determine the IP address of the ADT-1 device by navigating to <strong>Settings &gt;
+    Device &gt; Wi-Fi &gt; your-network-name &gt; Status info</strong>.</li>
+  <li>Connect to the ADT-1 device using the following adb command:
+<pre>
+$ adb connect &lt;ip-address-for-adt-1&gt;:4321
+</pre>
+  </li>
+</ol>
+
+<p class="note">
+  <strong>Note:</strong> Make sure you have enabled USB debugging in <strong>Settings &gt;
+  Preferences &gt; Developer options &gt; Debugging &gt; USB debugging</strong>, so that you can
+  use the Android Debug Bridge (adb) to connect with the ADT-1 device.
+</p>
 
 
 <h3 id="input">User Input</h3>
@@ -179,8 +208,8 @@
   <strong>How do I register my ADT-1 in order to run my apps?</strong>
 </p>
 <ol>
-  <li>Go to <strong>Settings &gt; Google Cast</strong> and turn on developer support, allowing the
-    ADT-1 device to send its serial number to Google.</li>
+  <li>Go to <strong>Settings &gt; Device &gt; Google Cast</strong> and turn on developer support,
+    allowing the ADT-1 device to send its serial number to Google.</li>
   <li>Register your ADT-1 device in the Google Cast Developer Console, using the 12 character
     serial number engraved on the back of the ADT-1.</li>
 </ol>
@@ -203,8 +232,8 @@
 <p>
   <strong>Why doesn't the on-screen keyboard come up?</strong>
 </p>
-<p>Enable the keyboard in the device Settings. Go to <strong>Settings &gt; Keyboard &gt; Current
-  keyboard</strong> and choose <strong>Leanback keyboard</strong>.
+<p>Enable the keyboard in the device Settings. Go to <strong>Settings &gt; Preferences &gt;
+  Keyboard &gt; Current keyboard</strong> and choose <strong>Leanback keyboard</strong>.
 
 <p>
   <strong>How do I perform a hardware reboot?</strong>
@@ -221,8 +250,8 @@
   data, downloaded apps, app data, and account settings.
 </p>
 
-<p>From the home screen, go to <strong>Settings &gt; Device &gt; Factory data reset</strong>, and
-  select <strong>Reset device</strong>.
+<p>From the home screen, go to <strong>Settings &gt; Device &gt; Storage &amp; Reset</strong>, and
+  select <strong>Factory data reset</strong>.
 </p>
 
 <p>
@@ -279,4 +308,3 @@
   <li><a href="regulatory.html">Regulatory Disclosures</a></li>
   <li><a href="safety.html">Important Safety Information</a></li>
 </ul>
-
diff --git a/docs/html/preview/tv/images/tif-overview.png b/docs/html/preview/tv/images/tif-overview.png
new file mode 100644
index 0000000..197775e
--- /dev/null
+++ b/docs/html/preview/tv/images/tif-overview.png
Binary files differ
diff --git a/docs/html/preview/tv/tif/index.jd b/docs/html/preview/tv/tif/index.jd
new file mode 100644
index 0000000..ef02def
--- /dev/null
+++ b/docs/html/preview/tv/tif/index.jd
@@ -0,0 +1,38 @@
+page.title=TV Input Framework
+page.tags=tif
+
+@jd:body
+
+<p>
+  Watching live television shows and other continuous, channel-based content is a big part of the
+  TV experience. Android supports receiving and playback of live video content through the TV Input
+  Framework. This framework provides a unified method for receiving audio and video channel content
+  from hardware sources, such as HDMI ports and built-in-tuners, and software sources, such as
+  video streamed over the internet.
+</p>
+<p>
+  The framework enables developers to define live TV input sources by implementing a TV input
+  service. This service publishes a list of channels and programs to the TV Provider. The live TV
+  app on a TV device gets the list of available channels and programs from the TV Provider and
+  displays them to a user. When a user selects a specific channel, the live TV app creates a
+  session for the associated TV input service through the TV Input Manager, and tells the TV input
+  service to tune to the requested channel and play the content to a display surface provided by
+  the TV app.
+</p>
+
+<img src="{@docRoot}preview/tv/images/tif-overview.png" id="figure1">
+<p class="img-caption">
+  <strong>Figure 1.</strong> Functional diagram of the TV Input Framework
+</p>
+
+<p>
+  The TV Input Framework is designed to provide access to a wide variety of live TV input sources
+  and bring them together in a single user interface for users to browse, view, and enjoy content.
+  Building a TV input service for your content can help make it more accessible on TV devices.
+</p>
+
+<p>
+  The APIs for the TV Input Framework are available in the L Developer Preview and you can
+  review them in the preview API reference docs. However, more changes are planned, so stay tuned
+  for additional information with the official Android platform launch.
+</p>
diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd
index c0d523a..a7c12d4 100644
--- a/docs/html/sdk/installing/create-project.jd
+++ b/docs/html/sdk/installing/create-project.jd
@@ -76,7 +76,7 @@
 <img src="{@docRoot}images/tools/wizard7.png" alt="" width="750" height="509">
 <p class="img-caption"><strong>Figure 7.</strong> The default project structure for a mobile app.</p>
 
-<p>Now you are ready to develop your app. Fore more information, see the following links:</p>
+<p>Now you are ready to develop your app. For more information, see the following links:</p>
 
 <ul>
 <li><a href="{@docRoot}training/">Training Lessons</a></li>
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index 864e82e..5a433d4 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,8 +1,8 @@
 page.title=Installing the Eclipse Plugin
-adt.zip.version=23.0.2
-adt.zip.download=ADT-23.0.2.zip
-adt.zip.bytes=103287135
-adt.zip.checksum=cde1d0a463b5ccce844b63161cfa1cb9
+adt.zip.version=23.0.3
+adt.zip.download=ADT-23.0.3.zip
+adt.zip.bytes=103321934
+adt.zip.checksum=ab2f5e2fbbdddeeb7dfd02cd4046538a
 
 @jd:body
 
@@ -104,7 +104,7 @@
   </tr>
   <tr>
     <td>
-      <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
+      <a href="https://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
     </td>
     <td>{@adtZipBytes} bytes</td>
     <td>{@adtZipChecksum}</td>
diff --git a/docs/html/sdk/installing/studio-androidview.jd b/docs/html/sdk/installing/studio-androidview.jd
new file mode 100644
index 0000000..09aeaba
--- /dev/null
+++ b/docs/html/sdk/installing/studio-androidview.jd
@@ -0,0 +1,55 @@
+page.title=Using the Android Project View
+
+@jd:body
+
+
+<p>The Android project view in Android Studio shows a flattened version of your project's structure
+that provides quick access to the key source files of Android projects and helps you work with
+the new <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. The
+Android project view:</p>
+
+<ul>
+<li>Groups the build files for all modules at the top level of the project hierarchy.</li>
+<li>Shows the most important source directories at the top level of the module hierarchy.</li>
+<li>Groups all the manifest files for each module.</li>
+<li>Shows resource files from all Gradle source sets.</li>
+<li>Groups resource files for different locales, orientations, and screen types in a single group
+per resource type.</li>
+</ul>
+
+<div style="float:right;margin-left:30px;width:240px">
+<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/>
+<p class="img-caption"><strong>Figure 1:</strong> Show the Android project view.</p>
+</div>
+
+
+<h2 id="enable-view">Enable the Android Project View</h2>
+
+<p>The Android project view is not yet enabled by default. To show the Android project view,
+click <strong>Project</strong> and select <strong>Android</strong>, as shown in Figure 1.</p>
+
+
+<h2 id="project-view">Use the Android Project View</h2>
+
+<p>The Android project view shows all the build files at the top level of the project hierarchy
+under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top
+level of the project hierarchy and contains these three elements at the top level:</p>
+
+<ul>
+<li><code>java/</code> - Source files for the module.</li>
+<li><code>manifests/</code> - Manifest files for the module.</li>
+<li><code>res/</code> - Resource files for the module.</li>
+</ul>
+
+<p>Figure 2 shows how the Android project view groups all the instances of the
+<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
+
+<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
+work with Android projects by providing a flattened structure that highlights the most commonly
+used files while developing Android applications. However, the project structure on disk differs
+from this representation.</p>
+
+<img src="{@docRoot}images/tools/projectview03.png" alt=""
+     style="margin-top:10px" width="650" height="508"/>
+<p class="img-caption"><strong>Figure 2:</strong> The traditional project view (left) and the
+Android project view (right).</p>
\ No newline at end of file
diff --git a/docs/html/sdk/installing/studio-tips.jd b/docs/html/sdk/installing/studio-tips.jd
index 12d2527..03e29ca 100644
--- a/docs/html/sdk/installing/studio-tips.jd
+++ b/docs/html/sdk/installing/studio-tips.jd
@@ -52,6 +52,12 @@
 <p>The following topics describe how to perform
 some basic development tasks with Android Studio.</p>
 
+<p class="note"><strong>Note:</strong> This section lists Android Studio keyboard shortcuts
+for the default keymap. To change the default keymap on Windows and Linux, go to
+<strong>File</strong> &gt; <strong>Settings</strong> &gt; <strong>Keymap</strong>. To change
+the default keymap on Mac OS X, go to <strong>Android Studio</strong> &gt;
+<strong>Preferences</strong> &gt; <strong>Keymap</strong>.</p>
+
 <h3>Creating virtual devices</h3>
 
 <p>All the capabilities of the <a href="{@docRoot}tools/devices/managing-avds.html">Android
@@ -75,10 +81,11 @@
 <h3>Creating new files</h3>
 
 <p>You can quickly add new code and resource files by clicking the appropriate directory in the
-<strong>Project</strong> pane and pressing CTRL + N (CMD + N, on Mac). Based on the type of
-directory selected, Android Studio offers to create the appropriate file type.</p>
+<strong>Project</strong> pane and pressing ALT + INSERT on Windows and Linux or COMMAND + N on Mac.
+Based on the type of directory selected, Android Studio offers to create the appropriate file
+type.</p>
 
-<p>For example, if you select a layout directory, press CTRL + N, and select
+<p>For example, if you select a layout directory, press ALT + INSERT on Windows, and select
 <strong>Layout resource file</strong>, a dialog opens so you can name the file (you can exclude
 the {@code .xml} suffix) and choose a root view element. The editor then switches to the layout
 design editor so you can begin designing your layout.</p>
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index e7f93bc..ee14b19 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -251,36 +251,36 @@
     <td>Windows</td>
     <td>
   <a onclick="return onDownload(this)" id="win-studio"
-      href="http://dl.google.com/android/studio/install/0.8.0/android-studio-bundle-135.1245622-windows.exe">
-      android-studio-bundle-135.1245622-windows.exe
+      href="https://dl.google.com/android/studio/install/0.8.6/android-studio-bundle-135.1339820-windows.exe">
+      android-studio-bundle-135.1339820-windows.exe
       </a>
     </td>
-    <td>380000036 bytes</td>
-    <td>5720baef7d492f2df7398a38dae2fa92</td>
+    <td>379497130 bytes</td>
+    <td>024e002b8c8fa7dcd2ff69fd69e06e56</td>
   </tr>
 
   <tr>
     <td><nobr>Mac OS X</nobr></td>
     <td>
   <a onclick="return onDownload(this)" id="mac-studio"
-    href="http://dl.google.com/android/studio/install/0.8.0/android-studio-bundle-135.1245622-mac.dmg">
-    android-studio-bundle-135.1245622-mac.dmg
+    href="https://dl.google.com/android/studio/install/0.8.6/android-studio-bundle-135.1339820-mac.dmg">
+    android-studio-bundle-135.1339820-mac.dmg
     </a>
     </td>
-    <td>368451923 bytes</td>
-    <td>fa9da3625db44687576c5c4e8f96280e</td>
+    <td>368507143 bytes</td>
+    <td>4143f2aa556634eae91701965d88899b</td>
   </tr>
 
   <tr>
     <td>Linux</td>
     <td>
   <a onclick="return onDownload(this)" id="linux-studio"
-    href="http://dl.google.com/android/studio/install/0.8.0/android-studio-bundle-135.1245622-linux.tgz">
-    android-studio-bundle-135.1245622-linux.tgz
+    href="https://dl.google.com/android/studio/install/0.8.6/android-studio-bundle-135.1339820-linux.tgz">
+    android-studio-bundle-135.1339820-linux.tgz
     </a>
     </td>
-    <td>417756987 bytes</td>
-    <td>c70dd2e4035484b84f0ad0046a34f136</td>
+    <td>417631443 bytes</td>
+    <td>fa403762ecd0a5da87acbeff485f81cc</td>
   </tr>
   </table>
 
@@ -450,6 +450,17 @@
 <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=""/>Android Studio v0.8.6</a> <em>(August 2014)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+    <p>See <a href="http://tools.android.com/recent">tools.android.com</a> for a full list of changes.</p>
+  </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=""/>Android Studio v0.8.0</a> <em>(June 2014)</em>
   </p>
 
@@ -636,7 +647,7 @@
   if (os) {
     /* set up primary ACE download button */
     $('#download-ide-button').show();
-    $('#download-ide-button').append("Download Android Studio Beta <span class='small'>v0.8.0</span>"
+    $('#download-ide-button').append("Download Android Studio Beta <span class='small'>v0.8.6</span>"
         + "<br/> <span class='small'>with the Android SDK for " + os + "</span>");
     $('#download-ide-button').click(function() {return onDownload(this,true);}).attr('href', bundlename);
 
diff --git a/docs/html/tools/publishing/app-signing.jd b/docs/html/tools/publishing/app-signing.jd
index 1de1fd7..53e6e65 100644
--- a/docs/html/tools/publishing/app-signing.jd
+++ b/docs/html/tools/publishing/app-signing.jd
@@ -4,33 +4,26 @@
 <div id="qv-wrapper">
 <div id="qv">
 
-<h2>Quickview</h2>
-
-<ul>
-<li>All Android apps <em>must</em> be signed</li>
-<li>You can sign with a self-signed key</li>
-<li>How you sign your apps is critical &mdash; read this document carefully</li>
-<li>Determine your signing strategy early in the development process</li>
-</ul>
-
 <h2>In this document</h2>
 
 <ol>
-<li><a href="#signing">Signing Process</a></li>
-<li><a href="#strategies">Signing Strategies</a></li>
-<li><a href="#setup">Basic Setup for Signing</a></li>
-<li><a href="#debugmode">Signing in Debug Mode</a></li>
-<li><a href="#releasemode">Signing Release Mode</a>
-    <ol>
-    <li><a href="#cert">Obtain a suitable private key</a></li>
-    <li><a href="#releasecompile">Compile the application in release mode</a></li>
-    <li><a href="#signapp">Sign your application with your private key</a></li>
-    <li><a href="#align">Align the final APK package</a></li>
-    <li><a href="#ExportWizard">Compile and sign with Eclipse ADT</a></li>
-    </ol>
+<li><a href="#overview">Signing Overview</a>
+  <ol>
+  	<li><a href="#debug-mode">Signing in Debug Mode</a></li>
+  	<li><a href="#release-mode">Signing in Release Mode</a></li>
+  	<li><a href="#wear-apps">Signing Android Wear Apps</a></li>
+  </ol>
 </li>
+<li><a href="#studio">Signing Your App in Android Studio</a>
+  <ol>
+  	<li><a href="sign-auto">Automatically Signing Your App</a></li>
+  </ol>
+</li>
+<li><a href="#adt">Signing Your App with the ADT plugin for Eclipse</a></li>
+<li><a href="#considerations">Signing Considerations</a></li>
 <li><a href="#secure-key">Securing Your Private Key</a></li>
-
+<li><a href="#expdebug">Expiry of the Debug Certificate</a></li>
+<li><a href="#signing-manually">Signing Your App Manually</a></li>
 </ol>
 
 <h2>See also</h2>
@@ -43,588 +36,288 @@
 </div>
 </div>
 
-<p>The Android system requires that all installed applications be digitally signed with a
-certificate whose private key is held by the application's developer. The Android system uses the
-certificate as a means of identifying the author of an application and establishing trust
-relationships between applications. The certificate is not used to control which applications the
-user can install. The certificate does not need to be signed by a certificate authority: it is
-perfectly allowable, and typical, for Android applications to use self-signed certificates.</p>
 
-<p>The important points to understand about signing Android applications are:</p>
-
-<ul>
-  <li>All applications <em>must</em> be signed. The system will not install an application
-on an emulator or a device if it is not signed.</li>
-  <li>To test and debug your application, the build tools sign your application with a special debug
-    key that is created by the Android SDK build tools.</li>
-  <li>When you are ready to release your application for end-users, you must sign it with a suitable
-    private key. You cannot publish an application that is signed with the debug key generated
-    by the SDK tools.</li>
-  <li>You can use self-signed certificates to sign your applications. No certificate authority is
-    needed.</li>
-  <li>The system tests a signer certificate's expiration date only at install time. If an
-application's signer certificate expires after the application is installed, the application
-will continue to function normally.</li>
-  <li>You can use standard tools &mdash; Keytool and Jarsigner &mdash; to generate keys and
-sign your application {@code .apk} files.</li>
-  <li>After you sign your application for release, we recommend that you use the
-    <code>zipalign</code> tool to optimize the final APK package.</li>
-</ul>
-
-<p>The Android system will not install or run an application that is not signed appropriately. This
-applies wherever the Android system is run, whether on an actual device or on the emulator.
-For this reason, you must <a href="#setup">set up signing</a> for your application before you can
-run it or debug it on an emulator or device.</p>
-
-<h2 id="signing">Signing Process</h3>
-
-<p>The Android build process signs your application differently depending on which build mode you
-use to build your application. There are two build modes: <em>debug mode</em> and <em>release
-mode</em>. You use debug mode when you are developing and testing your application. You use
-release mode when you want to build a release version of your application that you can
-distribute directly to users or publish on an application marketplace such as Google Play.</p>
-
-<p>When you build in <em>debug mode</em> the Android SDK build tools use the Keytool utility
-(included in the JDK) to create a debug key. Because the SDK build tools created the debug key,
-they know the debug key's alias and password. Each time you compile your application in debug mode,
-the build tools use the debug key along with the Jarsigner utility (also included in the JDK) to
-sign your application's <code>.apk</code> file. Because the alias and password are known to the SDK
-build tools, the tools don't need to prompt you for the debug key's alias and password each time
-you compile.</p>
-
-<p>When you build in <em>release mode</em> you use your own private key to sign your application. If
-you don't have a private key, you can use the Keytool utility to create one for you. When you
-compile your application in release mode, the build tools use your private key along with the
-Jarsigner utility to sign your application's <code>.apk</code> file. Because the certificate and
-private key you use are your own, you must provide the password for the keystore and key alias.</p>
-
-<p>The debug signing process happens automatically when you run or debug your application using
-Eclipse with the ADT plugin. Debug signing also happens automatically when you use the Ant build
-script with the <code>debug</code> option. You can automate the release signing process by using the
-Eclipse Export Wizard or by modifying the Ant build script and building with the
-<code>release</code> option.</p>
-
-<h2 id="strategies">Signing Strategies</h2>
-
-<p>Some aspects of application signing may affect how you approach the development
-of your application, especially if you are planning to release multiple
-applications. </p>
-
-<p>In general, the recommended strategy for all developers is to sign
-all of your applications with the same certificate, throughout the expected
-lifespan of your applications. There are several reasons why you should do so: </p>
-
-<ul>
-<li>Application upgrade &ndash; As you release updates to your application, you
-must continue to sign the updates with the same certificate or set of certificates,
-if you want users to be able to upgrade seamlessly to the new version. When
-the system is installing an update to an application, it compares the
-certificate(s) in the new version with those in the existing version. If the
-certificates match exactly, including both the certificate data and order, then
-the system allows the update. If you sign the new version without using matching
-certificates, you must also assign a different package name to the
-application &mdash; in this case, the user installs the new version as a
-completely new application. </li>
-
-<li>Application modularity &ndash; The Android system allows applications that
-are signed by the same certificate to run in the same process, if the
-applications so requests, so that the system treats them as a single application.
-In this way you can deploy your application in modules, and users can update
-each of the modules independently if needed.</li>
-
-<li>Code/data sharing through permissions &ndash; The Android system provides
-signature-based permissions enforcement, so that an application can expose
-functionality to another application that is signed with a specified
-certificate. By signing multiple applications with the same certificate and
-using signature-based permissions checks, your applications can share code and
-data in a secure manner. </li>
-
-</ul>
-
-<p>Another important consideration in determining your signing strategy is
-how to set the validity period of the key that you will use to sign your
-applications.</p>
-
-<ul>
-<li>If you plan to support upgrades for a single application, you should ensure
-that your key has a validity period that exceeds the expected lifespan of
-that application. A validity period of 25 years or more is recommended.
-When your key's validity period expires, users will no longer be
-able to seamlessly upgrade to new versions of your application.</li>
-
-<li>If you will sign multiple distinct applications with the same key,
-you should ensure that your key's validity period exceeds the expected
-lifespan of <em>all versions of all of the applications</em>, including
-dependent applications that may be added to the suite in the future. </li>
-
-<li>If you plan to publish your application(s) on Google Play, the
-key you use to sign the application(s) must have a validity period
-ending after 22 October 2033. Google Play enforces this requirement
-to ensure that users can seamlessly upgrade applications when
-new versions are available. </li>
-</ul>
-
-<p>As you design your application, keep these points in mind and make sure to
-use a <a href="#cert">suitable certificate</a> to sign your applications. </p>
-
-<h2 id="setup">Basic Setup for Signing</h2>
-
-<p>Before you begin, make sure that the Keytool utility and Jarsigner utility are available to
-the SDK build tools. Both of these tools are available in the JDK. In most cases, you can tell
-the SDK build tools how to find these utilities by setting your <code>JAVA_HOME</code> environment
-variable so it references a suitable JDK. Alternatively, you can add the JDK version of Keytool and
-Jarsigner to your <code>PATH</code> variable.</p>
-
-<p>If you are developing on a version of Linux that originally came with GNU Compiler for
-Java, make sure that the system is using the JDK version of Keytool, rather than the gcj
-version. If Keytool is already in your <code>PATH</code>, it might be pointing to a symlink at
-<code>/usr/bin/keytool</code>. In this case, check the symlink target to be sure it points
-to the Keytool in the JDK.</p>
-
-<h2 id="debugmode">Signing in Debug Mode</h2>
-
-<p>The Android build tools provide a debug signing mode that makes it easier for you
-to develop and debug your application, while still meeting the Android system
-requirement for signing your APK.
-When using debug mode to build your app, the SDK tools invoke Keytool to automatically create
-a debug keystore and key. This debug key is then used to automatically sign the APK, so
-you do not need to sign the package with your own key.</p>
-
-<p>The SDK tools create the debug keystore/key with predetermined names/passwords:</p>
-<ul>
-<li>Keystore name: "debug.keystore"</li>
-<li>Keystore password: "android"</li>
-<li>Key alias: "androiddebugkey"</li>
-<li>Key password: "android"</li>
-<li>CN: "CN=Android Debug,O=Android,C=US"</li>
-</ul>
-
-<p>If necessary, you can change the location/name of the debug keystore/key or
-supply a custom debug keystore/key to use. However, any custom debug
-keystore/key must use the same keystore/key names and passwords as the default
-debug key (as described above). (To do so in Eclipse/ADT, go to
-<strong>Windows</strong> &gt; <strong>Preferences</strong> &gt;
-<strong>Android</strong> &gt; <strong>Build</strong>.) </p>
-
-<p class="caution"><strong>Caution:</strong> You <em>cannot</em> release your application
-to the public when signed with the debug certificate.</p>
-
-<h3>Eclipse Users</h3>
-
-<p>If you are developing in Eclipse/ADT (and have set up Keytool and Jarsigner as described above in
-<a href="#setup">Basic Setup for Signing</a>),
-signing in debug mode is enabled by default. When you run or debug your
-application, ADT signs the {@code .apk} file with the debug certificate, runs {@code zipalign} on
-the package, then installs it on
-the selected emulator or connected device. No specific action on your part is needed,
-provided ADT has access to Keytool.</p>
-
-<h3>Ant Users</h3>
-
-<p>If you are using Ant to build your {@code .apk} file, debug signing mode
-is enabled by using the <code>debug</code> option with the <code>ant</code> command
-(assuming that you are using a <code>build.xml</code> file generated by the
-<code>android</code> tool). When you run <code>ant debug</code> to
-compile your app, the build script generates a keystore/key and signs the APK for you.
-The script then also aligns the APK with the <code>zipalign</code> tool.
-No other action on your part is needed. Read
-<a href="{@docRoot}tools/building/building-cmdline.html#DebugMode">Building and Running Apps
-on the Command Line</a> for more information.</p>
+<p>Android requires that all apps be digitally signed with a certificate before they can be
+installed. Android uses this certificate to identify the author of an app, and the certificate
+does not need to be signed by a certificate authority. Android apps often use self-signed
+certificates. The app developer holds the certificate's private key.</p>
 
 
-<h3 id="debugexpiry">Expiry of the Debug Certificate</h3>
+<h2 id="overview">Signing Overview</h2>
 
-<p>The self-signed certificate used to sign your application in debug mode (the default on
-Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.</p>
+<p>You can sign an app in debug or release mode. You sign your app in debug mode during development
+and in release mode when you are ready to distribute your app. The Android SDK generates a
+certificate to sign apps in debug mode. To sign apps in release mode, you need to generate
+your own certificate.</p>
 
-<p>When the certificate expires, you will get a build error. On Ant builds, the error
-looks like this:</p>
+<h3 id="debug-mode">Signing in Debug Mode</h3>
 
-<pre>debug:
-[echo] Packaging bin/samples-debug.apk, and signing it with a debug key...
-[exec] Debug Certificate expired on 8/4/08 3:43 PM</pre>
+<p>In debug mode, you sign your app with a debug certificate generated by the Android SDK tools.
+This certificate has a private key with a known password, so you can run and debug your app
+without typing the password every time you make a change to your project.</p>
 
-<p>In Eclipse/ADT, you will see a similar error in the Android console.</p>
+<p>Android Studio and the ADT plugin for Eclipse sign your app in debug mode automatically when
+you run or debug your project from the IDE.</p>
 
-<p>To fix this problem, simply delete the <code>debug.keystore</code> file.
-The default storage location for AVDs is in <code>~/.android/</code> on OS X and Linux,
-in <code>C:\Documents and Settings\&lt;user>\.android\</code> on Windows XP, and in
-<code>C:\Users\&lt;user>\.android\</code> on Windows Vista and Windows 7.</p>
+<p>You can run and debug an app signed in debug mode on the emulator and on devices connected
+to your development manchine through USB, but you cannot distribute an app signed in debug
+mode.</p>
 
+<p>For more information about how to build and run apps in debug mode, see
+<a href="{@docRoot}tools/building/index.html">Building and Running</a>.</p>
 
-<p>The next time you build, the build tools will regenerate a new keystore and debug key.</p>
+<h3 id="release-mode">Signing in Release Mode</h3>
 
-<p>Note that, if your development machine is using a non-Gregorian locale, the build
-tools may erroneously generate an already-expired debug certificate, so that you get an
-error when trying to compile your application. For workaround information, see the
-troubleshooting topic <a href="{@docRoot}resources/faq/troubleshooting.html#signingcalendar">
-I&nbsp;can't&nbsp;compile my app because the build tools generated an expired debug
-certificate</a>. </p>
+<p>In release mode, you sign your app with your own certificate:</p>
 
-
-<h2 id="releasemode">Signing in Release Mode</h2>
-
-<p>When your application is ready for release to other users, you must:</p>
 <ol>
-  <li><a href="#cert">Obtain a suitable private key</a></li>
-  <li><a href="#releasecompile">Compile the application in release mode</a></li>
-  <li><a href="#signapp">Sign your application with your private key</a></li>
-  <li><a href="#align">Align the final APK package</a></li>
+<li><em>Create a keystore.</em> A <strong>keystore</strong> is a binary file that contains a
+set of private keys. You must keep your keystore in a safe and secure place.</li>
+<li><em>Create a private key.</em> A <strong>private key</strong> represents the entity to
+be identified with the app, such as a person or a company.</li>
+<li><em>Build your project</em>. Generate an unsigned APK for your app.</li>
+<li><em>Sign your app.</em> Use your private key to generate a signed version of your APK.</li>
 </ol>
 
-<p>If you are developing in Eclipse with the ADT plugin, you can use the Export Wizard
-to perform the compile, sign, and align procedures. The Export Wizard even allows you to
-generate a new keystore and private key in the process. So if you use Eclipse, you can
-skip to <a href="#ExportWizard">Compile and sign with Eclipse ADT</a>.</p>
+<p>After you complete this process, you can distribute your app and publish it on Google Play.</p>
 
-
-
-<h3 id="cert">1. Obtain a suitable private key</h3>
-
-<p>In preparation for signing your application, you must first ensure that
-you have a suitable private key with which to sign. A suitable private
-key is one that:</p>
-
-<ul>
-<li>Is in your possession</li>
-<li>Represents the personal, corporate, or organizational entity to be identified
-with the application</li>
-<li>Has a validity period that exceeds the expected lifespan of the application
-or application suite. A validity period of more than 25 years is recommended.
-<p>If you plan to publish your application(s) on Google Play, note that a
-validity period ending after 22 October 2033 is a requirement. You can not upload an
-application if it is signed with a key whose validity expires before that date.
-</p></li>
-<li>Is not the debug key generated by the Android SDK tools. </li>
-</ul>
-
-<p>The key may be self-signed. If you do not have a suitable key, you must
-generate one using Keytool. Make sure that you have Keytool available, as described
-in <a href="#setup">Basic Setup</a>.</p>
-
-<p>To generate a self-signed key with Keytool, use the <code>keytool</code>
-command and pass any of the options listed below (and any others, as
-needed). </p>
-
-<p class="warning"><strong>Warning:</strong> Keep your private key secure.
-Before you run Keytool, make sure to read
-<a href="#secure-key">Securing Your Private Key</a> for a discussion of how to keep
-your key secure and why doing so is critically important to you and to users. In
-particular, when you are generating your key, you should select strong passwords
-for both the keystore and key.</p>
-
-<p class="warning"><strong>Warning:</strong> Keep the keystore file you generate with Keytool
-in a safe, secure place. You must use the same key to sign future versions of your application. If
-you republish your app with a new key, Google Play will consider it a new app. For more information
-on settings that must remain constant over the life of your app, see the Android Developer Blog post
-<a href="http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html">Things
-That Cannot Change</a>.</p>
-
-<table>
-<tr>
-<th>Keytool Option</th>
-<th>Description</th>
-</tr>
-<tr>
-<td><code>-genkey</code></td><td>Generate a key pair (public and private
-keys)</td>
-</tr>
-<tr>
-<td><code>-v</code></td><td>Enable verbose output.</td>
-</tr>
-<tr>
-<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key. Only
-the first 8 characters of the alias are used.</td>
-</tr>
-<tr>
-<td><code>-keyalg &lt;alg&gt;</code></td><td>The encryption algorithm to use
-when generating the key. Both DSA and RSA are supported.</td>
-</tr>
-<tr>
-<td><code>-keysize &lt;size&gt;</code></td><td>The size of each generated key
-(bits). If not supplied, Keytool uses a default key size of 1024 bits. In
-general, we recommend using a key size of 2048 bits or higher. </td>
-</tr>
-<tr>
-<td><code>-dname &lt;name&gt;</code></td><td><p>A Distinguished Name that describes
-who created the key. The value is used as the issuer and subject fields in the
-self-signed certificate. </p><p>Note that you do not need to specify this option
-in the command line. If not supplied, Jarsigner prompts you to enter each
-of the Distinguished Name fields (CN, OU, and so on).</p></td>
-</tr>
-<tr>
-<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the
-key.</p> <p>As a security precaution, do not include this option in your command
-line. If not supplied, Keytool prompts you to enter the password. In this way,
-your password is not stored in your shell history.</p></td>
-</tr>
-<tr>
-<td><code>-validity &lt;valdays&gt;</code></td><td><p>The validity period for the
-key, in days. </p><p><strong>Note:</strong> A value of 10000 or greater is recommended.</p></td>
-</tr>
-<tr>
-<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>A name
-for the keystore containing the private key.</td>
-</tr>
-<tr>
-<td><code>-storepass &lt;password&gt;</code></td><td><p>A password for the
-keystore.</p><p>As a security precaution, do not include this option in your
-command line. If not supplied, Keytool prompts you to enter the password. In
-this way, your password is not stored in your shell history.</p></td>
-</tr>
-</table>
-
-<p>Here's an example of a Keytool command that generates a private key:</p>
-
-<pre>$ keytool -genkey -v -keystore my-release-key.keystore
--alias alias_name -keyalg RSA -keysize 2048 -validity 10000</pre>
-
-<p>Running the example command above, Keytool prompts you to provide
-passwords for the keystore and key, and to provide the Distinguished
-Name fields for your key. It then generates the keystore as a file called
-<code>my-release-key.keystore</code>. The keystore and key are
-protected by the passwords you entered. The keystore contains
-a single key, valid for 10000 days. The alias is a name that you &mdash;
-will use later, to refer to this keystore when signing your application. </p>
-
-<p>For more information about Keytool, see the documentation at
-<a
-href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html">
-http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html</a></p>
-
-
-
-<h3 id="releasecompile">2. Compile the application in release mode</h3>
-
-<p>In order to release your application to users, you must compile it in release mode.
-In release mode, the compiled application is not signed by default and you will need
-to sign it with your private key.</p>
-
-<p class="caution"><strong>Caution:</strong>
-You can not release your application unsigned, or signed with the debug key.</p>
-
-<h4>With Eclipse</h4>
-
-<p>To export an <em>unsigned</em> APK from Eclipse, right-click the project in the Package
-Explorer and select <strong>Android Tools</strong> > <strong>Export Unsigned Application
-Package</strong>. Then specify the file location for the unsigned APK.
-(Alternatively, open your <code>AndroidManifest.xml</code> file in Eclipse, select
-the <strong>Manifest</strong> tab, and click <strong>Export an unsigned APK</strong>.)</p>
-
-<p>Note that you can combine the compiling and signing steps with the Export Wizard. See
-<a href="#ExportWizard">Compiling and signing with Eclipse ADT</a>.</p>
-
-<h4>With Ant</h4>
-
-<p>If you are using Ant, you can enable release mode by using the <code>release</code> option
-with the <code>ant</code> command. For example, if you are running Ant from the
-directory containing your {@code build.xml} file, the command would look like this:</p>
-
-<pre>$ ant release</pre>
-
-<p>By default, the build script compiles the application APK without signing it. The output file
-in your project {@code bin/} will be <code><em>&lt;your_project_name></em>-unsigned.apk</code>.
-Because the application APK is still unsigned, you must manually sign it with your private
-key and then align it using {@code zipalign}.</p>
-
-<p>However, the Ant build script can also perform the signing
-and aligning for you, if you have provided the path to your keystore and the name of
-your key alias in the project's {@code ant.properties} file. With this information provided,
-the build script will prompt you for your keystore and alias password when you perform
-<code>ant release</code>, it will sign the package and then align it. The final output
-file in {@code bin/} will instead be
-<code><em>&lt;your_project_name></em>-release.apk</code>. With these steps
-automated for you, you're able to skip the manual procedures below (steps 3 and 4).
-To learn how to specify your keystore and alias in the {@code ant.properties} file,
-see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">
-Building and Running Apps on the Command Line</a>.</p>
-
-
-
-<h3 id="signapp">3. Sign your application with your private key</h3>
-
-<p>When you have an application package that is ready to be signed, you can do sign it
-using the Jarsigner tool. Make sure that you have Jarsigner available on your
-machine, as described in <a href="#setup">Basic Setup</a>. Also, make sure that
-the keystore containing your private key is  available.</p>
-
-<p>To sign your application, you run Jarsigner, referencing both the
-application's APK and the keystore containing the private key with which to
-sign the APK. The table below shows the options you could use. </p>
-
-<table>
-<tr>
-<th>Jarsigner Option</th>
-<th>Description</th>
-</tr>
-<tr>
-<td><code>-keystore&nbsp;&lt;keystore-name&gt;.keystore</code></td><td>The name of
-the keystore containing your private key.</td>
-</tr>
-<tr>
-<td><code>-verbose</code></td><td>Enable verbose output.</td>
-</tr>
-<tr>
-<td><code>-sigalg</code></td><td>The name of the signature algorithim to use in signing the APK.
-Use the value {@code SHA1withRSA}.</td>
-</tr>
-<tr>
-<td><code>-digestalg</code></td><td>The message digest algorithim to use in processing the entries
-of an APK. Use the value {@code SHA1}.</td>
-</tr>
-<tr>
-<td><code>-storepass &lt;password&gt;</code></td><td><p>The password for the
-keystore. </p><p>As a security precaution, do not include this option
-in your command line unless you are working at a secure computer.
-If not supplied, Jarsigner prompts you to enter the password. In this
-way, your password is not stored in your shell history.</p></td>
-</tr>
-<tr>
-<td><code>-keypass &lt;password&gt;</code></td><td><p>The password for the private
-key. </p><p>As a security precaution, do not include this option
-in your command line unless you are working at a secure computer.
-If not supplied, Jarsigner prompts you to enter the password. In this
-way, your password is not stored in your shell history.</p></td>
-</tr>
-</table>
-
-<p>Here's how you would use Jarsigner to sign an application package called
-<code>my_application.apk</code>, using the example keystore created above.
-</p>
-
-<pre>$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore
-my_application.apk alias_name</pre>
-
-<p>Running the example command above, Jarsigner prompts you to provide
-passwords for the keystore and key. It then modifies the APK
-in-place, meaning the APK is now signed. Note that you can sign an
-APK multiple times with different keys.</p>
-
-<p class="caution"><strong>Caution:</strong> As of JDK 7, the default signing algorithim has
-changed, requiring you to specify the signature and digest algorithims ({@code -sigalg} and {@code
--digestalg}) when you sign an APK.</p>
-
-<p>To verify that your APK is signed, you can use a command like this:</p>
-
-<pre>$ jarsigner -verify my_signed.apk</pre>
-
-<p>If the APK is signed properly, Jarsigner prints "jar verified".
-If you want more details, you can try one of these commands:</p>
-
-<pre>$ jarsigner -verify -verbose my_application.apk</pre>
-
-<p>or</p>
-
-<pre>$ jarsigner -verify -verbose -certs my_application.apk</pre>
-
-<p>The command above, with the <code>-certs</code> option added, will show you the
-"CN=" line that describes who created the key.</p>
-
-<p class="note"><strong>Note:</strong> If you see "CN=Android Debug", this means the APK was
-signed with the debug key generated by the Android SDK. If you intend to release
-your application, you must sign it with your private key instead of the debug
+<p class="warning"><strong>Warning:</strong> Keep your keystore and private key in a safe and
+secure place, and ensure that you have secure backups of them. If you publish an app to Google
+Play and then lose the key with which you signed your app, you will not be able to publish
+any updates to your app, since you must always sign all versions of your app with the same
 key.</p>
 
-<p>For more information about Jarsigner, see the documentation at
-<a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html">
-http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html</a></p>
+<p>The rest of this document provides detailed instructions about how to generate a private
+key and sign your apps in release mode with Android Studio and with the ADT plugin for Eclipse.</p>
+
+<h3 id="wear-apps">Signing Android Wear Apps</h3>
+
+<p>When publishing Android Wear apps, you package the wearable app inside of a handheld app,
+because users cannot browse and install apps directly on the wearable. Both apps must be signed.
+For more information on packaging and signing Android Wear apps, see
+<a href="{@docRoot}training/wearables/apps/packaging.html">Packaging Wearable Apps</a>.</p>
 
 
-<h3 id="align">4. Align the final APK package</h3>
+<h2 id="studio">Signing Your App in Android Studio</h2>
 
-<p>Once you have signed the APK with your private key, run <code>zipalign</code> on the file.
-This tool ensures that all uncompressed data starts with a particular byte alignment,
-relative to the start of the file. Ensuring alignment at 4-byte boundaries provides
-a performance optimization when installed on a device. When aligned, the Android
-system is able to read files with {@code mmap()}, even if
-they contain binary data with alignment restrictions, rather than copying all
-of the data from the package. The benefit is a reduction in the amount of
-RAM consumed by the running application.</p>
-
-<p>The <code>zipalign</code> tool is provided with the Android SDK, inside the
-<code>tools/</code> directory. To align your signed APK, execute:</p>
-
-<pre>$ zipalign -v 4 <em>your_project_name</em>-unaligned.apk <em>your_project_name</em>.apk</pre>
-
-<p>The {@code -v} flag turns on verbose output (optional). {@code 4} is the
-byte-alignment (don't use anything other than 4). The first file argument is
-your signed {@code .apk} file (the input) and the second file is the destination {@code .apk} file
-(the output). If you're overriding an existing APK, add the {@code -f} flag.</p>
-
-<p class="caution"><strong>Caution:</strong> Your input APK must be signed with your
-private key <strong>before</strong> you optimize the package with {@code zipalign}.
-If you sign it after using {@code zipalign}, it will undo the alignment.</p>
-
-<p>For more information, read about the
-<a href="{@docRoot}tools/help/zipalign.html">zipalign</a> tool.
-
-
-<h3 id="ExportWizard">Compile and sign with Eclipse ADT</h3>
-
-<p>If you are using Eclipse with the ADT plugin, you can use the Export Wizard to
-export a <em>signed</em> APK (and even create a new keystore,
-if necessary). The Export Wizard performs all the interaction with
-the Keytool and Jarsigner for you, which allows you to sign the package using a GUI
-instead of performing the manual procedures to compile, sign,
-and align, as discussed above. Once the wizard has compiled and signed your package,
-it will also perfom package alignment with {@code zipalign}.
-Because the Export Wizard uses both Keytool and Jarsigner, you should
-ensure that they are accessible on your computer, as described above
-in the <a href="#setup">Basic Setup for Signing</a>.</p>
-
-<p>To create a signed and aligned APK in Eclipse:</p>
+<p>To sign your app in release mode in Android Studio, follow these steps:</p>
 
 <ol>
-  <li>Select the project in the Package
-Explorer and select <strong>File > Export</strong>.</li>
-  <li>Open the Android folder, select Export Android Application,
-  and click <strong>Next</strong>.
-  <p>The Export Android Application wizard now starts, which will
-  guide you through the process of signing your application,
-  including steps for selecting the private key with which to sign the APK
-  (or creating a new keystore and private key).</p>
-  <li>Complete the Export Wizard and your application will be compiled,
-  signed, aligned, and ready for distribution.</li>
+<li>On the menu bar, click <strong>Build</strong> &gt; <strong>Generate Signed APK</strong>.</li>
+<li><p>On the <em>Generate Signed APK Wizard</em> window, click <strong>Create new</strong> to create
+a new keystore.</p><p>If you already have a keystore, go to step 4.</p></li>
+<li><p>On the <em>New Key Store</em> window, provide the required information as shown
+in figure 1.</p><p>Your key should be valid for at least 25 years, so you can sign app updates
+with the same key through the lifespan of your app.</p>
+<img src="{@docRoot}images/tools/signstudio2.png" alt=""
+     width="416" height="364" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 1</strong>. Create a new keystore in Android Studio.</p>
+</li>
+<li><p>On the <em>Generate Signed APK Wizard</em> window, select a keystore, a private key, and enter
+the passwords for both. Then click <strong>Next</strong>.</p>
+<img src="{@docRoot}images/tools/signstudio1.png" alt=""
+     width="349" height="232" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 2</strong>. Select a private key in Android Studio.</p>
+</li>
+<li><p>On the next window, select a destination for the signed APK and click
+<strong>Finish</strong>.</p>
+<img src="{@docRoot}images/tools/signstudio3.png" alt=""
+     width="350" height="175" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 3</strong>. Generate a signed APK in Android Studio.</p>
+</li>
 </ol>
 
+<h3 id="sign-auto">Automatically Signing Your App</h3>
+
+<p>In Android Studio, you can configure your project to sign your release APK automatically
+during the build process:</p>
+
+<ol>
+<li>On the project browser, right click on your app and select <strong>Open Module
+Settings</strong>.</li>
+<li>On the <em>Project Structure</em> window, select your app's module under <em>Modules</em>.</li>
+<li>Click on the <strong>Signing</strong> tab.</li>
+<li><p>Select your keystore file, enter a name for this signing configuration (as you may create
+more than one), and enter the required information.</p>
+<img src="{@docRoot}images/tools/signstudio10.png" alt=""
+     width="623" height="372" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 4</strong>. Create a signing configuration in Android Studio.</p>
+</li>
+<li>Click on the <strong>Build Types</strong> tab.</li>
+<li>Select the <strong>release</strong> build.</li>
+<li><p>Under <em>Signing Config</em>, select the signing configuration you just created.</p>
+<img src="{@docRoot}images/tools/signstudio11.png" alt=""
+     width="623" height="372" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 5</strong>. Select a signing configuration in Android Studio.</p>
+</li>
+<li>Click <strong>OK</strong>.</li>
+</ol>
+
+<p>You can also specify your signing settings in Gradle configuration files. For more information,
+see <a href="{@docRoot}sdk/installing/studio-build.html#configureSigning">Signing settings</a>.</p>
+
+
+<h2 id="adt">Signing Your App with the ADT Plugin for Eclipse</h2>
+
+<p>To sign your app in release mode in ADT, follow these steps:</p>
+
+<ol>
+<li>Select the project in the Package Explorer and select <strong>File</strong> >
+<strong>Export</strong>.</li>
+<li>On the <em>Export</em> window, select <strong>Export Android Application</strong> and click
+<strong>Next</strong>.</li>
+<li>On the <em>Export Android Application</em> window, select the project you want to sign and
+click <strong>Next</strong>.</li>
+<li>
+<p>On the next window, enter the location to create a keystore and a keystore password. If you
+already have a keystore, select <strong>Use existing keystore</strong>, enter your keystore's
+location and password, and go to step 6.</p>
+<img src="{@docRoot}images/tools/signadt3.png" alt=""
+     width="488" height="270" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 6</strong>. Select a keystore in ADT.</p>
+</li>
+<li><p>On the next window, provide the required information as shown in figure 5.<p>
+<p>Your key should be valid for at least 25 years, so you can sign app updates with the same key
+through the lifespan of your app.</p>
+<img src="{@docRoot}images/tools/signadt4.png" alt=""
+     width="488" height="448" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 7</strong>. Create a private key in ADT.</p>
+</li>
+<li><p>On the next window, select the location to export the signed APK.</p>
+<img src="{@docRoot}images/tools/signadt5.png" alt=""
+     width="488" height="217" style="margin-top:15px"/>
+<p class="img-caption"><strong>Figure 8</strong>. Export the signed APK in ADT.</p>
+</li>
+</ol>
+
+
+<h2 id="considerations">Signing Considerations</h2>
+
+<p>You should sign all of your apps with the same certificate throughout the expected lifespan
+of your applications. There are several reasons why you should do so:</p>
+
+<ul>
+<li>App upgrade: When the system is installing an update to an app, it compares the certificate(s)
+in the new version with those in the existing version. The system allows the update if the
+certificates match. If you sign the new version with a different certificate, you must assign a
+different package name to the application&mdash;in this case, the user installs the new version as
+a completely new application.</li>
+<li>App modularity: Android allows apps signed by the same certificate to run in the same process,
+if the applications so requests, so that the system treats them as a single application. In this
+way you can deploy your app in modules, and users can update each of the modules independently.</li>
+<li>Code/data sharing through permissions: Android provides signature-based permissions
+enforcement, so that an app can expose functionality to another app that is signed with a
+specified certificate. By signing multiple apps with the same certificate and using
+signature-based permissions checks, your apps can share code and data in a secure manner.</li>
+</ul>
+
+<p>If you plan to support upgrades for an app, ensure that your key has a validity
+period that exceeds the expected lifespan of that app. A validity period of 25 years or more is
+recommended. When your key's validity period expires, users will no longer be able to seamlessly
+upgrade to new versions of your application.</p>
+
+<p>If you plan to publish your apps on Google Play, the key you use to sign these apps must have
+a validity period ending after 22 October 2033. Google Play enforces this requirement to ensure
+that users can seamlessly upgrade apps when new versions are available.</p>
 
 
 <h2 id="secure-key">Securing Your Private Key</h2>
 
-<p>Maintaining the security of your private key is of critical importance, both
-to you and to the user. If you allow someone to use your key, or if you leave
-your keystore and passwords in an unsecured location such that a third-party
-could find and use them, your authoring identity and the trust of the user
-are compromised. </p>
+<p>Maintaining the security of your private key is of critical importance, both to you and to
+the user. If you allow someone to use your key, or if you leave your keystore and passwords in
+an unsecured location such that a third-party could find and use them, your authoring identity
+and the trust of the user are compromised.</p>
 
-<p>If a third party should manage to take your key without your knowledge or
-permission, that person could sign and distribute applications that maliciously
-replace your authentic applications or corrupt them. Such a person could also
-sign and distribute applications under your identity that attack other
-applications or the system itself, or corrupt or steal user data. </p>
+<p>If a third party should manage to take your key without your knowledge or permission, that
+person could sign and distribute apps that maliciously replace your authentic apps or corrupt
+them. Such a person could also sign and distribute apps under your identity that attack
+other apps or the system itself, or corrupt or steal user data.</p>
 
-<p>Your private key is required for signing all future versions of your application. If you lose or
-misplace your key, you will not be able to publish updates to your existing application. You cannot
+<p>Your private key is required for signing all future versions of your app. If you lose or
+misplace your key, you will not be able to publish updates to your existing appn. You cannot
 regenerate a previously generated key.</p>
 
-<p>Your reputation as a developer entity depends on your securing your private
-key properly, at all times, until the key is expired. Here are some tips for
-keeping your key secure: </p>
+<p>Your reputation as a developer entity depends on your securing your private key properly, at
+all times, until the key is expired. Here are some tips for keeping your key secure:</p>
 
 <ul>
 <li>Select strong passwords for the keystore and key.</li>
-<li>When you generate your key with Keytool, <em>do not</em> supply the
-<code>-storepass</code> and <code>-keypass</code> options at the command line.
-If you do so, your passwords will be available in your shell history,
-which any user on your computer could access.</li>
-<li>Similarly, when signing your applications with Jarsigner,
-<em>do not</em> supply the <code>-storepass</code> and <code>-keypass</code>
-options at the command line. </li>
-<li>Do not give or lend anyone your private key, and do not let unauthorized
-persons know your keystore and key passwords.</li>
-<li>Keep the keystore file containing your private key that you <a href="#cert">generate with the
-Keytool</a> in a safe, secure place.</li>
+<li>Do not give or lend anyone your private key, and do not let unauthorized persons know your
+keystore and key passwords.</li>
+<li>Keep the keystore file containing your private key in a safe, secure place.</li>
 </ul>
 
-<p>In general, if you follow common-sense precautions when generating, using,
-and storing your key, it will remain secure. </p>
+<p>In general, if you follow common-sense precautions when generating, using, and storing
+your key, it will remain secure.</p>
+
+
+<h2 id="expdebug">Expiry of the Debug Certificate</h2>
+
+<p>The self-signed certificate used to sign your application in debug mode has an expiration date
+of 365 days from its creation date. When the certificate expires, you will get a build error.</p>
+
+<p>To fix this problem, simply delete the <code>debug.keystore</code> file. The default storage
+location is in <code>~/.android/</code> on OS X and Linux, in <code>C:\Documents and
+Settings\&lt;user&gt;\.android\</code> on Windows XP, and in
+<code>C:\Users\&lt;user&gt;\.android\</code> on Windows Vista and Windows 7.</p>
+
+<p>The next time you build, the build tools will regenerate a new keystore and debug key.</p>
+
+<p>Note that, if your development machine is using a non-Gregorian locale, the build tools may
+erroneously generate an already-expired debug certificate, so that you get an error when trying
+to compile your application. For workaround information, see the troubleshooting topic
+<a href="{@docRoot}resources/faq/troubleshooting.html#signingcalendar">I can't compile my app
+because the build tools generated an expired debug certificate</a>.</p>
+
+
+<h2 id="signing-manually">Signing Your App Manually</h2>
+
+<p>You do not need Android Studio or the ADT plugin for Eclipse to sign your app. You can sign
+your app from the command line using standard tools from the Android SDK and the JDK. To sign
+an app in release mode from the command line:</p>
+
+<ol>
+<li>
+  <p>Generate a private key using
+  <code><a href="http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html">keytool</a></code>.
+  For example:</p>
+<pre>
+$ keytool -genkey -v -keystore my-release-key.keystore
+-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
+</pre>
+  <p>This example prompts you for passwords for the keystore and key, and to provide the
+  Distinguished Name fields for your key. It then generates the keystore as a file called
+  <code>my-release-key.keystore</code>. The keystore contains a single key, valid for 10000 days.
+  The alias is a name that you will use later when signing your app.</p>
+</li>
+<li style="margin-top:18px">
+  <p>Compile your app in release mode to obtain an unsigned APK.</p>
+</li>
+<li style="margin-top:18px">
+  <p>Sign your app with your private key using
+  <code><a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html">jarsigner</a></code>:
+  </p>
+<pre>
+$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1
+-keystore my-release-key.keystore my_application.apk alias_name
+</pre>
+  <p>This example prompts you for passwords for the keystore and key. It then modifies the APK
+  in-place to sign it. Note that you can sign an APK multiple times with different keys.</p>
+</li>
+<li style="margin-top:18px">
+  <p>Verify that your APK is signed. For example:</p>
+<pre>
+$ jarsigner -verify -verbose -certs my_application.apk
+</pre>
+</li>
+<li style="margin-top:18px">
+  <p>Align the final APK package using
+  <code><a href="{@docRoot}tools/help/zipalign.html">zipalign</a></code>.</p>
+<pre>
+$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
+</pre>
+  <p><code>zipalign</code> ensures that all uncompressed data starts with a particular byte
+  alignment relative to the start of the file, which reduces the amount of RAM consumed by an
+  app.</p>
+</li>
+</ol>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index 5d04098..cf33200 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -56,6 +56,42 @@
 <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=""/>ADT 23.0.3</a> <em>(August 2014)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+<dl>
+  <dt>Dependencies:</dt>
+
+  <dd>
+    <ul>
+      <li>Java 7 or higher is required if you are targeting the L Developer Preview.</li>
+      <li>Java 1.6 or higher is required if you are targeting other releases.</li>
+      <li>Eclipse Indigo (Version 3.7.2) or higher is required.</li>
+      <li>This version of ADT is designed for use with
+        <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r23.0.2</a>.
+        If you haven't already installed SDK Tools r23.0.2 into your SDK, use the
+        Android SDK Manager to do so.</li>
+    </ul>
+  </dd>
+
+  <dt>General Notes:</dt>
+  <dd>
+    <ul>
+      <li>Fixed an issue where ADT displayed a <code>NullPointerException</code> warning dialog
+          when a valid SDK was not configured. (<a href="http://b.android.com/73313">Issue
+          73313</a>)</li>
+      <li>Fixed a minor issue with RenderScript support.</li>
+      <li>Disabled APK compression.</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=""/>ADT 23.0.2</a> <em>(July 2014)</em>
   </p>
 
diff --git a/docs/html/tools/support-library/features.jd b/docs/html/tools/support-library/features.jd
index 65148bf..78946ee 100644
--- a/docs/html/tools/support-library/features.jd
+++ b/docs/html/tools/support-library/features.jd
@@ -225,8 +225,7 @@
 
 <p>This library provides {@link android.support.v7.media.MediaRouter}, {@link
 android.support.v7.media.MediaRouteProvider}, and related media classes that
-support the <a href="https://developers.google.com/cast/">Google Cast
-developer preview</a>. </p>
+support <a href="https://developers.google.com/cast/docs/android_sender">Google Cast</a>. </p>
 
 <p>In general, the APIs in the v7 mediarouter library provide a means of
 controlling the routing of media channels and streams from the current device to
@@ -258,9 +257,8 @@
 
 <p class="caution">The v7 mediarouter library APIs introduced in Support Library
 r18 are subject to change in later revisions of the Support Library. At this
-time, we recommend using the library only in connection with the <a
-href="https://developers.google.com/cast/">Google Cast
-developer preview</a>. </p>
+time, we recommend using the library only in connection with <a
+href="https://developers.google.com/cast/docs/android_sender">Google Cast</a>. </p>
 
 
 <h2 id="v8">v8 Support Library</h2>
diff --git a/docs/html/tools/testing/testing_accessibility.jd b/docs/html/tools/testing/testing_accessibility.jd
index daf9b36..20948fa 100644
--- a/docs/html/tools/testing/testing_accessibility.jd
+++ b/docs/html/tools/testing/testing_accessibility.jd
@@ -179,7 +179,7 @@
 </p>
 
 <p>For more information about using TalkBack, see
-<a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700928">Use TalkBack</a>.</p>
+<a href="https://support.google.com/accessibility/android/topic/3529932">TalkBack</a>.</p>
 
 <h4 id="testing-ebt">Testing with Explore by Touch</h4>
 
@@ -207,8 +207,7 @@
 </ol>
 
 <p>For more information about using the Explore by Touch features, see
-<a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700722">Use Explore by
-Touch</a>.</p>
+<a href="https://support.google.com/accessibility/android/answer/6006598">Touch Exploration</a>.</p>
 
 <h3 id="test-navigation">Testing focus navigation</h3>
 
@@ -231,7 +230,7 @@
 
 <p>Gesture navigation is an accessibility navigation mode that allows users to navigate Android
   devices and applications using specific
-  <a href="http://support.google.com/nexus/bin/answer.py?hl=en&answer=2700718">gestures</a>. This
+  <a href="https://support.google.com/accessibility/android/answer/6006598">gestures</a>. This
   navigation mode is available on Android 4.1 (API Level 16) and higher.</p>
 
 <p class="note"><strong>Note:</strong> Accessibility gestures provide a different navigation path
@@ -248,8 +247,7 @@
 </ul>
 
 <p>For more information about using Explore by Touch accessibility gestures, see
-<a href="http://support.google.com/android/bin/topic.py?hl=en&topic=2492346">Accessibility
-gestures</a>.</p>
+<a href="https://support.google.com/accessibility/android/answer/6006598">Touch Exploration</a>.</p>
 
 <p class="note">
   <strong>Note:</strong> Accessibility services other than TalkBack may map accessibility gestures
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index 93e5976..8eb9cbf 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -24,6 +24,8 @@
           Creating a Project</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">
           Tips and Tricks</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/installing/studio-androidview.html">
+          Using the Android Project View</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-layout.html">
           Using the Layout Editor</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-build.html">
diff --git a/docs/html/training/articles/security-gms-provider.jd b/docs/html/training/articles/security-gms-provider.jd
new file mode 100644
index 0000000..0d3cf1e
--- /dev/null
+++ b/docs/html/training/articles/security-gms-provider.jd
@@ -0,0 +1,298 @@
+page.title=Updating Your Security Provider to Protect Against SSL Exploits
+page.tags="network","certificates"
+
+page.article=true
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>In this document</h2>
+<ol class="nolist">
+  <li><a href="#patching">Patching the Security Provider with
+      ProviderInstaller</a></li>
+  <li><a href="#example_sync">Patching Synchronously</a></li>
+  <li><a href="#example_async">Patching Asynchronously</a></li>
+
+</ol>
+
+
+<h2>See also</h2>
+<ul>
+  <li><a href="{@docRoot}google/play-services/">Google Play Services</a></li>
+  <li><a href="https://www.openssl.org/news/secadv_20140605.txt">OpenSSL
+   Security Advisory [05 Jun 2014]: SSL/TLS MITM vulnerability
+   (CVE-2014-0224)</a></li>
+  <li><a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0224">
+    Vulnerability Summary for CVE-2014-0224</a></li>
+</ul>
+</div>
+</div>
+
+
+<p> Android relies on a security {@link java.security.Provider Provider} to
+provide secure network communications. However, from time to time,
+vulnerabilities are found in the default security provider. To protect against
+these vulnerabilities, <a href="{@docRoot}google/play-services/">Google Play
+services</a> provides a way to automatically update a device's security provider
+to protect against known exploits. By calling Google Play services methods, your
+app can ensure that it's running on a device that has the latest updates to
+protect against known exploits.</p>
+
+<p>For example, a vulnerability was discovered in OpenSSL
+(<a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0224">CVE-2014-0224</a>)
+that can leave apps open to a "man-in-the-middle" attack that decrypts
+secure traffic without either side knowing. With Google Play services version
+5.0, a fix is available, but apps must ensure that this fix is installed. By
+using the Google Play services methods, your app can ensure that it's running
+on a device that's secured against that attack.</p>
+
+<p class="caution"><strong>Caution: </strong>Updating a device's security {@link
+java.security.Provider Provider} does <em>not</em> update {@link
+android.net.SSLCertificateSocketFactory
+android.net.SSLCertificateSocketFactory}. Rather than using this class, we
+encourage app developers to use high-level methods for interacting with
+cryptography. Most apps can use APIs like {@link
+javax.net.ssl.HttpsURLConnection}, {@link org.apache.http.client.HttpClient},
+and {@link android.net.http.AndroidHttpClient} without needing to set a custom
+{@link javax.net.ssl.TrustManager} or create an {@link
+android.net.SSLCertificateSocketFactory}.</p>
+
+<h2 id="patching">Patching the Security Provider with ProviderInstaller</h2>
+
+<p>To update a device's security provider, use the
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html">{@code ProviderInstaller}</a>
+class. You can verify that the security provider is up-to-date (and update it,
+if necessary) by calling
+that class's <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>
+(or <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>)
+method.</p>
+
+<p>When you call <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>, the
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html">{@code ProviderInstaller}</a>
+does the following:</p>
+
+<ul>
+  <li>If the device's {@link java.security.Provider Provider} is successfully
+    updated (or is already up-to-date), the method returns normally.</li>
+  <li>If the device's Google Play services library is out of date, the method
+    throws
+    <a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesRepairableException.html">{@code GooglePlayServicesRepairableException}</a>.
+    The app can then catch this exception and show
+    the user an appropriate dialog box to update Google Play services.</li>
+    <li>If a non-recoverable error occurs, the method throws
+    <a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesNotAvailableException.html">{@code GooglePlayServicesNotAvailableException}</a>
+    to indicate that it is unable to update the {@link java.security.Provider
+    Provider}. The app can then catch the exception and choose an appropriate
+    course of action, such as displaying the standard
+    <a href="{@docRoot}reference/com/google/android/gms/common/SupportErrorDialogFragment.html">fix-it flow diagram</a>.</li>
+</ul>
+
+<p>The
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>
+method behaves similarly, except that instead of
+throwing exceptions, it calls the appropriate callback method to indicate
+success or failure.</p>
+
+<p>If <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>
+needs to install a new {@link java.security.Provider Provider}, this can take
+anywhere from 30-50 milliseconds (on more recent devices) to 350 ms (on older
+devices). If the security provider is already up-to-date, the method takes a
+negligible amount of time. To avoid affecting user experience:</p>
+
+<ul>
+  <li>Call
+  <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>
+  from background networking threads immediately when the threads are loaded,
+  instead of waiting for the thread to try to use the network. (There's no harm
+  in calling the method multiple times, since it returns immediately if the
+  security provider doesn't need updating.)</li>
+
+  <li>If user experience will be affected by the thread blocking--for example,
+  if the call is from an activity in the UI thread--call the asynchronous
+  version of the method,
+  <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>.
+  (Of course, if you do this, you need to wait for the operation to finish
+  before you attempt any secure communications. The
+  <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html">{@code ProviderInstaller}</a>
+  calls your listener's <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.ProviderInstallListener.html#onProviderInstalled()">{@code onProviderInstalled()}</a>
+  method to signal success.)</li>
+</ul>
+
+<p class="warning"><strong>Warning:</strong> If the
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html">{@code ProviderInstaller}</a>
+is unable to install an updated {@link java.security.Provider Provider},
+your device's security provider might be vulnerable  to known exploits. Your app
+should behave as if all HTTP communication is unencrypted.</p>
+
+<p>Once the {@link java.security.Provider Provider} is updated, all calls to
+security APIs (including SSL APIs) are routed through it.
+(However, this does not apply to  {@link android.net.SSLCertificateSocketFactory
+android.net.SSLCertificateSocketFactory}, which remains vulnerable to such
+exploits as
+<a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0224">CVE-2014-0224</a>.)</p>
+
+<h2 id="example_sync">Patching Synchronously</h2>
+
+<p>The simplest way to patch the security provider is to call the synchronous
+method <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>.
+This is appropriate if user experience won't be affected by the thread blocking
+while it waits for the operation to finish.</p>
+
+<p>For example, here's an implementation of a <a href="{@docRoot}training/sync-adapters">sync adapter</a> that updates the security provider. Since a sync
+adapter runs in the background, it's okay if the thread blocks while waiting
+for the security provider to be updated. The sync adapter calls
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a> to
+update the security provider. If the method returns normally, the sync adapter
+knows the security provider is up-to-date. If the method throws an exception,
+the sync adapter can take appropriate action (such as prompting the user to
+update Google Play services).</p>
+
+<pre>/**
+ * Sample sync adapter using {&#64;link ProviderInstaller}.
+ */
+public class SyncAdapter extends AbstractThreadedSyncAdapter {
+
+  ...
+
+  // This is called each time a sync is attempted; this is okay, since the
+  // overhead is negligible if the security provider is up-to-date.
+  &#64;Override
+  public void onPerformSync(Account account, Bundle extras, String authority,
+      ContentProviderClient provider, SyncResult syncResult) {
+    try {
+      ProviderInstaller.installIfNeeded(getContext());
+    } catch (GooglePlayServicesRepairableException e) {
+
+      // Indicates that Google Play services is out of date, disabled, etc.
+
+      // Prompt the user to install/update/enable Google Play services.
+      GooglePlayServicesUtil.showErrorNotification(
+          e.getConnectionStatusCode(), getContext());
+
+      // Notify the SyncManager that a soft error occurred.
+      syncResult.stats.numIOExceptions++;
+      return;
+
+    } catch (GooglePlayServicesNotAvailableException e) {
+      // Indicates a non-recoverable error; the ProviderInstaller is not able
+      // to install an up-to-date Provider.
+
+      // Notify the SyncManager that a hard error occurred.
+      syncResult.stats.numAuthExceptions++;
+      return;
+    }
+
+    // If this is reached, you know that the provider was already up-to-date,
+    // or was successfully updated.
+  }
+}</pre>
+
+<h2 id="example_async">Patching Asynchronously</h2>
+
+<p>Updating the security provider can take as much as 350 milliseconds (on
+older devices). If you're doing the update on a thread that directly affects
+user experience, such as the UI thread, you don't want to make a synchronous
+call to update the provider, since that can result in the app or device
+freezing until the operation finishes. Instead, you should use the asynchronous
+method
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>.
+That method indicates its success or failure by calling callbacks.</p>
+
+<p>For example, here's some code that updates the security provider in an
+activity in the UI thread. The activity calls <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>
+to update the provider, and designates itself as the listener to receive success
+or failure notifications. If the security provider is up-to-date or is
+successfully updated, the activity's
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.ProviderInstallListener.html#onProviderInstalled()">{@code onProviderInstalled()}</a>
+method is called, and the activity knows communication is secure. If the
+provider cannot be updated, the activity's
+<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.ProviderInstallListener.html#onProviderInstallFailed(int, android.content.Intent)">{@code onProviderInstallFailed()}</a>
+method is called, and the activity can take appropriate action (such as
+prompting the user to update Google Play services).</p>
+
+<pre>/**
+ * Sample activity using {&#64;link ProviderInstaller}.
+ */
+public class MainActivity extends Activity
+    implements ProviderInstaller.ProviderInstallListener {
+
+  private static final int ERROR_DIALOG_REQUEST_CODE = 1;
+
+  private boolean mRetryProviderInstall;
+
+  //Update the security provider when the activity is created.
+  &#64;Override
+  protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    ProviderInstaller.installIfNeededAsync(this, this);
+  }
+
+  /**
+   * This method is only called if the provider is successfully updated
+   * (or is already up-to-date).
+   */
+  &#64;Override
+  protected void onProviderInstalled() {
+    // Provider is up-to-date, app can make secure network calls.
+  }
+
+  /**
+   * This method is called if updating fails; the error code indicates
+   * whether the error is recoverable.
+   */
+  &#64;Override
+  protected void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
+    if (GooglePlayServicesUtil.isUserRecoverableError(errorCode)) {
+      // Recoverable error. Show a dialog prompting the user to
+      // install/update/enable Google Play services.
+      GooglePlayServicesUtil.showErrorDialogFragment(
+          errorCode,
+          this,
+          ERROR_DIALOG_REQUEST_CODE,
+          new DialogInterface.OnCancelListener() {
+            &#64;Override
+            public void onCancel(DialogInterface dialog) {
+              // The user chose not to take the recovery action
+              onProviderInstallerNotAvailable();
+            }
+          });
+    } else {
+      // Google Play services is not available.
+      onProviderInstallerNotAvailable();
+    }
+  }
+
+  &#64;Override
+  protected void onActivityResult(int requestCode, int resultCode,
+      Intent data) {
+    super.onActivityResult(requestCode, resultCode, data);
+    if (requestCode == ERROR_DIALOG_REQUEST_CODE) {
+      // Adding a fragment via GooglePlayServicesUtil.showErrorDialogFragment
+      // before the instance state is restored throws an error. So instead,
+      // set a flag here, which will cause the fragment to delay until
+      // onPostResume.
+      mRetryProviderInstall = true;
+    }
+  }
+
+  /**
+   * On resume, check to see if we flagged that we need to reinstall the
+   * provider.
+   */
+  &#64;Override
+  protected void onPostResume() {
+    super.onPostResult();
+    if (mRetryProviderInstall) {
+      // We can now safely retry installation.
+      ProviderInstall.installIfNeededAsync(this, this);
+    }
+    mRetryProviderInstall = false;
+  }
+
+  private void onProviderInstallerNotAvailable() {
+    // This is reached if the provider cannot be updated for some reason.
+    // App should consider all HTTP communication to be vulnerable, and take
+    // appropriate action.
+  }
+}
+</pre>
diff --git a/docs/html/training/location/retrieve-current.jd b/docs/html/training/location/retrieve-current.jd
index 99e475f..f079040 100644
--- a/docs/html/training/location/retrieve-current.jd
+++ b/docs/html/training/location/retrieve-current.jd
@@ -167,13 +167,12 @@
                     "Google Play services is available.");
             // Continue
             return true;
-        // Google Play services was not available for some reason
+        // Google Play services was not available for some reason.
+        // resultCode holds the error code.
         } else {
-            // Get the error code
-            int errorCode = connectionResult.getErrorCode();
             // Get the error dialog from Google Play services
             Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
-                    errorCode,
+                    resultCode,
                     this,
                     CONNECTION_FAILURE_RESOLUTION_REQUEST);
 
diff --git a/docs/html/training/sync-adapters/creating-stub-provider.jd b/docs/html/training/sync-adapters/creating-stub-provider.jd
index 8f6eba0..b8190d1 100644
--- a/docs/html/training/sync-adapters/creating-stub-provider.jd
+++ b/docs/html/training/sync-adapters/creating-stub-provider.jd
@@ -190,7 +190,7 @@
     &lt;provider
         android:name="com.example.android.datasync.provider.StubProvider"
         android:authorities="com.example.android.datasync.provider"
-        android:export="false"
+        android:exported="false"
         android:syncable="true"/&gt;
     ...
     &lt;/application&gt;
diff --git a/docs/html/training/sync-adapters/creating-sync-adapter.jd b/docs/html/training/sync-adapters/creating-sync-adapter.jd
index 7c59c8c..b13ce07 100644
--- a/docs/html/training/sync-adapters/creating-sync-adapter.jd
+++ b/docs/html/training/sync-adapters/creating-sync-adapter.jd
@@ -619,7 +619,7 @@
                 android:name="com.example.android.datasync.SyncService"
                 android:exported="true"
                 android:process=":sync"&gt;
-            &lt;intent-filter&gt;com.example.android.datasync.provider
+            &lt;intent-filter&gt;
                 &lt;action android:name="android.content.SyncAdapter"/&gt;
             &lt;/intent-filter&gt;
             &lt;meta-data android:name="android.content.SyncAdapter"
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 4407d30..4dd57ab 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -1487,6 +1487,14 @@
           >Security with HTTPS and SSL</a>
       </li>
 
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-gms-provider.html"
+           description=
+           "How to use and update Google Play services security provider, to
+           protect against SSL exploits."
+          >Updating Your Security Provider to Protect Against SSL Exploits</a>
+      </li>
+
       <li class="nav-section">
         <div class="nav-section-header">
           <a href="<?cs var:toroot ?>training/enterprise/index.html"
diff --git a/docs/html/training/volley/index.jd b/docs/html/training/volley/index.jd
index ba5b09f..97bddae 100644
--- a/docs/html/training/volley/index.jd
+++ b/docs/html/training/volley/index.jd
@@ -20,21 +20,6 @@
   <li>Android 1.6 (API Level 4) or higher</li>
 </ul>
 
-<h2>You should also see</h2>
-<ul>
-  <li>For a production quality app that uses Volley, see the 2013 Google I/O
-  <a href="https://github.com/google/iosched">schedule app</a>. In particular, see:
-    <ul>
-      <li><a
-      href="https://github.com/google/iosched/blob/master/android/src/main/java/com/google/android/apps/iosched/util/ImageLoader.java">
-      ImageLoader</a></li>
-      <li><a
-      href="https://github.com/google/iosched/blob/master/android/src/main/java/com/google/android/apps/iosched/util/BitmapCache.java">
-      BitmapCache</a></li>
-    </ul>
-  </li>
-</ul>
-
 </div>
 </div>
 
diff --git a/docs/html/training/wearables/data-layer/assets.jd b/docs/html/training/wearables/data-layer/assets.jd
index 52ccbb0..5dc11cb 100644
--- a/docs/html/training/wearables/data-layer/assets.jd
+++ b/docs/html/training/wearables/data-layer/assets.jd
@@ -91,7 +91,7 @@
   for (DataEvent event : dataEvents) {
     if (event.getType() == DataEvent.TYPE_CHANGED &&
         event.getDataItem().getUri().getPath().equals("/image")) {
-      DataMapItem dataMapItem = DataMapItem.fromDataItem(dataItem); 
+      DataMapItem dataMapItem = DataMapItem.fromDataItem(event.getDataItem());
       Asset profileAsset = dataMapItem.getDataMap().getAsset("profileImage");
       Bitmap bitmap = loadBitmapFromAsset(profileAsset);
       // Do something with the bitmap
diff --git a/docs/html/training/wearables/notifications/creating.jd b/docs/html/training/wearables/notifications/creating.jd
index d6ad34a..9398f96 100644
--- a/docs/html/training/wearables/notifications/creating.jd
+++ b/docs/html/training/wearables/notifications/creating.jd
@@ -208,9 +208,12 @@
         <b>.setStyle(bigStyle);</b>
 </pre>
 
-<p>Notice that you can add a large background image to any notification using the
+<p>Notice that you can add a large icon image to any notification using the
 {@link android.support.v4.app.NotificationCompat.Builder#setLargeIcon setLargeIcon()}
-method. For more information about designing notifications with large images, see the
+method. However, these icons appear as large background images on a wearable and do not look
+good as they are scaled up to fit the wearable screen. To add a wearable-specific background image
+to a notification, see <a href="#AddWearableFeatures">Add Wearable Features For a Notification</a>.
+For more information about designing notifications with large images, see the
 <a href="{@docRoot}design/wear/index.html">Design Principles of Android
 Wear</a>.</p>
 
@@ -244,7 +247,8 @@
 // Create a WearableExtender to add functionality for wearables
 NotificationCompat.WearableExtender wearableExtender =
         new NotificationCompat.WearableExtender()
-        .setHintHideIcon(true);
+        .setHintHideIcon(true)
+        .setBackground(mBitmap);
 
 // Create a NotificationCompat.Builder to build a standard notification
 // then extend it with the WearableExtender
@@ -257,12 +261,21 @@
 </pre>
 
 <p>The
-  {@link android.support.v4.app.NotificationCompat.WearableExtender#setHintHideIcon setHintHideIcon()}
-  method is just one example of new notification features available with
-  {@link android.support.v4.app.NotificationCompat.WearableExtender}.
-</p>
+{@link android.support.v4.app.NotificationCompat.WearableExtender#setHintHideIcon setHintHideIcon()}
+and {@link android.support.v4.app.NotificationCompat.WearableExtender#setBackground setBackground()}
+methods are just two examples of new notification features available with
+{@link android.support.v4.app.NotificationCompat.WearableExtender}.</p>
 
-<p>If you ever need to read wearable-specifc options at a later time, use the corresponding get
+<p class="note"><strong>Note:</strong> The bitmap that you use with
+{@link android.support.v4.app.NotificationCompat.WearableExtender#setBackground setBackground()}
+should have a resolution of 400x400 for non-scrolling backgrounds and 640x400 for backgrounds
+that support parallax scrolling. Place these bitmap images in the <code>res/drawable-nodpi</code>
+directory of your handheld app. Place other non-bitmap resources for wearable notifications, such
+as those used with the
+{@link android.support.v4.app.NotificationCompat.WearableExtender#setContentIcon setContentIcon()}
+method, in the <code>res/drawable-hdpi</code> directory of your handheld app.</p>
+
+<p>If you ever need to read wearable-specific options at a later time, use the corresponding get
 method for the option. This example calls the
 {@link android.support.v4.app.NotificationCompat.WearableExtender#getHintHideIcon()} method to
 get whether or not this notification hides the icon:
@@ -272,6 +285,7 @@
 boolean hintHideIcon = wearableExtender.getHintHideIcon();
 </pre>
 
+
 <h2 id="Deliver">Deliver the Notification</h2>
 <p>When you want to deliver your notifications, always use the
   {@link android.support.v4.app.NotificationManagerCompat} API instead of
diff --git a/docs/html/wear/images/partners/sony.png b/docs/html/wear/images/partners/sony.png
new file mode 100644
index 0000000..3e9483e
--- /dev/null
+++ b/docs/html/wear/images/partners/sony.png
Binary files differ
diff --git a/docs/html/wear/index.jd b/docs/html/wear/index.jd
index 5dd7690..c9a5cff 100644
--- a/docs/html/wear/index.jd
+++ b/docs/html/wear/index.jd
@@ -228,6 +228,10 @@
             <div class="col-4">
               <img src="/wear/images/partners/samsung.png" alt="Samsung">
             </div>
+            <div class="col-4">
+              <img src="/wear/images/partners/sony.png" alt="Sony"
+                   style="margin-left:57px;margin-top:17px;">
+            </div>
           </div>
         </div> <!-- end .wrap -->
       </div>