Merge "Don't unload the sound model on stopRecognition" into lmp-mr1-dev
diff --git a/Android.mk b/Android.mk
index ed85df0..d5d04ea 100644
--- a/Android.mk
+++ b/Android.mk
@@ -739,7 +739,8 @@
                  -samplegroup Testing \
                  -samplegroup UI \
                  -samplegroup Views \
-                 -samplegroup Wearable
+                 -samplegroup Wearable \
+                 -samplegroup Notification
 
 ## SDK version identifiers used in the published docs
   # major[.minor] version for current SDK. (full releases only)
diff --git a/core/jni/android_hardware_camera2_DngCreator.cpp b/core/jni/android_hardware_camera2_DngCreator.cpp
index 31c7b9f..533313a 100644
--- a/core/jni/android_hardware_camera2_DngCreator.cpp
+++ b/core/jni/android_hardware_camera2_DngCreator.cpp
@@ -1278,7 +1278,7 @@
             }
 
             BAIL_IF_INVALID(writer->addEntry(TAG_CAMERACALIBRATION2, entry2.count,
-                    calibrationTransform1, TIFF_IFD_0),  env, TAG_CAMERACALIBRATION2, writer);
+                    calibrationTransform2, TIFF_IFD_0),  env, TAG_CAMERACALIBRATION2, writer);
         }
     }
 
diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index 2f8c407..3dec216 100644
--- a/docs/html/guide/components/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
@@ -139,7 +139,9 @@
 intent when starting a {@link android.app.Service} and do not
 declare intent filters for your services. Using an implicit intent to start a service is a
 security hazard because you cannot be certain what service will respond to the intent,
-and the user cannot see which service starts.</p>
+and the user cannot see which service starts. Beginning with Android 5.0 (API level 21), the system
+throws an exception if you call {@link android.content.Context#bindService bindService()}
+with an implicit intent.</p>
 
 
 
@@ -424,18 +426,18 @@
 android.app.Activity#startActivity startActivity()}. For example:</p>
 
 <pre>
-Intent intent = new Intent(Intent.ACTION_SEND);
+Intent sendIntent = new Intent(Intent.ACTION_SEND);
 ...
 
 // Always use string resources for UI text.
 // This says something like "Share this photo with"
 String title = getResources().getString(R.string.chooser_title);
-// Create intent to show chooser
-Intent chooser = Intent.createChooser(intent, title);
+// Create intent to show the chooser dialog
+Intent chooser = Intent.createChooser(sendIntent, title);
 
-// Verify the intent will resolve to at least one activity
+// Verify the original intent will resolve to at least one activity
 if (sendIntent.resolveActivity(getPackageManager()) != null) {
-    startActivity(sendIntent);
+    startActivity(chooser);
 }
 </pre>
 
diff --git a/docs/html/samples/notification.jd b/docs/html/samples/notification.jd
new file mode 100644
index 0000000..bbcea93
--- /dev/null
+++ b/docs/html/samples/notification.jd
@@ -0,0 +1,11 @@
+page.title=Notification
+@jd:body
+
+
+<div id="samples" class="notification">
+</div>
+
+
+<script>
+  $(document).ready(showSamples);
+</script>
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 5deb1cd..345e8af 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -333,10 +333,11 @@
                             + " hidden=" + win.mRootToken.hidden
                             + " anim=" + win.mWinAnimator.mAnimation);
                 } else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
-                    final boolean hideWhenLocked = !((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) ||
-                            (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken ||
-                                    // Show error dialogs over apps that dismiss keyguard.
-                                    (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
+                    final boolean hideWhenLocked =
+                            !(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard)
+                            || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken ||
+                            // Show error dialogs over apps that dismiss keyguard.
+                            (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
                     if (((mForceHiding == KEYGUARD_ANIMATING_IN)
                                 && (!winAnimator.isAnimating() || hideWhenLocked))
                             || ((mForceHiding == KEYGUARD_SHOWN) && hideWhenLocked)) {