merge in nyc-mr1-release history after reset to nyc-mr1-dev
diff --git a/Android.mk b/Android.mk
index 61df64e..9dc4aef 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1199,20 +1199,45 @@
 
 LOCAL_DROIDDOC_OPTIONS:= \
 		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
-		-devsite \
-		-hdf devsite true \
 		-toroot / \
 		-hdf android.whichdoc online \
+		-devsite \
 		$(sample_groups) \
-		-useUpdatedTemplates \
 		-hdf android.hasSamples true \
-		-yaml _book.yaml \
 		-samplesdir $(samples_dir)
 
 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-dev
 
 include $(BUILD_DROIDDOC)
 
+# ==== docs for the web (on the devsite app engine server) =======================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
+LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
+LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
+LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
+LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
+LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+# specify a second html input dir and an output path relative to OUT_DIR)
+LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
+
+LOCAL_MODULE := ds-static
+
+LOCAL_DROIDDOC_OPTIONS:= \
+		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+		-hdf android.whichdoc online \
+		-staticonly \
+		-toroot / \
+		-devsite \
+		-ignoreJdLinks
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-dev
+
+include $(BUILD_DROIDDOC)
+
 # ==== site updates for docs (on the androiddevdocs app engine server) =======================
 include $(CLEAR_VARS)
 
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 0642cd8..872168a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -830,7 +830,6 @@
      */
     protected static boolean sPreserveMarginParamsInLayoutParamConversion;
 
-
     /**
      * This view does not want keystrokes. Use with TAKES_FOCUS_MASK when
      * calling setFlags.
@@ -9852,6 +9851,18 @@
     }
 
     /**
+     * Tells whether the {@link View} is in the state between {@link #onStartTemporaryDetach()}
+     * and {@link #onFinishTemporaryDetach()}.
+     *
+     * <p>This method always returns {@code true} when called directly or indirectly from
+     * {@link #onStartTemporaryDetach()}. The return value when called directly or indirectly from
+     * {@link #onFinishTemporaryDetach()}, however, depends on the OS version.
+     * <ul>
+     *     <li>{@code true} on {@link android.os.Build.VERSION_CODES#N API 24}</li>
+     *     <li>{@code false} on {@link android.os.Build.VERSION_CODES#N_MR1 API 25}} and later</li>
+     * </ul>
+     * </p>
+     *
      * @return {@code true} when the View is in the state between {@link #onStartTemporaryDetach()}
      * and {@link #onFinishTemporaryDetach()}.
      */
@@ -9886,8 +9897,8 @@
      */
     @CallSuper
     public void dispatchFinishTemporaryDetach() {
-        onFinishTemporaryDetach();
         mPrivateFlags3 &= ~PFLAG3_TEMPORARY_DETACH;
+        onFinishTemporaryDetach();
         if (hasWindowFocus() && hasFocus()) {
             InputMethodManager.getInstance().focusIn(this);
         }
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 2fd52b5..af22ec7 100755
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -65,6 +65,8 @@
 
     private SimpleDateFormat mYearFormat;
     private SimpleDateFormat mMonthDayFormat;
+    private SimpleDateFormat mAccessibilityEventFormat;
+
 
     // Top-level container.
     private ViewGroup mContainer;
@@ -307,6 +309,9 @@
         mMonthDayFormat.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE);
         mYearFormat = new SimpleDateFormat("y", locale);
 
+        // Clear out the lazily-initialized accessibility event formatter.
+        mAccessibilityEventFormat = null;
+
         // Update the header text.
         onCurrentDateChanged(false);
     }
@@ -586,7 +591,12 @@
 
     @Override
     public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
-        event.getText().add(mCurrentDate.getTime().toString());
+        if (mAccessibilityEventFormat == null) {
+            final String pattern = DateFormat.getBestDateTimePattern(mCurrentLocale, "EMMMMdy");
+            mAccessibilityEventFormat = new SimpleDateFormat(pattern);
+        }
+        final CharSequence text = mAccessibilityEventFormat.format(mCurrentDate.getTime());
+        event.getText().add(text);
     }
 
     public CharSequence getAccessibilityClassName() {
diff --git a/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl b/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
index 419b1f8..8e454db 100644
--- a/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
+++ b/core/java/com/android/internal/policy/IKeyguardStateCallback.aidl
@@ -20,4 +20,5 @@
     void onSimSecureStateChanged(boolean simSecure);
     void onInputRestrictedStateChanged(boolean inputRestricted);
     void onTrustedChanged(boolean trusted);
+    void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper);
 }
\ No newline at end of file
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index 9488f6e..e6c9fc6 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -99,7 +99,6 @@
     </ol>
   </li>
   <li><a href="#AdbIntents">Verify Intents with the Android Debug Bridge</a></li>
-  <li><a href="#Now">Intents Fired by Google Now</a></li>
 </ol>
 
   <h2>See also</h2>
@@ -110,9 +109,9 @@
 </div>
 </div>
 
-<!-- Google Now box styles -->
+<!-- Google Voice Actions box styles -->
 <style type="text/css">
-.now-box {
+.voice-box {
   border-color: rgb(204,204,204);
   border-style: solid;
   border-width: 1px;
@@ -121,99 +120,120 @@
   padding: 17px;
   width: 200px;
 }
-.now-box li {
+.voice-box li {
   font-size: 13px;
   font-style: italic;
   margin-top: 0px;
 }
-.now-box ul {
+.voice-box ul {
   margin-bottom: 0px;
 }
-.now-img {
+.voice-img {
   width: 30px;
   margin-bottom: 0px !important;
 }
-.now-img-cont {
+.voice-img-cont {
   float: left;
   margin-right: 10px;
 }
-.now-title {
+.voice-title {
   font-weight: bold;
   margin-top: 7px;
 }
-.now-list {
+.voice-list {
   font-size: 13px;
   margin-bottom: 10px !important;
   list-style-type: none;
 }
-.now-list li {
+.voice-list li {
   font-style: italic;
 }
 </style>
 
-<p>An intent allows you to start an activity in another app by describing a simple
-action you'd like to perform (such as "view a map" or "take a picture")
-in an {@link android.content.Intent} object. This type of intent is
-called an <em>implicit</em> intent because it does not specify the app component
-to start, but instead specifies an <em>action</em> and provides some
-<em>data</em> with which to perform the action.</p>
+<p>
+  An intent allows you to start an activity in another app by describing a
+  simple action you'd like to perform (such as "view a map" or "take a
+  picture") in an {@link android.content.Intent} object. This type of intent
+  is called an <em>implicit</em> intent because it does not specify the app
+  component to start, but instead specifies an <em>action</em> and provides
+  some <em>data</em> with which to perform the action.
+</p>
 
-<p>When you call
-{@link android.content.Context#startActivity startActivity()} or
-{@link android.app.Activity#startActivityForResult startActivityForResult()} and pass it an
-implicit intent, the system <a href="{@docRoot}guide/components/intents-filters.html#Resolution"
->resolves the intent</a> to an app that can handle the intent
-and starts its corresponding {@link android.app.Activity}. If there's more than one app
-that can handle the intent, the system presents the user with a dialog to pick which app
-to use.</p>
+<p>
+  When you call {@link android.content.Context#startActivity startActivity()}
+  or {@link android.app.Activity#startActivityForResult
+  startActivityForResult()} and pass it an implicit intent, the system
+  <a href="{@docRoot}guide/components/intents-filters.html#Resolution">resolves
+  the intent</a> to an app that can handle the intent and starts its
+  corresponding {@link android.app.Activity}. If there's more than one app
+  that can handle the intent, the system presents the user with a dialog to
+  pick which app to use.
+</p>
 
-<p>This page describes several implicit intents that you can use to perform common actions,
-organized by the type of app that handles the intent. Each section also shows how you can
-create an <a href="{@docRoot}guide/components/intents-filters.html#Receiving">intent filter</a> to
-advertise your app's ability to perform the same action.</p>
+<p>
+  This page describes several implicit intents that you can use to perform
+  common actions, organized by the type of app that handles the intent. Each
+  section also shows how you can create an <a href=
+  "{@docRoot}guide/components/intents-filters.html#Receiving">intent
+  filter</a> to advertise your app's ability to perform the same action.
+</p>
 
-<p class="caution"><strong>Caution:</strong> If there are no apps on the device that can receive
-the implicit intent, your app will crash when it calls {@link android.content.Context#startActivity
-startActivity()}. To first verify that an app exists to receive the intent, call {@link
-android.content.Intent#resolveActivity resolveActivity()} on your {@link android.content.Intent}
-object. If the result is non-null, there is at least one app that can handle the intent and
-it's safe to call {@link android.content.Context#startActivity startActivity()}. If the result is
-null, you should not use the intent and, if possible, you should disable the feature that invokes
-the intent.</p>
+<p class="caution">
+  <strong>Caution:</strong> If there are no apps on the device that can
+  receive the implicit intent, your app will crash when it calls {@link
+  android.content.Context#startActivity startActivity()}. To first verify that
+  an app exists to receive the intent, call {@link
+  android.content.Intent#resolveActivity resolveActivity()} on your {@link
+  android.content.Intent} object. If the result is non-null, there is at least
+  one app that can handle the intent and it's safe to call {@link
+  android.content.Context#startActivity startActivity()}. If the result is
+  null, you should not use the intent and, if possible, you should disable the
+  feature that invokes the intent.
+</p>
 
-<p>If you're not familiar with how to create intents or intent filters, you should first read
-<a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.</p>
+<p>
+  If you're not familiar with how to create intents or intent filters, you
+  should first read <a href=
+  "{@docRoot}guide/components/intents-filters.html">Intents and Intent
+  Filters</a>.
+</p>
 
-<p>To learn how to fire the intents listed on this page from your development host, see
-<a href="#AdbIntents">Verify Intents with the Android Debug Bridge</a>.</p>
+<p>
+  To learn how to fire the intents listed on this page from your development
+  host, see <a href="#AdbIntents">Verify Intents with the Android Debug
+  Bridge</a>.
+</p>
 
-<h4>Google Now</h4>
+<h4>Google Voice Actions</h4>
 
-<p><a href="http://www.google.com/landing/now/">Google Now</a> fires some of the intents listed
-on this page in response to voice commands. For more information, see
-<a href="#Now">Intents Fired by Google Now</a>.</p>
-
-
-
-
-
+<p>
+  <a href="https://developers.google.com/voice-actions/">Google Voice
+  Actions</a> fires some of the intents listed on this page in response to
+  voice commands. For more information, see <a href=
+  "https://developers.google.com/voice-actions/system/#system_actions_reference">
+  Intents fired by Google Voice Actions</a>.
+</p>
 
 <h2 id="Clock">Alarm Clock</h2>
 
-
 <h3 id="CreateAlarm">Create an alarm</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30"
-           height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"set an alarm for 7 am"</li>
+    <li>"set an alarm for 7 am"
+    </li>
   </ul>
 </div>
 
@@ -301,22 +321,30 @@
 
 <h3 id="CreateTimer">Create a timer</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"set timer for 5 minutes"</li>
+    <li>"set timer for 5 minutes"
+    </li>
   </ul>
 </div>
 
-<p>To create a countdown timer, use the {@link android.provider.AlarmClock#ACTION_SET_TIMER}
-action and specify timer details such as the duration using extras defined below.</p>
+<p>
+  To create a countdown timer, use the {@link
+  android.provider.AlarmClock#ACTION_SET_TIMER} action and specify timer
+  details such as the duration using extras defined below.
+</p>
 
 <p class="note"><strong>Note:</strong> This intent was added
 in Android 4.4 (API level 19).</p>
@@ -594,28 +622,36 @@
 &lt;/activity>
 </pre>
 
-<p>When handling this intent, your activity should check for the {@link
-android.provider.MediaStore#EXTRA_OUTPUT} extra in the incoming {@link android.content.Intent},
-then save the captured image or video at the location specified by that extra and call {@link
-android.app.Activity#setResult(int,Intent) setResult()} with an
-{@link android.content.Intent} that includes a compressed thumbnail
-in an extra named <code>"data"</code>.</p>
+<p>
+  When handling this intent, your activity should check for the {@link
+  android.provider.MediaStore#EXTRA_OUTPUT} extra in the incoming {@link
+  android.content.Intent}, then save the captured image or video at the
+  location specified by that extra and call {@link
+  android.app.Activity#setResult(int,Intent) setResult()} with an {@link
+  android.content.Intent} that includes a compressed thumbnail in an extra
+  named <code>"data"</code>.
+</p>
 
 
 
 <h3 id="CameraStill">Start a camera app in still image mode</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"take a picture"</li>
+    <li>"take a picture"
+    </li>
   </ul>
 </div>
 
@@ -661,17 +697,22 @@
 
 <h3 id="CameraVideo">Start a camera app in video mode</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"record a video"</li>
+    <li>"record a video"
+    </li>
   </ul>
 </div>
 
@@ -1348,20 +1389,30 @@
 
 <h3 id="CallCar">Call a car</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"get me a taxi"</li>
-    <li>"call me a car"</li>
+    <li>"get me a taxi"
+    </li>
+
+    <li>"call me a car"
+    </li>
   </ul>
-  <p style="font-size:13px;margin-bottom:0px;margin-top:10px">(Android Wear only)</p>
+
+  <p style="font-size:13px;margin-bottom:0px;margin-top:10px">
+    (Android Wear only)
+  </p>
 </div>
 
 <p>To call a taxi, use the
@@ -1548,17 +1599,22 @@
 
 <h3 id="PlaySearch">Play music based on a search query</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"play michael jackson billie jean"</li>
+    <li>"play michael jackson billie jean"
+    </li>
   </ul>
 </div>
 
@@ -1861,19 +1917,28 @@
 the URI scheme defined below. When the phone app opens, it displays the phone number
 but the user must press the <em>Call</em> button to begin the phone call.</p>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"call 555-5555"</li>
-    <li>"call bob"</li>
-    <li>"call voicemail"</li>
+    <li>"call 555-5555"
+    </li>
+
+    <li>"call bob"
+    </li>
+
+    <li>"call voicemail"
+    </li>
   </ul>
 </div>
 
@@ -1947,16 +2012,22 @@
 
 <h3 id="SearchOnApp">Search using a specific app</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30"/></a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"search for cat videos on myvideoapp"</li>
+    <li>"search for cat videos on myvideoapp"
+    </li>
   </ul>
 </div>
 <!-- Video box -->
@@ -1976,7 +2047,7 @@
 <dd>
   <dl>
     <dt><code>"com.google.android.gms.actions.SEARCH_ACTION"</code></dt>
-    <dd>Support search queries from Google Now.</dd>
+    <dd>Support search queries from Google Voice Actions.</dd>
   </dl>
 </dd>
 
@@ -2207,17 +2278,22 @@
 
 <h3 id="ViewUrl">Load a web URL</h3>
 
-<!-- Google Now box -->
-<div class="now-box">
-  <div class="now-img-cont">
-    <a href="#Now">
-      <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img"
-           width="30" height="30" alt=""/>
-    </a>
+<!-- Google Voice Actions box -->
+<div class="voice-box">
+  <div class="voice-img-cont">
+    <a href=
+    "https://developers.google.com/voice-actions/system/#system_actions_reference">
+    <img src="{@docRoot}guide/components/images/voice-icon.png" class=
+    "voice-img" width="30" height="30" alt=""></a>
   </div>
-  <p class="now-title">Google Now</p>
+
+  <p class="voice-title">
+    Google Voice Actions
+  </p>
+
   <ul>
-    <li>"open example.com"</li>
+    <li>"open example.com"
+    </li>
   </ul>
 </div>
 
@@ -2307,128 +2383,4 @@
 
 
 <p>For more information, see
-<a href="{@docRoot}tools/help/shell.html#am">ADB Shell Commands</a>.</p>
-
-
-
-
-
-
-<h2 id="Now">Intents Fired by Google Now</h2>
-
-<p><a href="http://www.google.com/landing/now/">Google Now</a> recognizes many voice commands
-and fires intents for them. As such, users may launch your app with a Google Now voice command
-if your app declares the corresponding intent filter. For example, if your app can
-<a href="#CreateAlarm">set an alarm</a> and you add the corresponding intent filter to your
-manifest file, Google Now lets users choose your app when they request to set an alarm, as
-shown in figure 1.</p>
-
-<img src="{@docRoot}guide/components/images/google-action.png"
-     srcset="{@docRoot}guide/components/images/google-action_2x.png 2x"
-     width="700" height="241" alt=""/>
-<p class="img-caption"><strong>Figure 1.</strong> Google Now lets users choose from installed
-apps that support a given action.</p>
-
-<p>Google Now recognizes voice commands for the actions listed in table 1. For more information
-about declaring each intent filter, click on the action description.</p>
-
-<p class="table-caption"><strong>Table 1.</strong> Voice commands recognized by Google Now
-(Google Search app v3.6).</p>
-<table>
-<tr>
-  <th>Category</th>
-  <th>Details and Examples</th>
-  <th>Action Name</th>
-</tr>
-<tr>
-  <td rowspan="2" style="vertical-align:middle">Alarm</td>
-  <td>
-    <p><a href="#CreateAlarm">Set alarm</a></p>
-    <ul class="now-list">
-      <li>"set an alarm for 7 am"</li>
-    </ul>
-  </td>
-  <td>{@link android.provider.AlarmClock#ACTION_SET_ALARM AlarmClock.ACTION_SET_ALARM}</td>
-</tr>
-<tr>
-  <td>
-    <p><a href="#CreateTimer">Set timer</a></p>
-    <ul class="now-list">
-      <li>"set a timer for 5 minutes"</li>
-    </ul>
-  </td>
-  <td>{@link android.provider.AlarmClock#ACTION_SET_TIMER AlarmClock.ACTION_SET_TIMER}</td>
-</tr>
-<tr>
-  <td style="vertical-align:middle">Communication</td>
-  <td>
-    <p><a href="#DialPhone">Call a number</a></p>
-    <ul class="now-list">
-      <li>"call 555-5555"</li>
-      <li>"call bob"</li>
-      <li>"call voicemail"</li>
-    </ul>
-  </td>
-  <td>{@link android.content.Intent#ACTION_CALL Intent.ACTION_CALL}</td>
-</tr>
-<tr>
-  <td style="vertical-align:middle">Local</td>
-  <td>
-    <p><a href="#CallCar">Book a car</a></p>
-    <ul class="now-list">
-      <li>"call me a car"</li>
-      <li>"book me a taxi"</li>
-    </ul>
-  </td>
-  <td><a href="{@docRoot}reference/com/google/android/gms/actions/ReserveIntents.html#ACTION_RESERVE_TAXI_RESERVATION">
-      <code>ReserveIntents<br/>.ACTION_RESERVE_TAXI_RESERVATION</code></a></td>
-</tr>
-<tr>
-  <td rowspan="3" style="vertical-align:middle">Media</td>
-  <td>
-    <p><a href="#PlaySearch">Play music from search</a></p>
-    <ul class="now-list">
-      <li>"play michael jackson billie jean"</li>
-    </ul>
-  </td>
-  <td>{@link android.provider.MediaStore#INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH MediaStore<br/>.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH}</td>
-</tr>
-<tr>
-  <td>
-    <p><a href="#CameraStill">Take a picture</a></p>
-    <ul class="now-list">
-      <li>"take a picture"</li>
-    </ul>
-  </td>
-  <td>{@link android.provider.MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA MediaStore<br/>.INTENT_ACTION_STILL_IMAGE_CAMERA}</td>
-</tr>
-<tr>
-  <td>
-    <p><a href="#CameraVideo">Record a video</a></p>
-    <ul class="now-list">
-      <li>"record a video"</li>
-    </ul>
-  </td>
-  <td>{@link android.provider.MediaStore#INTENT_ACTION_VIDEO_CAMERA MediaStore<br/>.INTENT_ACTION_VIDEO_CAMERA}</td>
-</tr>
-<tr>
-  <td style="vertical-align:middle">Search</td>
-  <td>
-    <p><a href="#SearchOnApp">Search using a specific app</a></p>
-    <ul class="now-list">
-      <li>"search for cat videos <br/>on myvideoapp"</li>
-    </ul>
-  </td>
-  <td><code>"com.google.android.gms.actions<br/>.SEARCH_ACTION"</code></td>
-</tr>
-<tr>
-  <td style="vertical-align:middle">Web browser</td>
-  <td>
-    <p><a href="#ViewUrl">Open URL</a></p>
-    <ul class="now-list">
-      <li>"open example.com"</li>
-    </ul>
-  </td>
-  <td>{@link android.content.Intent#ACTION_VIEW Intent.ACTION_VIEW}</td>
-</tr>
-</table>
+<a href="{@docRoot}tools/help/shell.html#am">ADB Shell Commands</a>.</p>
\ No newline at end of file
diff --git a/docs/html/topic/libraries/support-library/features.jd b/docs/html/topic/libraries/support-library/features.jd
index 0f63bf6..614392e 100755
--- a/docs/html/topic/libraries/support-library/features.jd
+++ b/docs/html/topic/libraries/support-library/features.jd
@@ -7,7 +7,15 @@
 
     <h2>In this document</h2>
     <ol>
-      <li><a href="#v4">v4 Support Library</a></li>
+      <li><a href="#v4">v4 Support Libraries</a>
+        <ol>
+          <li><a href="#v4-compat">v4 compat library</a></li>
+          <li><a href="#v4-core-utils">v4 core-utils library</a></li>
+          <li><a href="#v4-core-ui">v4 core-ui library</a></li>
+          <li><a href="#v4-media-compat">v4 media-compat library</a></li>
+          <li><a href="#v4-fragment">v4 fragment library</a></li>
+        </ol>
+      </li>
       <li><a href="#multidex">Multidex Support Library</a></li>
       <li><a href="#v7">v7 Support Libraries</a>
         <ol>
@@ -63,94 +71,115 @@
   include the library in your application.</p>
 
 
-<h2 id="v4">v4 Support Library</h2>
-
-<p>This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the
-  largest set of APIs compared to the other libraries, including support for application components,
-  user interface features, accessibility, data handling, network connectivity, and programming
-  utilities. Here are a few of the key classes included in the v4 library:</p>
-
-<ul>
-  <li>App Components
-    <ul>
-      <li>{@link android.support.v4.app.Fragment}
-        - Adds support for encapsulation of user interface and functionality
-        with Fragments, enabling
-        applications to provide layouts that adjust between small and
-        large-screen devices.
-       </li>
-
-      <li>{@link android.support.v4.app.NotificationCompat} - Adds support for rich notification
-        features.</li>
-      <li>{@link android.support.v4.content.LocalBroadcastManager} - Allows applications to easily
-        register for and receive intents within a single application without broadcasting them
-        globally.</li>
-    </ul>
-  </li>
-  <li>User Interface
-    <ul>
-      <li>{@link android.support.v4.view.ViewPager} - Adds a
-      {@link android.view.ViewGroup} that manages the layout for the
-      child views, which the user can swipe between.</li>
-      <li>{@link android.support.v4.view.PagerTitleStrip}
-        - Adds a non-interactive title strip, that can be added as a child of
-        {@link android.support.v4.view.ViewPager}.</li>
-      <li>{@link android.support.v4.view.PagerTabStrip} - Adds a
-        navigation widget for switching between paged views, that can also be used with
-        {@link android.support.v4.view.ViewPager}.</li>
-      <li>{@link android.support.v4.widget.DrawerLayout} - Adds
-      support for creating a <a href="{@docRoot}training/implementing-navigation/nav-drawer.html"
-      >Navigation Drawer</a> that can be pulled in from the edge of a window.</li>
-      <li>{@link android.support.v4.widget.SlidingPaneLayout}
-        - Adds widget for creating linked summary and detail views that
-        appropriately adapt to various screen sizes.</li>
-    </ul>
-  </li>
-  <li>Accessibility
-    <ul>
-      <li>{@link android.support.v4.widget.ExploreByTouchHelper}
-        - Adds a helper class for implementing accessibility support for custom views.</li>
-      <li>{@link android.support.v4.view.accessibility.AccessibilityEventCompat} - Adds support for
-      {@link android.view.accessibility.AccessibilityEvent}. For more information about implementing
-      accessibility, see <a href="{@docRoot}guide/topics/ui/accessibility/index.html"
-      >Accessibility</a>.</li>
-
-      <li>{@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat} - Adds support
-      for {@link android.view.accessibility.AccessibilityNodeInfo}.</li>
-      <li>{@link android.support.v4.view.accessibility.AccessibilityNodeProviderCompat} - Adds
-      support for {@link android.view.accessibility.AccessibilityNodeProvider}.</li>
-      <li>{@link android.support.v4.view.AccessibilityDelegateCompat} - Adds support for
-      {@link android.view.View.AccessibilityDelegate}.</li>
-    </ul>
-  </li>
-  <li>Content
-    <ul>
-      <li>{@link android.support.v4.content.Loader} - Adds support for asynchronous loading of data.
-        The library also provides concrete implementations of this class, including
-        {@link android.support.v4.content.CursorLoader} and
-        {@link android.support.v4.content.AsyncTaskLoader}.</li>
-      <li>{@link android.support.v4.content.FileProvider} - Adds support for sharing of private
-        files between applications.</li>
-    </ul>
-  </li>
-</ul>
+<h2 id="v4">v4 Support Libraries</h2>
 
 <p>
-  There are many other APIs included in this library. For complete, detailed information about the
-  v4 Support Library APIs, see the {@link android.support.v4.app android.support.v4} package in the
-  API reference.
+  These libraries are designed to be used with Android 2.3 (API level 9) and
+  higher. They include the largest set of APIs compared to the other libraries,
+  including support for application components, user interface features,
+  accessibility, data handling, network connectivity, and programming
+  utilities.
 </p>
 
-<p class="caution"><strong>Caution:</strong> Using dynamic dependencies, especially for higher version
-numbers, can cause unexpected version updates and regression incompatibilities.</p>
+<p>
+  For complete, detailed information about the classes and methods provided by
+  the v4 support libraries, see the {@link android.support.v4.app
+  android.support.v4} package in the API reference.
+</p>
+
+
+<p class="note">
+  <strong>Note:</strong> Prior to Support Library revision 24.2.0, there was a
+  single v4 support library. That library was divided into multiple modules to
+  improve efficiency. For backwards compatibility, if you list
+  <code>support-v4</code> in your Gradle script, your APK will include all of
+  the v4 modules. However, to reduce APK size, we recommend that you just list
+  the specific modules your app needs.
+</p>
+
+<h3 id="v4-compat">v4 compat library</h3>
+
+<p>
+  Provides compatibility wrappers for a number of framework APIs, such as
+  <code>Context.obtainDrawable()</code> and
+  <code>View.performAccessibilityAction()</code>.
+</p>
 
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:support-v4:24.1.1
+com.android.support:support-compat:24.2.0
 </pre>
 
+<h3 id="v4-core-utils">v4 core-utils library</h3>
 
+<p>
+  Provides a number of utility classes, such as {@link
+  android.support.v4.content.AsyncTaskLoader} and {@link
+  android.support.v4.content.PermissionChecker}.
+</p>
+
+<p>
+  The Gradle build script dependency identifier for this library is as follows:
+</p>
+
+<pre>
+com.android.support:support-core-utils:24.2.0
+</pre>
+
+<h3 id="v4-core-ui">v4 core-ui library</h3>
+
+<p>
+  Implements a variety of UI-related components, such as {@link
+  android.support.v4.view.ViewPager}, {@link
+  android.support.v4.widget.NestedScrollView}, and {@link
+  android.support.v4.widget.ExploreByTouchHelper}.
+</p>
+
+<p>
+  The Gradle build script dependency identifier for this library is as follows:
+</p>
+
+<pre>
+com.android.support:support-core-ui:24.2.0
+</pre>
+
+<h3 id="v4-media-compat">v4 media-compat library</h3>
+
+<p>
+  Backports portions of the <a href=
+  "/reference/android/media/package-summary.html">media</a> framework,
+  including {@link android.media.browse.MediaBrowser} and {@link
+  android.media.session.MediaSession}.
+</p>
+
+<p>
+  The Gradle build script dependency identifier for this library is as follows:
+</p>
+
+<pre>
+com.android.support:support-media-compat:24.2.0
+</pre>
+
+<h3 id="v4-fragment">v4 fragment library</h3>
+
+<p>
+  Adds support for encapsulation of user interface and functionality with
+  <a href=
+  "/guide/components/fragments.html">fragments</a>,
+  enabling applications to provide layouts that adjust between small and
+  large-screen devices. This module has dependencies on <a href=
+  "#v4-compat">compat</a>, <a href="#v4-core-utils">core-utils</a>, <a href=
+  "#v4-core-ui">core-ui</a>, and <a href="#v4-media-compat">media-compat</a>.
+</p>
+
+<p>
+  The Gradle build script dependency identifier for this library is as follows:
+</p>
+
+<pre>
+com.android.support:support-fragment:24.2.0
+</pre>
 
 <h2 id="multidex">Multidex Support Library</h2>
 
@@ -173,7 +202,7 @@
 
 <h2 id="v7">v7 Support Libraries</h2>
 
-<p>There are several libraries designed to be used with Android 2.1 (API level 7) and higher.
+<p>There are several libraries designed to be used with Android 2.3 (API level 9) and higher.
   These libraries provide specific feature sets and can be included in your application
   independently from each other.</p>
 
@@ -216,7 +245,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:appcompat-v7:24.1.1
+com.android.support:appcompat-v7:24.2.0
 </pre>
 
 
@@ -231,7 +260,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:cardview-v7:24.1.1
+com.android.support:cardview-v7:24.2.0
 </pre>
 
 
@@ -247,7 +276,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:gridlayout-v7:24.1.1
+com.android.support:gridlayout-v7:24.2.0
 </pre>
 
 
@@ -270,7 +299,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:mediarouter-v7:24.1.1
+com.android.support:mediarouter-v7:24.2.0
 </pre>
 
 <p class="caution">The v7 mediarouter library APIs introduced in Support Library
@@ -290,7 +319,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:palette-v7:24.1.1
+com.android.support:palette-v7:24.2.0
 </pre>
 
 
@@ -306,7 +335,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:recyclerview-v7:24.1.1
+com.android.support:recyclerview-v7:24.2.0
 </pre>
 
 
@@ -329,18 +358,18 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:preference-v7:24.1.1
+com.android.support:preference-v7:24.2.0
 </pre>
 
 <h2 id="v8">v8 Support Library</h2>
 
-<p>This library is designed to be used with Android 2.2 (API level 8) and higher.
+<p>This library is designed to be used with Android 2.3 (API level 9) and higher.
   This library provides specific feature sets and can be included in your application
   independently from other libraries.</p>
 
 <h3 id="v8-renderscript">v8 renderscript library</h3>
 
-<p>This library is designed to be used with Android (API level 8) and higher. It adds support for
+<p>This library is designed to be used with Android 2.3 (API level 9) and higher. It adds support for
   the <a href="{@docRoot}guide/topics/renderscript/compute.html">RenderScript</a> computation
   framework. These APIs are included in the {@link android.support.v8.renderscript} package. You
   should be aware that the steps for including these APIs in your application is <em>very
@@ -380,7 +409,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:support-v13:24.1.1
+com.android.support:support-v13:24.2.0
 </pre>
 
 
@@ -406,7 +435,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:preference-v14:24.1.1
+com.android.support:preference-v14:24.2.0
 </pre>
 
 
@@ -429,7 +458,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:preference-leanback-v17:24.1.1
+com.android.support:preference-leanback-v17:24.2.0
 </pre>
 
 
@@ -465,7 +494,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:leanback-v17:24.1.1
+com.android.support:leanback-v17:24.2.0
 </pre>
 
 
@@ -480,7 +509,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:support-annotations:24.1.1
+com.android.support:support-annotations:24.2.0
 </pre>
 
 
@@ -498,7 +527,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:design:24.1.1
+com.android.support:design:24.2.0
 </pre>
 
 
@@ -519,7 +548,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:customtabs:24.1.1
+com.android.support:customtabs:24.2.0
 </pre>
 
 
@@ -543,7 +572,7 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:percent:24.1.1
+com.android.support:percent:24.2.0
 </pre>
 
 
@@ -566,5 +595,5 @@
 <p>The Gradle build script dependency identifier for this library is as follows:</p>
 
 <pre>
-com.android.support:recommendation:24.1.1
+com.android.support:recommendation:24.2.0
 </pre>
diff --git a/docs/html/topic/libraries/support-library/revisions.jd b/docs/html/topic/libraries/support-library/revisions.jd
index 3b25fb0..4e14c70 100644
--- a/docs/html/topic/libraries/support-library/revisions.jd
+++ b/docs/html/topic/libraries/support-library/revisions.jd
@@ -6,9 +6,324 @@
 <p>This page provides details about the Support Library package releases.</p>
 
 <div class="toggle-content opened">
-  <p id="rev24-1-1">
+  <p id="rev24-2-0">
     <a href="#" onclick="return toggleContent(this)"><img src=
     "{@docRoot}assets/images/styles/disclosure_up.png" class=
+    "toggle-content-img" alt="">Android Support Library, revision 24.2.0</a>
+    <em>(August 2016)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+<p>Release 24.2.0 contains the following changes:</p>
+
+<ul>
+  <li><a href="#24-2-0-v4-refactor">v4 Support Library split</a></li>
+  <li><a href="#24-2-0-api-updates">API updates</a></li>
+  <li><a href="#24-2-0-behavior">Behavior changes</a></li>
+  <li><a href="#24-2-0-deprecations">Deprecations</a></li>
+  <li><a href="#24-2-0-bugfixes">Bug fixes</a></li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Release 24.2.0 removes support for
+  Android 2.2 (API level 8) and lower. Classes and methods that exist only to
+  serve those system versions are now marked as deprecated and should no longer
+  be used. These deprecated classes and methods may be removed in a future
+  release.
+</p>
+
+<h3 id="24-2-0-v4-refactor">v4 Support Library split</h3>
+
+<p>With this release, the <a href="features.html#v4">v4 Support Library</a> has
+  been split into several smaller modules:</p>
+
+<dl>
+  <dt>
+    <code>support-compat</code>
+  </dt>
+
+  <dd>
+    Provides compatibility wrappers for new framework APIs, such as
+    <code>Context.getDrawable()</code> and
+    <code>View.performAccessibilityAction()</code>.
+  </dd>
+
+  <dt>
+    <code>support-core-utils</code>
+  </dt>
+
+  <dd>
+    Provides a number of utility classes, such as {@link
+    android.support.v4.content.AsyncTaskLoader} and {@link
+    android.support.v4.content.PermissionChecker}.
+  </dd>
+
+  <dt>
+    <code>support-core-ui</code>
+  </dt>
+
+  <dd>
+    Implements a variety of UI-related components, such as {@link
+    android.support.v4.view.ViewPager}, {@link
+    android.support.v4.widget.NestedScrollView}, and {@link
+    android.support.v4.widget.ExploreByTouchHelper}.
+  </dd>
+
+  <dt>
+    <code>support-media-compat</code>
+  </dt>
+
+  <dd>
+    Backports portions of the <a href=
+    "/reference/android/media/package-summary.html">media</a> framework,
+    including {@link android.media.browse.MediaBrowser} and {@link
+    android.media.session.MediaSession}.
+  </dd>
+
+  <dt>
+    <code>support-fragment</code>
+  </dt>
+
+  <dd>
+    Backports the <a href=
+    "/guide/components/fragments.html">fragment</a>
+    framework. This module has dependencies on <code>support-compat</code>,
+    <code>support-core-utils</code>, <code>support-core-ui</code>, and
+    <code>support-media-compat</code>.
+  </dd>
+</dl>
+
+<p>For backwards compatibility, if you list <code>support-v4</code> in your
+Gradle script, your APK will include all of these modules. However, to reduce
+APK size, we recommend that you just list the specific modules your app needs.
+</p>
+
+<h3 id="24-2-0-api-updates">API updates</h3>
+
+<ul>
+  <li>Clients using <a href="features.html#custom-tabs">Custom Tabs</a> can
+  control whether Instant Apps should open. (Note that Instant Apps are not yet
+  generally available.) To enable or disable Instant Apps, call <a href=
+  "/reference/android/support/customtabs/CustomTabsIntent.Builder.html#setInstantAppsEnabled(boolean)">
+  <code>CustomTabsIntent.Builder.setInstantAppsEnabled()</code></a> or
+  specify <a href=
+  "/reference/android/support/customtabs/CustomTabsIntent.html#EXTRA_ENABLE_INSTANT_APPS">
+  <code>EXTRA_ENABLE_INSTANT_APPS</code></a>. By default, Custom Tabs will
+  default to enabling Instant Apps, when that feature becomes available.
+  </li>
+
+  <li>{@link android.support.design.widget.TextInputLayout} adds support for
+  the <a href=
+  "https://material.google.com/components/text-fields.html#text-fields-password-input">
+    password visibility toggle</a> from the material design specification.
+  </li>
+
+  <li>The new <a href=
+  "/reference/android/support/transition/package-summary.html"
+  ><code>android.support.transition</code></a>
+  package backports the <a href=
+  "/training/transitions/index.html">Transitions</a> framework to API levels 14
+  and higher. For more information, see the <a href=
+  "/reference/android/support/transition/package-summary.html"
+  ><code>android.support.transition</code></a> reference.
+  </li>
+
+  <li>The <a href="features.html#custom-tabs">Custom Tabs support library</a>
+  adds support for using {@link android.widget.RemoteViews} in the secondary
+  toolbar. The existing {@link
+  android.support.customtabs.CustomTabsSession#setToolbarItem setToolbarItem()}
+  method is now deprecated.
+  </li>
+
+  <li>{@link android.support.v7.content.res.AppCompatResources} adds the
+  ability to load a <code>&lt;vector&gt;</code> (on API level 9 and higher) or
+  <code>&lt;animated-vector&gt;</code> (on API level 11 and higher) from a
+  resource ID, by using the new <a href=
+  "/reference/android/support/v7/content/res/AppCompatResources.html#getDrawable(android.content.Context,%20int)"
+  ><code>getDrawable()</code></a> method.
+  </li>
+
+  <li>{@link android.support.design.widget.CoordinatorLayout} now supports
+  defining inset views, and specifying that other views should dodge the inset
+  views. This allows apps to replicate behavior patterns similar to the way
+  {@link android.support.design.widget.FloatingActionButton} moves out of the
+  way of a {@link android.support.design.widget.Snackbar}, but for any
+  arbitrary view children. For more information, see the <a href=
+  "/reference/android/support/design/widget/CoordinatorLayout.LayoutParams.html#insetEdge">
+  <code>LayoutParams.insetEdge</code></a> and <a href=
+  "/reference/android/support/design/widget/CoordinatorLayout.LayoutParams.html#dodgeInsetEdges">
+  <code>LayoutParams.dodgeInsetEdges</code></a> reference documentation.
+  </li>
+
+  <li>The new <a href="/reference/android/support/v7/util/DiffUtil.html"><code>
+    DiffUtil</code></a> class can calculate the difference between two
+    collections, and can dispatch a list of update operations that are suitable
+    to be consumed by a {@link android.support.v7.widget.RecyclerView.Adapter}.
+  </li>
+
+  <li>
+    <a href=
+    "/reference/android/support/v7/widget/RecyclerView.OnFlingListener.html"><code>
+    RecyclerView.OnFlingListener</code></a> has been added to support custom
+    behavior in response to flings. The <a href=
+    "/reference/android/support/v7/widget/SnapHelper.html"><code>SnapHelper</code></a>
+    class provides an implementation specifically for snapping child views, and
+    the <a href=
+    "/reference/android/support/v7/widget/LinearSnapHelper.html"><code>LinearSnapHelper</code></a>
+    class extends this implementation to provide center-aligned snapping
+    behavior similar to {@link android.support.v4.view.ViewPager}.
+  </li>
+
+</ul>
+
+<h3 id="24-2-0-behavior">Behavior changes</h3>
+
+<ul>
+  <li>If you use the appcompat library's day/night functionality, the system
+  now automatically recreates your activity whenever the day/night mode changes
+  (either because of the time of day, or because of a call to {@link
+  android.support.v7.app.AppCompatDelegate#setLocalNightMode
+  AppCompatDelegate.setLocalNightMode()}).
+  </li>
+
+  <li>{@link android.support.design.widget.Snackbar} now draws behind the
+  navigation bar if the status bar is translucent.
+  </li>
+</ul>
+
+<h3 id="24-2-0-deprecations">Deprecations</h3>
+
+<p>Deprecated classes and methods are subject to removal in a future release. You should migrate away from these APIs as soon as possible.</p>
+
+<ul>
+  <li>Several methods on the following classes were only required for API 8 and
+  lower, and should no longer be used. Instead, use the framework
+  implementations.
+    <ul>
+      <li>{@link android.support.v4.view.KeyEventCompat}: Replace with {@link
+      android.view.KeyEvent}
+      </li>
+
+      <li>{@link android.support.v4.view.MotionEventCompat}: Use {@link
+      android.view.MotionEvent}
+      </li>
+
+      <li>{@link android.support.v4.view.ViewCompat}: Use {@link
+      android.view.View}
+      </li>
+
+      <li>{@link android.support.v4.view.ViewConfigurationCompat}: Use {@link
+      android.view.ViewConfiguration}
+      </li>
+    </ul>
+  </li>
+
+  <li>
+    {@link android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat#getDescription
+    AccessibilityServiceInfoCompat.getDescription()}
+    has been deprecated in favor of
+    <a href="/reference/android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat.html#loadDescription(android.accessibilityservice.AccessibilityServiceInfo, android.content.pm.PackageManager)"><code>loadDescription()</code></a>
+    which returns a correctly localized description.
+  </li>
+
+  <li>You should not instantiate the <code>ActivityCompat</code> class
+  directly. The non-static <code>getReferrer(Activity)</code> method will be
+  made static in an upcoming release.
+  </li>
+
+  <li>{@link android.support.design.widget.CoordinatorLayout.Behavior#isDirty
+  CoordinatorLayout.Behavior.isDirty()} has been deprecated and is no longer
+  called by {@link android.support.design.widget.CoordinatorLayout}. Any
+  implementations, as well as any calls to this method, should be removed.
+  </li>
+
+  <li>{@link android.support.v4.media.session.MediaSessionCompat#obtain
+  MediaSessionCompat.obtain()} has been deprecated and replaced with the more
+  appropriately-named method
+  <a href="/reference/android/support/v4/media/session/MediaSessionCompat.html#fromMediaSession"><code>fromMediaSession()</code></a>.
+  </li>
+
+  <li>{@link
+  android.support.v4.media.session.MediaSessionCompat.QueueItem#obtain
+  MediaSessionCompat.QueueItem.obtain()} has been deprecated and replaced with
+  the more appropriately-named method
+  <a href="/reference/android/support/v4/media/session/MediaSessionCompat.QueueItem.html#fromQueueItem"><code>fromQueueItem()</code></a>.
+  </li>
+
+  <li>Several abstract classes have been deprecated and replaced with
+  interfaces that more closely reflect their framework equivalents.
+    <ul>
+      <li>{@link
+      android.support.v4.view.accessibility.AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat}
+      has been replaced by the <a href=
+      "/reference/android/support/v4/view/accessibility/AccessibilityManagerCompat.AccessibilityStateChangeListener.html">
+        <code>AccessibilityManagerCompat.AccessibilityStateChangeListener</code></a>
+        interface.
+      </li>
+
+      <li>{@link
+      android.support.v4.widget.SearchViewCompat.OnCloseListenerCompat} has
+      been replaced by the <a
+      href="/reference/android/support/v4/widget/SearchViewCompat.OnCloseListener.html"
+      ><code>SearchViewCompat.OnCloseListener</code></a> interface.
+      </li>
+
+      <li>{@link
+      android.support.v4.widget.SearchViewCompat.OnQueryTextListenerCompat }
+      has been replaced by the <a
+      href="/reference/android/support/v4/widget/SearchViewCompat.OnQueryTextListener.html"
+      ><code>SearchViewCompat.OnQueryTextListener</code></a>
+      interface.
+      </li>
+    </ul>
+  </li>
+
+  <li>{@link android.support.customtabs.CustomTabsSession#setToolbarItem
+  CustomTabsSession.setToolbarItem()} has been deprecated and replaced by the
+  RemoteViews-based <a href=
+  "/reference/android/support/customtabs/CustomTabsSession.html#setSecondaryToolbarViews">
+    <code>setSecondaryToolbarViews()</code></a>.
+  </li>
+</ul>
+
+<h3 id="24-2-0-bugfixes">Bug fixes</h3>
+
+<p>The following known issues have been fixed with release 24.2.0:</p>
+
+<ul>
+  <li>Ensure <code>SwipeRefreshLayout</code> indicator is shown when
+  <code>setRefreshing(true)</code> is called before the first measurement pass
+  (<a href="https://code.google.com/p/android/issues/detail?id=77712">AOSP
+  issue 77712</a>)
+  </li>
+
+  <li>Prevent <code>TabLayout</code> from flickering when changing pages
+  (<a href="https://code.google.com/p/android/issues/detail?id=180454">AOSP
+  issue 180454</a>)
+  </li>
+
+  <li>Avoid <code>ClassNotFoundException</code> when unmarshalling
+  <code>SavedState</code> on API level 11 and lower (<a href=
+  "https://code.google.com/p/android/issues/detail?id=196430">AOSP issue
+  196430</a>)
+  </li>
+</ul>
+
+<p>
+  A complete list of public bug fixes is available on the <a href=
+  "https://code.google.com/p/android/issues/list?can=1&q=Component%3DSupport-Libraries+Target%3DSupport-24.2.0">
+  AOSP Issue Tracker</a>.
+</p>
+
+  </div>
+</div>
+
+<!-- end of collapsible section: 24.2.0 -->
+
+<div class="toggle-content closed">
+  <p id="rev24-1-1">
+    <a href="#" onclick="return toggleContent(this)"><img src=
+    "{@docRoot}assets/images/styles/disclosure_down.png" class=
     "toggle-content-img" alt="">Android Support Library, revision 24.1.1</a>
     <em>(July 2016)</em>
   </p>
@@ -76,7 +391,7 @@
     <ul>
       <li>TabLayout.setCustomView(null) results in NullPointerException
         (<a href="https://code.google.com/p/android/issues/detail?id=214753">AOSP
-        issue</a>)
+        issue 214753</a>)
       </li>
 
       <li>TabLayout incorrectly highlights custom tabs (<a href=
diff --git a/docs/html/topic/libraries/support-library/setup.jd b/docs/html/topic/libraries/support-library/setup.jd
index 0cb9389..adb263c 100755
--- a/docs/html/topic/libraries/support-library/setup.jd
+++ b/docs/html/topic/libraries/support-library/setup.jd
@@ -85,17 +85,24 @@
       <li>Make sure you have downloaded the <strong>Android Support Repository</strong>
         using the <a href="#download">SDK Manager</a>.</li>
       <li>Open the {@code build.gradle} file for your application.</li>
-      <li>Add the support library to the {@code dependencies} section. For example, to add the v4
-        support library, add the following lines:
+      <li>Add the support library to the {@code dependencies} section. For
+        example, to add the v4 core-utils library, add the following lines:
 <pre>
 dependencies {
     ...
-    <b>compile "com.android.support:support-v4:24.1.1"</b>
+    <b>compile "com.android.support:support-core-utils:24.2.0"</b>
 }
 </pre>
       </li>
     </ol>
 
+<p class="caution">
+  <strong>Caution:</strong> Using dynamic dependencies (for example,
+  <code>palette-v7:23.0.+</code>) can cause unexpected version updates and
+  regression incompatibilities. We recommend that you explicitly specify a
+  library version (for example, <code>palette-v7:24.2.0</code>).
+</p>
+
 <h2 id="using-apis">Using Support Library APIs</h2>
 
 <p>Support Library classes that provide support for existing framework APIs typically have the
@@ -141,12 +148,12 @@
 
 <pre>
   &lt;uses-sdk
-      android:minSdkVersion="<b>7</b>"
-      android:targetSdkVersion="17" /&gt;
+      android:minSdkVersion="<b>14</b>"
+      android:targetSdkVersion="23" /&gt;
 </pre>
 
 <p>The manifest setting tells Google Play that your application can be installed on devices with Android
-  2.1 (API level 7) and higher.  </p>
+  4.0 (API level 14) and higher.  </p>
 
 <p>If you are using Gradle build files, the <code>minSdkVersion</code> setting in the build file
   overrides the manifest settings.  </p>
@@ -158,7 +165,7 @@
     ...
 
     defaultConfig {
-        minSdkVersion 8
+        minSdkVersion 16
         ...
     }
     ...
@@ -166,13 +173,15 @@
 </pre>
 
 <p>In this case, the build file setting tells Google Play that the default build variant of your
-  application can be installed on devices with Android 2.2 (API level 8) and higher. For more
+  application can be installed on devices with Android 4.1 (API level 16) and higher. For more
   information about build variants, see
   <a href="{@docRoot}studio/build/index.html">Build System Overview</a>. </p>
 
 <p class="note">
-  <strong>Note:</strong> If you are including the v4 support and v7 appcompat libraries in your
-  application, you should specify a minimum SDK version of <code>"7"</code> (and not
-  <code>"4"</code>). The highest support library level you include in your application determines
-  the lowest API version in which it can operate.
+  <strong>Note:</strong> If you are including several support libraries, the
+  minimum SDK version must be the <em>highest</em> version required by any of
+  the specified libraries. For example, if your app includes both the <a href=
+  "features.html#v14-preference">v14 Preference Support library</a> and the
+  <a href="features.html#v17-leanback">v17 Leanback library</a>, your minimum
+  SDK version must be 17 or higher.
 </p>
diff --git a/docs/html/training/notify-user/navigation.jd b/docs/html/training/notify-user/navigation.jd
index 65f8d48b..d0ec1cd 100644
--- a/docs/html/training/notify-user/navigation.jd
+++ b/docs/html/training/notify-user/navigation.jd
@@ -205,7 +205,7 @@
 notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
         Intent.FLAG_ACTIVITY_CLEAR_TASK);
 // Creates the PendingIntent
-PendingIntent notifyIntent =
+PendingIntent pendingIntent =
         PendingIntent.getActivity(
         this,
         0,
@@ -214,7 +214,7 @@
 );
 
 // Puts the PendingIntent into the notification builder
-builder.setContentIntent(notifyIntent);
+builder.setContentIntent(pendingIntent);
 // Notifications are issued by sending them to the
 // NotificationManager system service.
 NotificationManager mNotificationManager =
diff --git a/docs/html/training/transitions/index.jd b/docs/html/training/transitions/index.jd
index 53faa01..b8f99c8 100644
--- a/docs/html/training/transitions/index.jd
+++ b/docs/html/training/transitions/index.jd
@@ -48,11 +48,9 @@
 animations.</p>
 
 <p class="note"><strong>Note:</strong> For Android versions earlier than 4.4.2 (API level 19)
-but greater than or equal to Android 4.0 (API level 14), use the <code>animateLayoutChanges</code>
-attribute to animate layouts. To learn more, see
-<a href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> and
-<a href="{@docRoot}training/animation/layout.html">Animating Layout Changes</a>.</p>
-
+but greater than or equal to Android 4.0 (API level 14), use the Android Support
+Library's <a href="/reference/android/support/transitions/package-summary.html"
+><code>android.support.transition</code></a> package.</p>
 
 <h2>Lessons</h2>
 
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 0a86291..56f3741 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -178,6 +178,7 @@
     private boolean mBouncer;
     private boolean mBootCompleted;
     private boolean mUserUnlocked;
+    private boolean mHasLockscreenWallpaper;
 
     // Device provisioning state
     private boolean mDeviceProvisioned;
@@ -1173,6 +1174,30 @@
     }
 
     /**
+     * Update the state whether Keyguard currently has a lockscreen wallpaper.
+     *
+     * @param hasLockscreenWallpaper Whether Keyguard has a lockscreen wallpaper.
+     */
+    public void setHasLockscreenWallpaper(boolean hasLockscreenWallpaper) {
+        if (hasLockscreenWallpaper != mHasLockscreenWallpaper) {
+            mHasLockscreenWallpaper = hasLockscreenWallpaper;
+            for (int i = mCallbacks.size() - 1; i >= 0; i--) {
+                KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
+                if (cb != null) {
+                    cb.onHasLockscreenWallpaperChanged(hasLockscreenWallpaper);
+                }
+            }
+        }
+    }
+
+    /**
+     * @return Whether Keyguard has a lockscreen wallpaper.
+     */
+    public boolean hasLockscreenWallpaper() {
+        return mHasLockscreenWallpaper;
+    }
+
+    /**
      * Handle {@link #MSG_DPM_STATE_CHANGED}
      */
     protected void handleDevicePolicyManagerStateChanged() {
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
index bd6c51c..4a2d356 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
@@ -240,4 +240,9 @@
      * has changed.
      */
     public void onStrongAuthStateChanged(int userId) { }
+
+    /**
+     * Called when the state whether we have a lockscreen wallpaper has changed.
+     */
+    public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) { }
 }
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 2907fab..cb323a2 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -328,7 +328,7 @@
     <string name="disabled_by_admin" msgid="3669999613095206948">"Disattivata dall\'amministratore"</string>
     <string name="home" msgid="3256884684164448244">"Home page Impostazioni"</string>
   <string-array name="battery_labels">
-    <item msgid="8494684293649631252">"0%%"</item>
+    <item msgid="8494684293649631252">"0%"</item>
     <item msgid="8934126114226089439">"50%%"</item>
     <item msgid="1286113608943010849">"100%%"</item>
   </string-array>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 433fd00..de0c77b 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -16,7 +16,11 @@
 
 package com.android.systemui.keyguard;
 
-import android.annotation.UserIdInt;
+import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
+import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
+import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
+import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
+
 import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
@@ -82,12 +86,6 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.List;
-
-import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
-import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
-import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
-import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
 
 /**
  * Mediates requests related to the keyguard.  This includes queries about the
@@ -509,7 +507,12 @@
             }
         }
 
-
+        @Override
+        public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) {
+            synchronized (KeyguardViewMediator.this) {
+                notifyHasLockscreenWallpaperChanged(hasLockscreenWallpaper);
+            }
+        }
     };
 
     ViewMediatorCallback mViewMediatorCallback = new ViewMediatorCallback() {
@@ -2014,6 +2017,21 @@
         }
     }
 
+    private void notifyHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) {
+        int size = mKeyguardStateCallbacks.size();
+        for (int i = size - 1; i >= 0; i--) {
+            try {
+                mKeyguardStateCallbacks.get(i).onHasLockscreenWallpaperChanged(
+                        hasLockscreenWallpaper);
+            } catch (RemoteException e) {
+                Slog.w(TAG, "Failed to call onHasLockscreenWallpaperChanged", e);
+                if (e instanceof DeadObjectException) {
+                    mKeyguardStateCallbacks.remove(i);
+                }
+            }
+        }
+    }
+
     public void addStateMonitorCallback(IKeyguardStateCallback callback) {
         synchronized (this) {
             mKeyguardStateCallbacks.add(callback);
@@ -2023,6 +2041,7 @@
                 callback.onInputRestrictedStateChanged(mInputRestricted);
                 callback.onTrustedChanged(mUpdateMonitor.getUserHasTrust(
                         KeyguardUpdateMonitor.getCurrentUser()));
+                callback.onHasLockscreenWallpaperChanged(mUpdateMonitor.hasLockscreenWallpaper());
             } catch (RemoteException e) {
                 Slog.w(TAG, "Failed to call to IKeyguardStateCallback", e);
             }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
index ed8a7e7..2be47e4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
@@ -38,6 +38,8 @@
 import android.os.UserHandle;
 import android.util.Log;
 
+import com.android.keyguard.KeyguardUpdateMonitor;
+
 import libcore.io.IoUtils;
 
 import java.util.Objects;
@@ -52,6 +54,7 @@
     private final PhoneStatusBar mBar;
     private final WallpaperManager mWallpaperManager;
     private final Handler mH;
+    private final KeyguardUpdateMonitor mUpdateMonitor;
 
     private boolean mCached;
     private Bitmap mCache;
@@ -66,6 +69,7 @@
         mH = h;
         mWallpaperManager = (WallpaperManager) ctx.getSystemService(Context.WALLPAPER_SERVICE);
         mCurrentUserId = ActivityManager.getCurrentUser();
+        mUpdateMonitor = KeyguardUpdateMonitor.getInstance(ctx);
 
         IWallpaperManager service = IWallpaperManager.Stub.asInterface(
                 ServiceManager.getService(Context.WALLPAPER_SERVICE));
@@ -89,6 +93,7 @@
         LoaderResult result = loadBitmap(mCurrentUserId, mSelectedUser);
         if (result.success) {
             mCached = true;
+            mUpdateMonitor.setHasLockscreenWallpaper(result.bitmap != null);
             mCache = result.bitmap;
         }
         return mCache;
@@ -181,6 +186,7 @@
                 if (result.success) {
                     mCached = true;
                     mCache = result.bitmap;
+                    mUpdateMonitor.setHasLockscreenWallpaper(result.bitmap != null);
                     mBar.updateMediaMetaData(
                             true /* metaDataChanged */, true /* allowEnterAnimation */);
                 }
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 65af958..695ea60 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -279,6 +279,31 @@
             }
 
             @Override
+            public void onPackageUpdateFinished(String packageName, int uid) {
+                // Unbind all services from this package, and then update the user state to
+                // re-bind new versions of them.
+                synchronized (mLock) {
+                    final int userId = getChangingUserId();
+                    if (userId != mCurrentUserId) {
+                        return;
+                    }
+                    UserState userState = getUserStateLocked(userId);
+                    boolean unboundAService = false;
+                    for (int i = userState.mBoundServices.size() - 1; i >= 0; i--) {
+                        Service boundService = userState.mBoundServices.get(i);
+                        String servicePkg = boundService.mComponentName.getPackageName();
+                        if (servicePkg.equals(packageName)) {
+                            boundService.unbindLocked();
+                            unboundAService = true;
+                        }
+                    }
+                    if (unboundAService) {
+                        onUserStateChangedLocked(userState);
+                    }
+                }
+            }
+
+            @Override
             public void onPackageRemoved(String packageName, int uid) {
                 synchronized (mLock) {
                     final int userId = getChangingUserId();
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 2de09a3..a91e205 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -1222,6 +1222,9 @@
             long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
             throws RemoteException {
        checkPasswordReadPermission(userId);
+       if (TextUtils.isEmpty(pattern)) {
+           throw new IllegalArgumentException("Pattern can't be null or empty");
+       }
        CredentialHash storedHash = mStorage.readPatternHash(userId);
        return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId,
                progressCallback);
@@ -1323,6 +1326,9 @@
             long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
             throws RemoteException {
        checkPasswordReadPermission(userId);
+       if (TextUtils.isEmpty(password)) {
+           throw new IllegalArgumentException("Password can't be null or empty");
+       }
        CredentialHash storedHash = mStorage.readPasswordHash(userId);
        return doVerifyPassword(password, storedHash, hasChallenge, challenge, userId,
                progressCallback);
diff --git a/services/core/java/com/android/server/pm/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
index 87f0581..cec1058 100644
--- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java
+++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
@@ -28,10 +28,13 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.BatteryManager;
+import android.os.Environment;
 import android.os.ServiceManager;
+import android.os.storage.StorageManager;
 import android.util.ArraySet;
 import android.util.Log;
 
+import java.io.File;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.TimeUnit;
 
@@ -66,6 +69,8 @@
      */
     final AtomicBoolean mExitPostBootUpdate = new AtomicBoolean(false);
 
+    private final File dataDir = Environment.getDataDirectory();
+
     public static void schedule(Context context) {
         JobScheduler js = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
 
@@ -113,6 +118,16 @@
         return (100 * level / scale);
     }
 
+    private long getLowStorageThreshold() {
+        @SuppressWarnings("deprecation")
+        final long lowThreshold = StorageManager.from(this).getStorageLowBytes(dataDir);
+        if (lowThreshold == 0) {
+            Log.e(TAG, "Invalid low storage threshold");
+        }
+
+        return lowThreshold;
+    }
+
     private boolean runPostBootUpdate(final JobParameters jobParams,
             final PackageManagerService pm, final ArraySet<String> pkgs) {
         if (mExitPostBootUpdate.get()) {
@@ -124,6 +139,8 @@
         final int lowBatteryThreshold = getResources().getInteger(
                 com.android.internal.R.integer.config_lowBatteryWarningLevel);
 
+        final long lowThreshold = getLowStorageThreshold();
+
         mAbortPostBootUpdate.set(false);
         new Thread("BackgroundDexOptService_PostBootUpdate") {
             @Override
@@ -141,6 +158,14 @@
                         // Rather bail than completely drain the battery.
                         break;
                     }
+                    long usableSpace = dataDir.getUsableSpace();
+                    if (usableSpace < lowThreshold) {
+                        // Rather bail than completely fill up the disk.
+                        Log.w(TAG, "Aborting background dex opt job due to low storage: " +
+                                usableSpace);
+                        break;
+                    }
+
                     if (DEBUG_DEXOPT) {
                         Log.i(TAG, "Updating package " + pkg);
                     }
@@ -171,6 +196,9 @@
         mExitPostBootUpdate.set(true);
 
         mAbortIdleOptimization.set(false);
+
+        final long lowThreshold = getLowStorageThreshold();
+
         new Thread("BackgroundDexOptService_IdleOptimization") {
             @Override
             public void run() {
@@ -183,6 +211,15 @@
                         // Skip previously failing package
                         continue;
                     }
+
+                    long usableSpace = dataDir.getUsableSpace();
+                    if (usableSpace < lowThreshold) {
+                        // Rather bail than completely fill up the disk.
+                        Log.w(TAG, "Aborting background dex opt job due to low storage: " +
+                                usableSpace);
+                        break;
+                    }
+
                     // Conservatively add package to the list of failing ones in case performDexOpt
                     // never returns.
                     synchronized (sFailedPackageNames) {
@@ -213,6 +250,9 @@
             Log.i(TAG, "onStartJob");
         }
 
+        // NOTE: PackageManagerService.isStorageLow uses a different set of criteria from
+        // the checks above. This check is not "live" - the value is determined by a background
+        // restart with a period of ~1 minute.
         PackageManagerService pm = (PackageManagerService)ServiceManager.getService("package");
         if (pm.isStorageLow()) {
             if (DEBUG_DEXOPT) {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 6295630..8da3a7d 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5320,6 +5320,9 @@
             mKeyguardOccluded = false;
             mKeyguardDelegate.setOccluded(false);
             mStatusBar.getAttrs().privateFlags |= PRIVATE_FLAG_KEYGUARD;
+            if (!mKeyguardDelegate.hasLockscreenWallpaper()) {
+                mStatusBar.getAttrs().flags |= FLAG_SHOW_WALLPAPER;
+            }
             return true;
         } else if (!wasOccluded && isOccluded && showing) {
             mKeyguardOccluded = true;
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index d3c592d..4fce49e 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -206,6 +206,13 @@
         return false;
     }
 
+    public boolean hasLockscreenWallpaper() {
+        if (mKeyguardService != null) {
+            return mKeyguardService.hasLockscreenWallpaper();
+        }
+        return false;
+    }
+
     public boolean isInputRestricted() {
         if (mKeyguardService != null) {
             mKeyguardState.inputRestricted = mKeyguardService.isInputRestricted();
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
index bea3167..55652fe 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java
@@ -238,6 +238,10 @@
         return mKeyguardStateMonitor.isTrusted();
     }
 
+    public boolean hasLockscreenWallpaper() {
+        return mKeyguardStateMonitor.hasLockscreenWallpaper();
+    }
+
     public boolean isSecure(int userId) {
         return mKeyguardStateMonitor.isSecure(userId);
     }
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
index f3238c8..08eaaa9 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
@@ -44,6 +44,7 @@
     private volatile boolean mSimSecure = true;
     private volatile boolean mInputRestricted = true;
     private volatile boolean mTrusted = false;
+    private volatile boolean mHasLockscreenWallpaper = false;
 
     private int mCurrentUserId;
 
@@ -75,6 +76,10 @@
         return mTrusted;
     }
 
+    public boolean hasLockscreenWallpaper() {
+        return mHasLockscreenWallpaper;
+    }
+
     @Override // Binder interface
     public void onShowingStateChanged(boolean showing) {
         mIsShowing = showing;
@@ -103,6 +108,11 @@
         mTrusted = trusted;
     }
 
+    @Override // Binder interface
+    public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) {
+        mHasLockscreenWallpaper = hasLockscreenWallpaper;
+    }
+
     public void dump(String prefix, PrintWriter pw) {
         pw.println(prefix + TAG);
         prefix += "  ";
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java b/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
index 9ccb1a6..0bd014c 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppIdleHistoryTests.java
@@ -67,7 +67,7 @@
         // Screen on time should not keep progressing with screen is off
         assertEquals(aih.getScreenOnTimeLocked(7000), 3000);
         assertEquals(aih.getScreenOnTimeLocked(8000), 3000);
-        aih.writeElapsedTimeLocked();
+        aih.writeAppIdleDurationsLocked();
 
         // Check if the screen on time is persisted across instantiations
         AppIdleHistory aih2 = new AppIdleHistory(mStorageDir, 0);
diff --git a/services/usage/java/com/android/server/usage/AppIdleHistory.java b/services/usage/java/com/android/server/usage/AppIdleHistory.java
index a3313c9..f69dae4 100644
--- a/services/usage/java/com/android/server/usage/AppIdleHistory.java
+++ b/services/usage/java/com/android/server/usage/AppIdleHistory.java
@@ -118,7 +118,6 @@
         } else {
             mScreenOnDuration += elapsedRealtime - mScreenOnSnapshot;
             mElapsedDuration += elapsedRealtime - mElapsedSnapshot;
-            writeScreenOnTimeLocked();
             mElapsedSnapshot = elapsedRealtime;
         }
     }
@@ -167,7 +166,7 @@
     /**
      * To be called periodically to keep track of elapsed time when app idle times are written
      */
-    public void writeElapsedTimeLocked() {
+    public void writeAppIdleDurationsLocked() {
         final long elapsedRealtime = SystemClock.elapsedRealtime();
         // Only bump up and snapshot the elapsed time. Don't change screen on duration.
         mElapsedDuration += elapsedRealtime - mElapsedSnapshot;
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 69cf1a2..8284773 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -304,9 +304,9 @@
 
         @Override public void onDisplayChanged(int displayId) {
             if (displayId == Display.DEFAULT_DISPLAY) {
+                final boolean displayOn = isDisplayOn();
                 synchronized (UsageStatsService.this.mLock) {
-                    mAppIdleHistory.updateDisplayLocked(isDisplayOn(),
-                            SystemClock.elapsedRealtime());
+                    mAppIdleHistory.updateDisplayLocked(displayOn, SystemClock.elapsedRealtime());
                 }
             }
         }
@@ -1005,9 +1005,9 @@
             service.persistActiveStats();
             mAppIdleHistory.writeAppIdleTimesLocked(mUserState.keyAt(i));
         }
-        // Persist elapsed time periodically, in case screen doesn't get toggled
-        // until the next boot
-        mAppIdleHistory.writeElapsedTimeLocked();
+        // Persist elapsed and screen on time. If this fails for whatever reason, the apps will be
+        // considered not-idle, which is the safest outcome in such an event.
+        mAppIdleHistory.writeAppIdleDurationsLocked();
         mHandler.removeMessages(MSG_FLUSH_TO_DISK);
     }
 
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 69b9fbfb..dc9767c 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -246,6 +246,21 @@
     public static final String KEY_CARRIER_VT_AVAILABLE_BOOL = "carrier_vt_available_bool";
 
     /**
+     * Flag specifying whether the carrier wants to notify the user when a VT call has been handed
+     * over from WIFI to LTE.
+     * <p>
+     * The handover notification is sent as a
+     * {@link TelephonyManager#EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE}
+     * {@link android.telecom.Connection} event, which an {@link android.telecom.InCallService}
+     * should use to trigger the display of a user-facing message.
+     * <p>
+     * The Connection event is sent to the InCallService only once, the first time it occurs.
+     * @hide
+     */
+    public static final String KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL =
+            "notify_handover_video_from_wifi_to_lte_bool";
+
+    /**
      * Flag specifying whether the carrier supports downgrading a video call (tx, rx or tx/rx)
      * directly to an audio call.
      * @hide
@@ -944,6 +959,7 @@
         sDefaults.putBoolean(KEY_CARRIER_SETTINGS_ENABLE_BOOL, false);
         sDefaults.putBoolean(KEY_CARRIER_VOLTE_AVAILABLE_BOOL, false);
         sDefaults.putBoolean(KEY_CARRIER_VT_AVAILABLE_BOOL, false);
+        sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL, false);
         sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true);
         sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false);
         sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false);
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 013efe7..6e504d1 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -705,6 +705,17 @@
             "android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT";
 
     /**
+     * {@link android.telecom.Connection} event used to indicate that an IMS call has be
+     * successfully handed over from WIFI to LTE.
+     * <p>
+     * Sent via {@link android.telecom.Connection#sendConnectionEvent(String, Bundle)}.
+     * The {@link Bundle} parameter is expected to be null when this connection event is used.
+     * @hide
+     */
+    public static final String EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE =
+            "android.telephony.event.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE";
+
+    /**
      * {@link android.telecom.Connection} event used to indicate that an IMS call failed to be
      * handed over from LTE to WIFI.
      * <p>
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 4d5bb31..9cae00f 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -4860,24 +4860,39 @@
         const Vector<sp<Type> >& types = mOrderedPackages[p]->getOrderedTypes();
         const size_t typeCount = types.size();
         for (size_t t = 0; t < typeCount; t++) {
-            const Vector<sp<ConfigList> >& configs = types[t]->getOrderedConfigs();
+            const sp<Type>& type = types[t];
+            if (type == NULL) {
+                continue;
+            }
+
+            const Vector<sp<ConfigList> >& configs = type->getOrderedConfigs();
             const size_t configCount = configs.size();
             for (size_t c = 0; c < configCount; c++) {
+                const sp<ConfigList>& configList = configs[c];
+                if (configList == NULL) {
+                    continue;
+                }
+
                 const DefaultKeyedVector<ConfigDescription, sp<Entry> >& configEntries
-                        = configs[c]->getEntries();
+                        = configList->getEntries();
                 const size_t configEntryCount = configEntries.size();
                 for (size_t ce = 0; ce < configEntryCount; ce++) {
+                    const sp<Entry>& entry = configEntries.valueAt(ce);
+                    if (entry == NULL) {
+                        continue;
+                    }
+
                     const ConfigDescription& config = configEntries.keyAt(ce);
                     if (AaptConfig::isDensityOnly(config)) {
                         // This configuration only varies with regards to density.
                         const Symbol symbol(
                                 mOrderedPackages[p]->getName(),
-                                types[t]->getName(),
-                                configs[c]->getName(),
+                                type->getName(),
+                                configList->getName(),
                                 getResId(mOrderedPackages[p], types[t],
-                                         configs[c]->getEntryIndex()));
+                                         configList->getEntryIndex()));
 
-                        const sp<Entry>& entry = configEntries.valueAt(ce);
+
                         AaptUtil::appendValue(resources, symbol,
                                               SymbolDefinition(symbol, config, entry->getPos()));
                     }