Merge "Ensure we correctly unblank displays when added." into lmp-dev
diff --git a/Android.mk b/Android.mk
index b323650..7fa0e87 100644
--- a/Android.mk
+++ b/Android.mk
@@ -631,6 +631,7 @@
     -since $(SRC_API_DIR)/18.txt 18 \
     -since $(SRC_API_DIR)/19.txt 19 \
     -since $(SRC_API_DIR)/20.txt 20 \
+    -since $(SRC_API_DIR)/21.txt 21 \
 		-werror -hide 111 -hide 113 \
 		-overview $(LOCAL_PATH)/core/java/overview.html
 
diff --git a/api/current.txt b/api/current.txt
index 17c9dcc..09497a5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5587,7 +5587,6 @@
     method public int describeContents();
     method public boolean getNextEvent(android.app.usage.UsageEvents.Event);
     method public boolean hasNextEvent();
-    method public void resetToStart();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
   }
@@ -21400,6 +21399,7 @@
     field public static final int KITKAT = 19; // 0x13
     field public static final int KITKAT_WATCH = 20; // 0x14
     field public static final int L = 21; // 0x15
+    field public static final int LOLLIPOP = 21; // 0x15
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
diff --git a/cmds/bootanimation/AudioPlayer.cpp b/cmds/bootanimation/AudioPlayer.cpp
index a2ee7ea..471b77f 100644
--- a/cmds/bootanimation/AudioPlayer.cpp
+++ b/cmds/bootanimation/AudioPlayer.cpp
@@ -272,6 +272,9 @@
     config.rate = chunkFmt->sample_rate;
     config.period_size = mPeriodSize;
     config.period_count = mPeriodCount;
+    config.start_threshold = mPeriodSize / 4;
+    config.stop_threshold = INT_MAX;
+    config.avail_min = config.start_threshold;
     if (chunkFmt->bits_per_sample != 16) {
         ALOGE("only 16 bit WAV files are supported");
         goto exit;
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 84a7f5d..2cd7379 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -930,7 +930,7 @@
      * same time, assumptions made about the meaning of the data here for
      * purposes of control flow will be incorrect.</p>
      *
-     * @deprecated As of {@link android.os.Build.VERSION_CODES#L}, this method is
+     * @deprecated As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method is
      * no longer available to third party applications: the introduction of
      * document-centric recents means
      * it can leak personal information to the caller.  For backwards compatibility,
@@ -1216,7 +1216,7 @@
      * same time, assumptions made about the meaning of the data here for
      * purposes of control flow will be incorrect.</p>
      *
-     * @deprecated As of {@link android.os.Build.VERSION_CODES#L}, this method
+     * @deprecated As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method
      * is no longer available to third party
      * applications: the introduction of document-centric recents means
      * it can leak person information to the caller.  For backwards compatibility,
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index e9340eb..7fafc38 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -148,7 +148,6 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.app.IAppOpsService;
 import com.android.internal.os.IDropBoxManagerService;
-import com.android.internal.telecom.ITelecomService;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -1671,7 +1670,7 @@
 
     private void validateServiceIntent(Intent service) {
         if (service.getComponent() == null && service.getPackage() == null) {
-            if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.L) {
+            if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
                 IllegalArgumentException ex = new IllegalArgumentException(
                         "Service Intent must be explicit: " + service);
                 throw ex;
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 5196834..af45731 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -1125,7 +1125,7 @@
      */
     public LayoutInflater getLayoutInflater(Bundle savedInstanceState) {
         // Newer platform versions use the child fragment manager's LayoutInflaterFactory.
-        if (mActivity.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.L) {
+        if (mActivity.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
             LayoutInflater result = mActivity.getLayoutInflater().cloneInContext(mActivity);
             getChildFragmentManager(); // Init if needed; use raw implementation below.
             result.setPrivateFactory(mChildFragmentManager.getLayoutInflaterFactory());
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 4b3aefe..fb10e17 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1948,7 +1948,7 @@
             mPriority = PRIORITY_DEFAULT;
             mPeople = new ArrayList<String>();
 
-            mColorUtil = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.L ?
+            mColorUtil = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.LOLLIPOP ?
                     NotificationColorUtil.getInstance(mContext) : null;
         }
 
diff --git a/core/java/android/app/backup/WallpaperBackupHelper.java b/core/java/android/app/backup/WallpaperBackupHelper.java
index 68ea9e9..75a5237 100644
--- a/core/java/android/app/backup/WallpaperBackupHelper.java
+++ b/core/java/android/app/backup/WallpaperBackupHelper.java
@@ -42,7 +42,7 @@
     // If 'true', then apply an acceptable-size heuristic at restore time, dropping back
     // to the factory default wallpaper if the restored one differs "too much" from the
     // device's preferred wallpaper image dimensions.
-    private static final boolean REJECT_OUTSIZED_RESTORE = false;
+    private static final boolean REJECT_OUTSIZED_RESTORE = true;
 
     // This path must match what the WallpaperManagerService uses
     // TODO: Will need to change if backing up non-primary user's wallpaper
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index 1a947ec..3cf3c95 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -15,7 +15,6 @@
  */
 package android.app.usage;
 
-import android.content.ComponentName;
 import android.content.res.Configuration;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -95,14 +94,6 @@
         public Configuration mConfiguration;
 
         /**
-         * TODO(adamlesinski): Removed before release.
-         * {@hide}
-         */
-        public ComponentName getComponent() {
-            return new ComponentName(mPackage, mClass);
-        }
-
-        /**
          * The package name of the source of this event.
          */
         public String getPackageName() {
@@ -233,6 +224,9 @@
 
     /**
      * Resets the collection so that it can be iterated over from the beginning.
+     *
+     * @hide When this object is iterated to completion, the parcel is destroyed and
+     * so resetToStart doesn't work.
      */
     public void resetToStart() {
         mIndex = 0;
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 4e2aca0..c9b7d0a 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3065,11 +3065,11 @@
      * "content://foo".  It will not remove any prefix grants that exist at a
      * higher level.
      *
-     * <p>Prior to {@link android.os.Build.VERSION_CODES#L}, if you did not have
+     * <p>Prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, if you did not have
      * regular permission access to a Uri, but had received access to it through
      * a specific Uri permission grant, you could not revoke that grant with this
      * function and a {@link SecurityException} would be thrown.  As of
-     * {@link android.os.Build.VERSION_CODES#L}, this function will not throw a security exception,
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this function will not throw a security exception,
      * but will remove whatever permission grants to the Uri had been given to the app
      * (or none).</p>
      *
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 77981f4..af6f181 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2226,7 +2226,7 @@
      * Same as {@link android.media.AudioManager#ACTION_HEADSET_PLUG}, to be consulted for value
      *   and documentation.
      * <p>If the minimum SDK version of your application is
-     * {@link android.os.Build.VERSION_CODES#L}, it is recommended to refer
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP}, it is recommended to refer
      * to the <code>AudioManager</code> constant in your receiver registration code instead.
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 548a0c9..e07edba 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -683,6 +683,8 @@
         requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
         compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
         largestWidthLimitDp = orig.largestWidthLimitDp;
+        scanSourceDir = orig.scanSourceDir;
+        scanPublicSourceDir = orig.scanPublicSourceDir;
         sourceDir = orig.sourceDir;
         publicSourceDir = orig.publicSourceDir;
         splitSourceDirs = orig.splitSourceDirs;
@@ -731,6 +733,8 @@
         dest.writeInt(requiresSmallestWidthDp);
         dest.writeInt(compatibleWidthLimitDp);
         dest.writeInt(largestWidthLimitDp);
+        dest.writeString(scanSourceDir);
+        dest.writeString(scanPublicSourceDir);
         dest.writeString(sourceDir);
         dest.writeString(publicSourceDir);
         dest.writeStringArray(splitSourceDirs);
@@ -778,6 +782,8 @@
         requiresSmallestWidthDp = source.readInt();
         compatibleWidthLimitDp = source.readInt();
         largestWidthLimitDp = source.readInt();
+        scanSourceDir = source.readString();
+        scanPublicSourceDir = source.readString();
         sourceDir = source.readString();
         publicSourceDir = source.readString();
         splitSourceDirs = source.readStringArray();
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 55ca486..fb3eaff 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -310,14 +310,18 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
-
     /**
-     * <p>The set of aberration correction modes supported by this camera device.</p>
-     * <p>This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}.
-     * If no aberration correction modes are available for a device, this list will solely include
+     * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
+     * supported by this camera device.</p>
+     * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}.  If no
+     * aberration correction modes are available for a device, this list will solely include
      * OFF mode.</p>
-     * <p>For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL), OFF must be
-     * included.</p>
+     * <p>For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL), OFF is
+     * always included.</p>
+     * <p>LEGACY devices will always only support FAST mode.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
@@ -327,30 +331,42 @@
             new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
 
     /**
-     * <p>The set of auto-exposure antibanding modes that are
+     * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are
      * supported by this camera device.</p>
      * <p>Not all of the auto-exposure anti-banding modes may be
      * supported by a given camera device. This field lists the
      * valid anti-banding modes that the application may request
-     * for this camera device; they must include AUTO.</p>
+     * for this camera device with the
+     * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control. This list
+     * always includes AUTO.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      */
     @PublicKey
     public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
             new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
 
     /**
-     * <p>The set of auto-exposure modes that are supported by this
-     * camera device.</p>
+     * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
+     * device.</p>
      * <p>Not all the auto-exposure modes may be supported by a
      * given camera device, especially if no flash unit is
      * available. This entry lists the valid modes for
      * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
-     * <p>All camera devices support ON, and all camera devices with
-     * flash units support ON_AUTO_FLASH and
-     * ON_ALWAYS_FLASH.</p>
+     * <p>All camera devices support ON, and all camera devices with flash
+     * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
      * <p>FULL mode camera devices always support OFF mode,
      * which enables application control of camera exposure time,
      * sensitivity, and frame duration.</p>
+     * <p>LEGACY mode camera devices never support OFF mode.
+     * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
+     * capability.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      */
@@ -359,43 +375,70 @@
             new Key<int[]>("android.control.aeAvailableModes", int[].class);
 
     /**
-     * <p>List of frame rate ranges supported by the
-     * auto-exposure (AE) algorithm/hardware</p>
+     * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
+     * this camera device.</p>
+     * <p>For devices at the LIMITED level or above, this list will include at least (30, 30) for
+     * constant-framerate recording.</p>
+     * <p><b>Units</b>: Frames per second (FPS)</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
      */
     @PublicKey
     public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
             new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
 
     /**
-     * <p>Maximum and minimum exposure compensation
-     * setting, in counts of
-     * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}.</p>
+     * <p>Maximum and minimum exposure compensation values for
+     * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
+     * that are supported by this camera device.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
+     * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &gt;= 2 EV</code></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
+     * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
      */
     @PublicKey
     public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
             new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
 
     /**
-     * <p>Smallest step by which exposure compensation
-     * can be changed</p>
+     * <p>Smallest step by which the exposure compensation
+     * can be changed.</p>
+     * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
+     * a value of <code>1/2</code>, then a setting of <code>-2</code> for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} means
+     * that the target EV offset for the auto-exposure routine is -1 EV.</p>
+     * <p>One unit of EV compensation changes the brightness of the captured image by a factor
+     * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
+     * <p><b>Units</b>: Exposure Value (EV)</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
      */
     @PublicKey
     public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
             new Key<Rational>("android.control.aeCompensationStep", Rational.class);
 
     /**
-     * <p>List of auto-focus (AF) modes that can be
-     * selected with {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
+     * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
+     * supported by this camera device.</p>
      * <p>Not all the auto-focus modes may be supported by a
      * given camera device. This entry lists the valid modes for
      * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
      * camera devices with adjustable focuser units
      * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>) will support AUTO mode.</p>
+     * <p>LEGACY devices will support OFF mode only if they support
+     * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
+     * <code>0.0f</code>).</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AF_MODE
+     * @see CaptureRequest#LENS_FOCUS_DISTANCE
      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
      */
     @PublicKey
@@ -403,17 +446,20 @@
             new Key<int[]>("android.control.afAvailableModes", int[].class);
 
     /**
-     * <p>List containing the subset of color effects
-     * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by
-     * this device.</p>
+     * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
+     * device.</p>
      * <p>This list contains the color effect modes that can be applied to
-     * images produced by the camera device. Only modes that have
-     * been fully implemented for the current device may be included here.
+     * images produced by the camera device.
      * Implementations are not expected to be consistent across all devices.
-     * If no color effect modes are available for a device, this should
-     * simply be set to OFF.</p>
+     * If no color effect modes are available for a device, this will only list
+     * OFF.</p>
      * <p>A color effect will only be applied if
-     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
+     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.  OFF is always included in this list.</p>
+     * <p>This control has no effect on the operation of other control routines such
+     * as auto-exposure, white balance, or focus.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_EFFECT_MODE
      * @see CaptureRequest#CONTROL_MODE
@@ -423,38 +469,56 @@
             new Key<int[]>("android.control.availableEffects", int[].class);
 
     /**
-     * <p>List containing a subset of scene modes
-     * specified in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}.</p>
+     * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
+     * device.</p>
      * <p>This list contains scene modes that can be set for the camera device.
      * Only scene modes that have been fully implemented for the
      * camera device may be included here. Implementations are not expected
-     * to be consistent across all devices. If no scene modes are supported
-     * by the camera device, this will be set to <code>[DISABLED]</code>.</p>
+     * to be consistent across all devices.</p>
+     * <p>If no scene modes are supported by the camera device, this
+     * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
+     * <p>FACE_PRIORITY is always listed if face detection is
+     * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
+     * 0</code>).</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_SCENE_MODE
+     * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
      */
     @PublicKey
     public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
             new Key<int[]>("android.control.availableSceneModes", int[].class);
 
     /**
-     * <p>List of video stabilization modes that can
-     * be supported</p>
+     * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
+     * that are supported by this camera device.</p>
+     * <p>OFF will always be listed.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
      */
     @PublicKey
     public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
             new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
 
     /**
-     * <p>The set of auto-white-balance modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})
-     * that are supported by this camera device.</p>
+     * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
+     * camera device.</p>
      * <p>Not all the auto-white-balance modes may be supported by a
      * given camera device. This entry lists the valid modes for
      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
      * <p>All camera devices will support ON mode.</p>
-     * <p>FULL mode camera devices will always support OFF mode,
-     * which enables application control of white balance, by using
-     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX).</p>
+     * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
+     * mode, which enables application control of white balance, by using
+     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX). This includes all FULL
+     * mode camera devices.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_MODE
@@ -471,6 +535,11 @@
      * this corresponds to the the maximum number of elements in
      * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
      * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>Value must be &gt;= 0 for each element. For full-capability devices
+     * this value must be &gt;= 1 for AE and AF. The order of the elements is:
+     * <code>(AE, AWB, AF)</code>.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_REGIONS
      * @see CaptureRequest#CONTROL_AF_REGIONS
@@ -481,10 +550,14 @@
             new Key<int[]>("android.control.maxRegions", int[].class);
 
     /**
-     * <p>List of the maximum number of regions that can be used for metering in
-     * auto-exposure (AE);
-     * this corresponds to the the maximum number of elements in
+     * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
+     * routine.</p>
+     * <p>This corresponds to the the maximum allowed number of elements in
      * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Value will be &gt;= 0. For FULL-capability devices, this
+     * value will be &gt;= 1.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_REGIONS
      */
@@ -494,10 +567,13 @@
             new Key<Integer>("android.control.maxRegionsAe", int.class);
 
     /**
-     * <p>List of the maximum number of regions that can be used for metering in
-     * auto-white balance (AWB);
-     * this corresponds to the the maximum number of elements in
+     * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
+     * routine.</p>
+     * <p>This corresponds to the the maximum allowed number of elements in
      * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Value will be &gt;= 0.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AWB_REGIONS
      */
@@ -507,10 +583,13 @@
             new Key<Integer>("android.control.maxRegionsAwb", int.class);
 
     /**
-     * <p>List of the maximum number of regions that can be used for metering in
-     * auto-focus (AF);
-     * this corresponds to the the maximum number of elements in
+     * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
+     * <p>This corresponds to the the maximum allowed number of elements in
      * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Value will be &gt;= 0. For FULL-capability devices, this
+     * value will be &gt;= 1.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AF_REGIONS
      */
@@ -541,20 +620,34 @@
      * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges
      * reported in this metadata must not be used to setup capture requests, or it will cause
      * request error.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>For each configuration, the fps_max &gt;= 60fps.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
      * @see CaptureRequest#CONTROL_SCENE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
             new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
 
     /**
-     * <p>The set of edge enhancement modes supported by this camera device.</p>
-     * <p>This tag lists the valid modes for {@link CaptureRequest#EDGE_MODE android.edge.mode}.</p>
-     * <p>Full-capability camera devices must always support OFF and FAST.</p>
+     * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
+     * device.</p>
+     * <p>Full-capability camera devices must always support OFF; all devices will list FAST.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#EDGE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
@@ -562,19 +655,23 @@
 
     /**
      * <p>Whether this camera device has a
-     * flash.</p>
-     * <p>If no flash, none of the flash controls do
-     * anything. All other metadata should return 0.</p>
+     * flash unit.</p>
+     * <p>Will be <code>false</code> if no flash is available.</p>
+     * <p>If there is no flash unit, none of the flash controls do
+     * anything.
+     * This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Boolean> FLASH_INFO_AVAILABLE =
             new Key<Boolean>("android.flash.info.available", boolean.class);
 
     /**
-     * <p>The set of hot pixel correction modes that are supported by this
+     * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this
      * camera device.</p>
-     * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p>
      * <p>FULL mode camera devices will always support FAST.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CaptureRequest#HOT_PIXEL_MODE
      */
@@ -583,7 +680,10 @@
             new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
 
     /**
-     * <p>Supported resolutions for the JPEG thumbnail.</p>
+     * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
+     * camera device.</p>
+     * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
+     * thumbnail should be generated.</p>
      * <p>Below condiditions will be satisfied for this size list:</p>
      * <ul>
      * <li>The sizes will be sorted by increasing pixel area (width x height).
@@ -595,33 +695,51 @@
      * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
      * and vice versa.</li>
-     * <li>All non (0, 0) sizes will have non-zero widths and heights.</li>
+     * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.
+     * This key is available on all devices.</li>
      * </ul>
+     *
+     * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
      */
     @PublicKey
     public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
             new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
 
     /**
-     * <p>List of supported aperture
-     * values.</p>
-     * <p>If the camera device doesn't support variable apertures,
-     * listed value will be the fixed aperture.</p>
-     * <p>If the camera device supports variable apertures, the aperture value
+     * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
+     * supported by this camera device.</p>
+     * <p>If the camera device doesn't support a variable lens aperture,
+     * this list will contain only one value, which is the fixed aperture size.</p>
+     * <p>If the camera device supports a variable aperture, the aperture values
      * in this list will be sorted in ascending order.</p>
+     * <p><b>Units</b>: The aperture f-number</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CaptureRequest#LENS_APERTURE
      */
     @PublicKey
     public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
             new Key<float[]>("android.lens.info.availableApertures", float[].class);
 
     /**
-     * <p>List of supported neutral density filter values for
-     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity}.</p>
-     * <p>If changing {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} is not supported,
-     * availableFilterDensities must contain only 0. Otherwise, this
-     * list contains only the exact filter density values available on
-     * this camera device.</p>
+     * <p>List of neutral density filter values for
+     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
+     * <p>If a neutral density filter is not supported by this camera device,
+     * this list will contain only 0. Otherwise, this list will include every
+     * filter density supported by the camera device, in ascending order.</p>
+     * <p><b>Units</b>: Exposure value (EV)</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>Values are &gt;= 0</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#LENS_FILTER_DENSITY
      */
     @PublicKey
@@ -629,12 +747,16 @@
             new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
 
     /**
-     * <p>The available focal lengths for this device for use with
-     * {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}.</p>
-     * <p>If optical zoom is not supported, this will only report
-     * a single value corresponding to the static focal length of the
-     * device. Otherwise, this will report every focal length supported
-     * by the device.</p>
+     * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
+     * device.</p>
+     * <p>If optical zoom is not supported, this list will only contain
+     * a single value corresponding to the fixed focal length of the
+     * device. Otherwise, this list will include every focal length supported
+     * by the camera device, in ascending order.</p>
+     * <p><b>Units</b>: Millimeters</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>Values are &gt; 0</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#LENS_FOCAL_LENGTH
      */
@@ -643,12 +765,18 @@
             new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
 
     /**
-     * <p>List containing a subset of the optical image
-     * stabilization (OIS) modes specified in
-     * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}.</p>
-     * <p>If OIS is not implemented for a given camera device, this will
+     * <p>List of optical image stabilization (OIS) modes for
+     * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
+     * <p>If OIS is not supported by a given camera device, this list will
      * contain only OFF.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
      */
     @PublicKey
@@ -656,12 +784,21 @@
             new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
 
     /**
-     * <p>Optional. Hyperfocal distance for this lens.</p>
+     * <p>Hyperfocal distance for this lens.</p>
      * <p>If the lens is not fixed focus, the camera device will report this
      * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
+     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
+     * <p><b>Range of valid values:</b><br>
+     * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
+     * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
+     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
      */
     @PublicKey
     public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
@@ -669,10 +806,19 @@
 
     /**
      * <p>Shortest distance from frontmost surface
-     * of the lens that can be focused correctly.</p>
-     * <p>If the lens is fixed-focus, this should be
+     * of the lens that can be brought into sharp focus.</p>
+     * <p>If the lens is fixed-focus, this will be
      * 0.</p>
+     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 0</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
      */
     @PublicKey
     public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
@@ -682,6 +828,14 @@
      * <p>Dimensions of lens shading map.</p>
      * <p>The map should be on the order of 30-40 rows and columns, and
      * must be smaller than 64x64.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Both values &gt;= 1</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
@@ -693,7 +847,27 @@
      * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
      * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
      * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
+     * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
+     * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
+     * and increasing positive numbers represent focusing closer and closer
+     * to the camera device. The focus distance control also uses diopters
+     * on these devices.</p>
+     * <p>UNCALIBRATED devices do not use units that are directly comparable
+     * to any real physical measurement, but <code>0.0f</code> still represents farthest
+     * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
+     * nearest focus the device can achieve.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
+     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
+     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#LENS_FOCUS_DISTANCE
      * @see CaptureResult#LENS_FOCUS_RANGE
      * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
@@ -709,6 +883,12 @@
     /**
      * <p>Direction the camera faces relative to
      * device screen.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LENS_FACING_FRONT FRONT}</li>
+     *   <li>{@link #LENS_FACING_BACK BACK}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      * @see #LENS_FACING_FRONT
      * @see #LENS_FACING_BACK
      */
@@ -717,10 +897,18 @@
             new Key<Integer>("android.lens.facing", int.class);
 
     /**
-     * <p>The set of noise reduction modes supported by this camera device.</p>
-     * <p>This tag lists the valid modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}.</p>
-     * <p>Full-capability camera devices must always support OFF and FAST.</p>
+     * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
+     * by this camera device.</p>
+     * <p>Full-capability camera devices will always support OFF and FAST.</p>
+     * <p>Legacy-capability camera devices will only support FAST mode.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#NOISE_REDUCTION_MODE
      */
     @PublicKey
@@ -765,6 +953,15 @@
      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
      * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li>
      * </ul>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>For processed (and stalling) format streams, &gt;= 1.</p>
+     * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
+     * <p>For processed (but not stalling) format streams, &gt;= 3
+     * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
+     * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
@@ -786,7 +983,13 @@
      * <li>ImageFormat#RAW10</li>
      * <li>Opaque <code>RAW</code></li>
      * </ul>
+     * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
+     * never support raw streams.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>&gt;= 0</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
      */
     @PublicKey
@@ -814,7 +1017,14 @@
      * </ul>
      * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
      * a processed format -- it will return 0 for a non-stalling stream.</p>
+     * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>&gt;= 3
+     * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
+     * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
      */
     @PublicKey
@@ -833,9 +1043,13 @@
      * CPU resources that will consume more power. The image format for this kind of an output stream can
      * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
      * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations &gt; 0.
-     * Typically only the <code>JPEG</code> format (ImageFormat#JPEG)</p>
+     * Typically only the <code>JPEG</code> format (ImageFormat#JPEG) is a stalling format.</p>
      * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
      * a processed format -- it will return a non-0 value for a stalling stream.</p>
+     * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>&gt;= 1</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
      */
@@ -856,6 +1070,14 @@
      * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
      * stream image format will be RAW_OPAQUE, the associated output stream image format
      * should be JPEG.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>0 or 1.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
@@ -876,6 +1098,7 @@
      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
      * X frame intervals.</p>
      * <p>This value will be 8 or less.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureResult#REQUEST_PIPELINE_DEPTH
      */
@@ -898,6 +1121,8 @@
      * then immediately dispatch this state via a partial result to
      * the application, and the rest of the metadata via later
      * partial results.</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 1</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      */
     @PublicKey
@@ -905,7 +1130,7 @@
             new Key<Integer>("android.request.partialResultCount", int.class);
 
     /**
-     * <p>List of capabilities that the camera device
+     * <p>List of capabilities that this camera device
      * advertises as fully supporting.</p>
      * <p>A capability is a contract that the camera device makes in order
      * to be able to satisfy one or more use cases.</p>
@@ -923,7 +1148,15 @@
      * <li>MANUAL_POST_PROCESSING</li>
      * </ul>
      * <p>Other capabilities may be available on either FULL or LIMITED
-     * devices, but the application should query this field to be sure.</p>
+     * devices, but the application should query this key to be sure.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
+     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
+     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
+     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
@@ -945,6 +1178,7 @@
      * at a more granular level than capabilities. This is especially
      * important for optional keys that are not listed under any capability
      * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
      * @hide
@@ -957,18 +1191,19 @@
      * to use with CaptureResult.</p>
      * <p>Attempting to get a key from a CaptureResult that is not
      * listed here will always return a <code>null</code> value. Getting a key from
-     * a CaptureResult that is listed here must never return a <code>null</code>
+     * a CaptureResult that is listed here will generally never return a <code>null</code>
      * value.</p>
      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
      * <ul>
      * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
      * </ul>
-     * <p>(Those sometimes-null keys should nevertheless be listed here
+     * <p>(Those sometimes-null keys will nevertheless be listed here
      * if they are available.)</p>
      * <p>This field can be used to query the feature set of a camera device
      * at a more granular level than capabilities. This is especially
      * important for optional keys that are not listed under any capability
      * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
@@ -984,6 +1219,7 @@
      * android.request.availableResultKeys (except that it applies for
      * CameraCharacteristics instead of CaptureResult). See above for more
      * details.</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
@@ -994,6 +1230,7 @@
      * camera device for output streams.</p>
      * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
      * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
      */
@@ -1010,6 +1247,10 @@
      * <p>When multiple streams are configured, the minimum
      * frame duration will be &gt;= max(individual stream min
      * durations)</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * TODO: Remove property.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
      */
@@ -1021,6 +1262,9 @@
      * <p>The JPEG resolutions that are supported by this camera device.</p>
      * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
      * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
+     * <p><b>Range of valid values:</b><br>
+     * TODO: Remove property.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      * @deprecated
@@ -1033,13 +1277,19 @@
     /**
      * <p>The maximum ratio between both active area width
      * and crop region width, and active area height and
-     * crop region height.</p>
+     * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
      * <p>This represents the maximum amount of zooming possible by
      * the camera device, or equivalently, the minimum cropping
      * window size.</p>
      * <p>Crop regions that have a width or height that is smaller
      * than this ratio allows will be rounded up to the minimum
      * allowed size by the camera device.</p>
+     * <p><b>Units</b>: Zoom scale factor</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;=1</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     @PublicKey
     public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
@@ -1054,6 +1304,8 @@
      * set to FAST.</p>
      * <p>When multiple streams are configured, the minimum frame duration will
      * be &gt;= max(individual stream min durations).</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
      */
@@ -1075,6 +1327,7 @@
      * can provide.</p>
      * <p>Please reference the documentation for the image data destination to
      * check if it limits the maximum size for image data.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
      */
@@ -1133,6 +1386,12 @@
      * <p>Attempting to configure an input stream with output streams not
      * listed as available in this map is not valid.</p>
      * <p>TODO: typedef to ReprocessFormatMap</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
@@ -1220,6 +1479,7 @@
      * </table>
      * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
      * mandatory stream configurations on a per-capability basis.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
@@ -1244,6 +1504,8 @@
      * calculating the max frame rate.</p>
      * <p>(Keep in sync with
      * StreamConfigurationMap#getOutputMinFrameDuration)</p>
+     * <p><b>Units</b>: (format, width, height, ns) x n</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#SENSOR_FRAME_DURATION
      * @hide
@@ -1309,6 +1571,8 @@
      * calculating the max frame rate (absent stalls).</p>
      * <p>(Keep up to date with
      * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
+     * <p><b>Units</b>: (format, width, height, ns) x n</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
      * @see CaptureRequest#SENSOR_FRAME_DURATION
@@ -1396,6 +1660,7 @@
      * </table>
      * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
      * mandatory stream configurations on a per-capability basis.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
@@ -1417,7 +1682,13 @@
      * is inside of the active array. The camera device will apply the same crop region and
      * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
      * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
-     * FREEFORM cropping.</p>
+     * FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
+     *   <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#SCALER_CROP_REGION
@@ -1430,22 +1701,41 @@
             new Key<Integer>("android.scaler.croppingType", int.class);
 
     /**
-     * <p>Area of raw data which corresponds to only
+     * <p>The area of the image sensor which corresponds to
      * active pixels.</p>
-     * <p>It is smaller or equal to
-     * sensor full pixel array, which could include the black calibration pixels.</p>
+     * <p>This is the region of the sensor that actually receives light from the scene.
+     * Therefore, the size of this region determines the maximum field of view and the maximum
+     * number of pixels that an image from this sensor can contain.</p>
+     * <p>The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the
+     * full pixel array, and the size of the full pixel array is given by
+     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
+     * <p>Most other keys listing pixel coordinates have their coordinate systems based on the
+     * active array, with <code>(0, 0)</code> being the top-left of the active array rectangle.</p>
+     * <p>The active array may be smaller than the full pixel array, since the full array may
+     * include black calibration pixels or other inactive regions.</p>
+     * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
      */
     @PublicKey
     public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
             new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
 
     /**
-     * <p>Range of valid sensitivities.</p>
-     * <p>The minimum and maximum valid values for the
-     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} control.</p>
+     * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
+     * camera device.</p>
      * <p>The values are the standard ISO sensitivity values,
      * as defined in ISO 12232:2006.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Min &lt;= 100, Max &gt;= 800</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#SENSOR_SENSITIVITY
      */
     @PublicKey
@@ -1456,6 +1746,20 @@
      * <p>The arrangement of color filters on sensor;
      * represents the colors in the top-left 2x2 section of
      * the sensor, in reading order.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
+     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
+     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
+     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
+     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
      * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
      * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
@@ -1467,11 +1771,17 @@
             new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
 
     /**
-     * <p>Range of valid exposure
-     * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p>
-     * <p>The min value will be &lt;= 100e3 (100 us). For FULL
+     * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
+     * by this camera device.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * The minimum exposure time will be less than 100 us. For FULL
      * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
-     * max will be &gt;= 100e6 (100ms)</p>
+     * the maximum exposure time will be greater than 100ms.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
@@ -1481,18 +1791,21 @@
             new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
 
     /**
-     * <p>Maximum possible frame duration (minimum frame
-     * rate).</p>
-     * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
-     * that will be accepted by the camera device. Attempting to use
-     * frame durations beyond the maximum will result in the frame duration
-     * being clipped to the maximum. See that control
-     * for a full definition of frame durations.</p>
-     * <p>Refer to
-     * StreamConfigurationMap#getOutputMinFrameDuration(int,Size)
-     * for the minimum frame duration values.</p>
-     * <p>For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
-     * max will be &gt;= 100e6 (100ms).</p>
+     * <p>The maximum possible frame duration (minimum frame rate) for
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
+     * <p>Attempting to use frame durations beyond the maximum will result in the frame
+     * duration being clipped to the maximum. See that control for a full definition of frame
+     * durations.</p>
+     * <p>Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum
+     * frame duration values.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * For FULL capability devices
+     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#SENSOR_FRAME_DURATION
@@ -1506,6 +1819,8 @@
      * array.</p>
      * <p>This is the physical size of the sensor pixel
      * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
+     * <p><b>Units</b>: Millimeters</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
      */
@@ -1514,7 +1829,7 @@
             new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
 
     /**
-     * <p>Dimensions of full pixel array, possibly
+     * <p>Dimensions of the full pixel array, possibly
      * including black calibration pixels.</p>
      * <p>The pixel count of the full pixel array,
      * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p>
@@ -1523,6 +1838,11 @@
      * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
      * If a size corresponding to pixelArraySize is listed, the resulting
      * raw sensor image will include black pixels.</p>
+     * <p>Some parts of the full pixel array may not receive light from the scene,
+     * or are otherwise inactive.  The {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} key
+     * defines the rectangle of active pixels that actually forms an image.</p>
+     * <p><b>Units</b>: Pixels</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -1538,11 +1858,14 @@
      * sample values from the sensor.  This is typically caused by the
      * sensor becoming highly non-linear or clipping. The minimum for
      * each channel is specified by the offset in the
-     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p>
+     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
      * <p>The white level is typically determined either by sensor bit depth
      * (8-14 bits is expected), or by the point where the sensor response
      * becomes too non-linear to be useful.  The default value for this is
      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt; 255 (8-bit output)</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
      */
@@ -1556,6 +1879,12 @@
      * may not based on a time source that can be compared to other system time sources.</p>
      * <p>This characteristic defines the source for the timestamps, and therefore whether they
      * can be compared against other system time sources/timestamps.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
+     *   <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
      * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
      */
@@ -1568,15 +1897,38 @@
      * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
      * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
      * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
-     * <p>The values in this tag correspond to the values defined for the
+     * <p>The values in this key correspond to the values defined for the
      * EXIF LightSource tag. These illuminants are standard light sources
      * that are often used calibrating camera devices.</p>
-     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
+     * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
      * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
      * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
      * <p>Some devices may choose to provide a second set of calibration
      * information for improved quality, including
      * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
+     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
      * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
@@ -1611,12 +1963,13 @@
      * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
      * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
      * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
-     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.
-     * Valid values for this are the same as those given for the first
-     * reference illuminant.</p>
-     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
+     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
+     * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
      * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
      * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
      * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
@@ -1763,13 +2116,15 @@
     /**
      * <p>A fixed black level offset for each of the color filter arrangement
      * (CFA) mosaic channels.</p>
-     * <p>This tag specifies the zero light value for each of the CFA mosaic
+     * <p>This key specifies the zero light value for each of the CFA mosaic
      * channels in the camera sensor.  The maximal value output by the
      * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
      * <p>The values are given in the same order as channels listed for the CFA
-     * layout tag (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
+     * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
      * nth value given corresponds to the black level offset for the nth
      * color channel listed in the CFA.</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 0 for each.</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
@@ -1799,19 +2154,26 @@
             new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
 
     /**
-     * <p>Clockwise angle through which the output
-     * image needs to be rotated to be upright on the device
-     * screen in its native orientation. Also defines the
-     * direction of rolling shutter readout, which is from top
-     * to bottom in the sensor's coordinate system</p>
+     * <p>Clockwise angle through which the output image needs to be rotated to be
+     * upright on the device screen in its native orientation.</p>
+     * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
+     * the sensor's coordinate system.</p>
+     * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
+     * 90</p>
+     * <p><b>Range of valid values:</b><br>
+     * 0, 90, 180, 270</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Integer> SENSOR_ORIENTATION =
             new Key<Integer>("android.sensor.orientation", int.class);
 
     /**
-     * <p>Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p>
-     * <p>Optional. Defaults to [OFF].</p>
+     * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
+     * supported by this camera device.</p>
+     * <p>Defaults to OFF, and always includes OFF if defined.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
@@ -1821,15 +2183,14 @@
             new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
 
     /**
-     * <p>The face detection modes that are available
-     * for this camera device.</p>
+     * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
+     * supported by this camera device.</p>
      * <p>OFF is always supported.</p>
-     * <p>SIMPLE means the device supports the
-     * android.statistics.faceRectangles and
-     * android.statistics.faceScores outputs.</p>
-     * <p>FULL means the device additionally supports the
-     * android.statistics.faceIds and
-     * android.statistics.faceLandmarks outputs.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      */
     @PublicKey
     public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
@@ -1838,17 +2199,25 @@
     /**
      * <p>The maximum number of simultaneously detectable
      * faces.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 0 for cameras without available face detection; otherwise:
+     * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
+     * <code>&gt;0</code> for LEGACY devices.</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
             new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
 
     /**
-     * <p>The set of hot pixel map output modes supported by this camera device.</p>
-     * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p>
-     * <p>If no hotpixel map is available for this camera device, this will contain
-     * only OFF.  If the hotpixel map is available, this will include both
-     * the ON and OFF options.</p>
+     * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
+     * supported by this camera device.</p>
+     * <p>If no hotpixel map output is available for this camera device, this will contain only
+     * <code>false</code>.</p>
+     * <p>ON is always supported on devices with the RAW capability.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
      */
@@ -1859,14 +2228,18 @@
     /**
      * <p>Maximum number of supported points in the
      * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
-     * <p>If the actual number of points provided by the application (in
-     * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*)  is less than max, the camera device will
-     * resample the curve to its internal representation, using linear
-     * interpolation.</p>
+     * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
+     * less than this maximum, the camera device will resample the curve to its internal
+     * representation, using linear interpolation.</p>
      * <p>The output curves in the result metadata may have a different number
      * of points than the input curves, and will represent the actual
      * hardware curves used as closely as possible when linearly interpolated.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_CURVE
      */
     @PublicKey
@@ -1874,11 +2247,18 @@
             new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
 
     /**
-     * <p>The set of tonemapping modes supported by this camera device.</p>
-     * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p>
-     * <p>Full-capability camera devices must always support CONTRAST_CURVE and
-     * FAST.</p>
+     * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
+     * device.</p>
+     * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
+     * CONTRAST_CURVE and FAST. This includes all FULL level devices.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_MODE
      */
     @PublicKey
@@ -1887,6 +2267,11 @@
 
     /**
      * <p>A list of camera LEDs that are available on this system.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @see #LED_AVAILABLE_LEDS_TRANSMIT
      * @hide
      */
@@ -1895,8 +2280,8 @@
 
     /**
      * <p>Generally classifies the overall set of the camera device functionality.</p>
-     * <p>Camera devices will come in two flavors: LIMITED and FULL.</p>
-     * <p>A FULL device has the most support possible and will support below capabilities:</p>
+     * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p>
+     * <p>A FULL device will support below capabilities:</p>
      * <ul>
      * <li>30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.</li>
      * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
@@ -1910,14 +2295,38 @@
      * </ul>
      * <p>A LIMITED device may have some or none of the above characteristics.
      * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
+     * <p>Some features are not part of any particular hardware level or capability and must be
+     * queried separately. These include:</p>
+     * <ul>
+     * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
+     * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
+     * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
+     * <li>Optical or electrical image stabilization
+     *   ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
+     *    {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
+     * </ul>
      * <p>A LEGACY device does not support per-frame control, manual sensor control, manual
      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
+     * <p>Each higher level supports everything the lower level supports
+     * in this order: FULL <code>&gt;</code> LIMITED <code>&gt;</code> LEGACY.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
+     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
+     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
+     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
+     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
      * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC
      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
+     * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
+     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
      * @see CameraCharacteristics#SYNC_MAX_LATENCY
      * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
      * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
@@ -1959,6 +2368,15 @@
      * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
      * <code>android.sync.frameNumber == 2</code>, the distance is clearly
      * <code>4 - 2 = 2</code>.</p>
+     * <p><b>Units</b>: Frame counts</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
+     *   <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
+     * <p>This key is available on all devices.</p>
      * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
      * @see #SYNC_MAX_LATENCY_UNKNOWN
      */
@@ -1970,4 +2388,6 @@
      * End generated code
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
 
+
+
 }
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index a57b361..16df844 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -418,11 +418,11 @@
      * <ul>
      * <li>RAW_SENSOR is supported as an output format.</li>
      * <li>The maximum available resolution for RAW_SENSOR streams
-     * will match either the value in
-     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
-     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li>
+     *   will match either the value in
+     *   {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
+     *   {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li>
      * <li>All DNG-related optional metadata entries are provided
-     * by the camera device.</li>
+     *   by the camera device.</li>
      * </ul>
      *
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -437,13 +437,13 @@
      * <li>At least one input stream can be used.</li>
      * <li>RAW_OPAQUE is supported as an output/input format</li>
      * <li>Using RAW_OPAQUE does not cause a frame rate drop
-     * relative to the sensor's maximum capture rate (at that
-     * resolution).</li>
+     *   relative to the sensor's maximum capture rate (at that
+     *   resolution).</li>
      * <li>RAW_OPAQUE will be reprocessable into both YUV_420_888
-     * and JPEG formats.</li>
+     *   and JPEG formats.</li>
      * <li>The maximum available resolution for RAW_OPAQUE streams
-     * (both input/output) will match the maximum available
-     * resolution of JPEG streams.</li>
+     *   (both input/output) will match the maximum available
+     *   resolution of JPEG streams.</li>
      * </ul>
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
      * @hide
@@ -807,6 +807,8 @@
      * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
      * device, along with android.flash.* fields, if there's
      * a flash unit for this camera device.</p>
+     * <p>LEGACY devices do not support the OFF mode and will
+     * override attempts to use this value to ON.</p>
      *
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
      * @see CaptureRequest#SENSOR_FRAME_DURATION
@@ -1213,8 +1215,7 @@
      * image while recording video) use case.</p>
      * <p>The camera device should take the highest-quality image
      * possible (given the other settings) without disrupting the
-     * frame rate of video recording.<br />
-     * </p>
+     * frame rate of video recording.  </p>
      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
      */
     public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
@@ -1577,6 +1578,8 @@
 
     /**
      * <p>Turn on custom high dynamic range (HDR) mode.</p>
+     * <p>This is intended for LEGACY mode devices only;
+     * HAL3+ camera devices should not implement this mode.</p>
      * @see CaptureRequest#CONTROL_SCENE_MODE
      * @hide
      */
@@ -1862,8 +1865,6 @@
 
     /**
      * <p>Return face rectangle and confidence values only.</p>
-     * <p>In this mode, only android.statistics.faceRectangles and
-     * android.statistics.faceScores outputs are valid.</p>
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      */
     public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
@@ -1871,11 +1872,7 @@
     /**
      * <p>Return all face
      * metadata.</p>
-     * <p>In this mode,
-     * android.statistics.faceRectangles,
-     * android.statistics.faceScores,
-     * android.statistics.faceIds, and
-     * android.statistics.faceLandmarks outputs are valid.</p>
+     * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      */
     public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
@@ -2064,6 +2061,8 @@
      * and may restart scanning at any time.</p>
      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
      * device may skip reporting this state in capture result.</p>
+     * <p>LEGACY camera devices do not support this state. When a passive
+     * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
      * @see CaptureResult#CONTROL_AF_STATE
      */
     public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 93eb3de..6aec72a 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -476,7 +476,6 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
-
     /**
      * <p>The mode control selects how the image data is converted from the
      * sensor's native color into linear sRGB color.</p>
@@ -518,10 +517,21 @@
      * </code></pre>
      * <p>Both the input and output value ranges must match. Overflow/underflow
      * values are clipped to fit within the range.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li>
+     *   <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li>
+     *   <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
      * @see CaptureRequest#CONTROL_AWB_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
      * @see #COLOR_CORRECTION_MODE_FAST
      * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
@@ -542,8 +552,14 @@
      * in this matrix result metadata. The transform should keep the magnitude
      * of the output color values within <code>[0, 1.0]</code> (assuming input color
      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
+     * <p><b>Units</b>: Unitless scale factors</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM =
@@ -559,8 +575,14 @@
      * TRANSFORM_MATRIX.</p>
      * <p>The gains in the result metadata are the gains actually
      * applied by the camera device to the current frame.</p>
+     * <p><b>Units</b>: Unitless gain factors</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS =
@@ -568,8 +590,6 @@
 
     /**
      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
-     * <p>This must be set to a valid mode from
-     * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}.</p>
      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
      * can not focus on the same point after exiting from the lens. This metadata defines
      * the high level control of chromatic aberration correction algorithm, which aims to
@@ -580,6 +600,16 @@
      * use the highest-quality aberration correction algorithms, even if it slows down
      * capture rate. FAST means the camera device will not slow down capture rate when
      * applying aberration correction.</p>
+     * <p>LEGACY devices will always be in FAST mode.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
      * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
@@ -612,7 +642,7 @@
      * options for the antibanding mode. The
      * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
      * the available modes for a given camera device.</p>
-     * <p>The default mode is AUTO, which must be supported by all
+     * <p>The default mode is AUTO, which is supported by all
      * camera devices.</p>
      * <p>If manual exposure control is enabled (by setting
      * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
@@ -620,6 +650,16 @@
      * ensure it selects exposure times that do not cause banding
      * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
      * the application in this.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br></p>
+     * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
      * @see CaptureRequest#CONTROL_AE_MODE
@@ -652,6 +692,10 @@
      * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
+     * <p><b>Units</b>: Compensation steps</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE
      * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
@@ -666,9 +710,11 @@
     /**
      * <p>Whether auto-exposure (AE) is currently locked to its latest
      * calculated values.</p>
-     * <p>Note that even when AE is locked, the flash may be
-     * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
-     * ON_AUTO_FLASH_REDEYE.</p>
+     * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
+     * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
+     * <p>Note that even when AE is locked, the flash may be fired if
+     * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH /
+     * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
      * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
      * is ON, the camera device will still adjust its exposure value.</p>
      * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
@@ -677,7 +723,21 @@
      * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
      * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
+     * <p>Since the camera device has a pipeline of in-flight requests, the settings that
+     * get locked do not necessarily correspond to the settings that were present in the
+     * latest capture result received from the camera device, since additional captures
+     * and AE updates may have occurred even before the result was sent out. If an
+     * application is switching between automatic and manual control and wishes to eliminate
+     * any flicker during the switch, the following procedure is recommended:</p>
+     * <ol>
+     * <li>Starting in auto-AE mode:</li>
+     * <li>Lock AE</li>
+     * <li>Wait for the first result to be output that has the AE locked</li>
+     * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
+     * <li>Submit the capture request, proceed to run manual AE as desired.</li>
+     * </ol>
      * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
      * @see CaptureRequest#CONTROL_AE_MODE
@@ -711,7 +771,19 @@
      * camera device auto-exposure routine for the overridden
      * fields for a given capture will be available in its
      * CaptureResult.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON ON}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
      * @see CaptureRequest#FLASH_MODE
@@ -729,25 +801,35 @@
             new Key<Integer>("android.control.aeMode", int.class);
 
     /**
-     * <p>List of areas to use for
-     * metering.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
+     * <p>List of metering areas to use for auto-exposure adjustment.</p>
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of regions supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array.</p>
-     * <p>The weight must range from 0 to 1000, and represents a weight
+     * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
      * for every pixel in the area. This means that a large metering area
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other exposure metering regions, so if only one
+     * region is used, all non-zero weights will have the same effect. A region with 0
+     * weight is ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata.  If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
@@ -759,12 +841,20 @@
             new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class);
 
     /**
-     * <p>Range over which fps can be adjusted to
-     * maintain exposure.</p>
+     * <p>Range over which the auto-exposure routine can
+     * adjust the capture frame rate to maintain good
+     * exposure.</p>
      * <p>Only constrains auto-exposure (AE) algorithm, not
-     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
+     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
+     * <p><b>Units</b>: Frames per second (FPS)</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
      */
     @PublicKey
     public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE =
@@ -789,8 +879,22 @@
      * depends on the current AE mode and state; see
      * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition
      * details.</p>
+     * <p>On LEGACY-level devices, the precapture trigger is not supported;
+     * capturing a high-resolution JPEG image will automatically trigger a
+     * precapture sequence before the high-resolution capture, including
+     * potentially firing a pre-capture flash.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li>
+     *   <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureResult#CONTROL_AE_STATE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
      * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
      */
@@ -806,7 +910,20 @@
      * <p>If the lens is controlled by the camera device auto-focus algorithm,
      * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState}
      * in result metadata.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AF_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li>
+     *   <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES
      * @see CaptureResult#CONTROL_AF_STATE
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
@@ -822,25 +939,35 @@
             new Key<Integer>("android.control.afMode", int.class);
 
     /**
-     * <p>List of areas to use for focus
-     * estimation.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
+     * <p>List of metering areas to use for auto-focus.</p>
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of focus areas supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array.</p>
-     * <p>The weight must range from 0 to 1000, and represents a weight
+     * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
      * for every pixel in the area. This means that a large metering area
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other metering regions, so if only one region
+     * is used, all non-zero weights will have the same effect. A region with 0 weight is
+     * ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata. If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
@@ -864,6 +991,13 @@
      * START for multiple captures in a row means restarting the AF operation over
      * and over again.</p>
      * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li>
+     *   <li>{@link #CONTROL_AF_TRIGGER_START START}</li>
+     *   <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureResult#CONTROL_AF_STATE
      * @see #CONTROL_AF_TRIGGER_IDLE
@@ -877,9 +1011,26 @@
     /**
      * <p>Whether auto-white balance (AWB) is currently locked to its
      * latest calculated values.</p>
+     * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
+     * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
+     * <p>Since the camera device has a pipeline of in-flight requests, the settings that
+     * get locked do not necessarily correspond to the settings that were present in the
+     * latest capture result received from the camera device, since additional captures
+     * and AWB updates may have occurred even before the result was sent out. If an
+     * application is switching between automatic and manual control and wishes to eliminate
+     * any flicker during the switch, the following procedure is recommended:</p>
+     * <ol>
+     * <li>Starting in auto-AWB mode:</li>
+     * <li>Lock AWB</li>
+     * <li>Wait for the first result to be output that has the AWB locked</li>
+     * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
+     * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
+     * </ol>
      * <p>Note that AWB lock is only meaningful when
      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes,
      * AWB is already fixed to a specific setting.</p>
+     * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AWB_MODE
      */
@@ -907,10 +1058,26 @@
      * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform},
      * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
      * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_MODE
      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
+     * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES
      * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AWB_MODE_OFF
      * @see #CONTROL_AWB_MODE_AUTO
@@ -927,10 +1094,12 @@
             new Key<Integer>("android.control.awbMode", int.class);
 
     /**
-     * <p>List of areas to use for illuminant
+     * <p>List of metering areas to use for auto-white-balance illuminant
      * estimation.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of regions supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -941,11 +1110,20 @@
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other white balance metering regions, so if
+     * only one region is used, all non-zero weights will have the same effect. A region with
+     * 0 weight is ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata.  If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
@@ -965,7 +1143,18 @@
      * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
      * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
      * contains ZSL. MANUAL will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
-     * contains MANUAL_SENSOR.</p>
+     * contains MANUAL_SENSOR. Other intent values are always supported.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
@@ -989,10 +1178,23 @@
      * implementor of the camera device, and should not be
      * depended on to be consistent (or present) across all
      * devices.</p>
-     * <p>A color effect will only be applied if
-     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p>
+     * <p>This key is available on all devices.</p>
      *
-     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
      * @see #CONTROL_EFFECT_MODE_OFF
      * @see #CONTROL_EFFECT_MODE_MONO
      * @see #CONTROL_EFFECT_MODE_NEGATIVE
@@ -1008,9 +1210,9 @@
             new Key<Integer>("android.control.effectMode", int.class);
 
     /**
-     * <p>Overall mode of 3A control
+     * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
      * routines.</p>
-     * <p>High-level 3A control. When set to OFF, all 3A control
+     * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
      * by the camera device is disabled. The application must set the fields for
      * capture parameters itself.</p>
      * <p>When set to AUTO, the individual algorithm controls in
@@ -1025,6 +1227,18 @@
      * update, as if this frame is never captured. This mode can be used in the scenario
      * where the application doesn't want a 3A manual control capture to affect
      * the subsequent auto 3A capture results.</p>
+     * <p>LEGACY mode devices will only support AUTO and USE_SCENE_MODE modes.
+     * LIMITED mode devices will only support OFF and OFF_KEEP_STATE if they
+     * support the MANUAL_SENSOR and MANUAL_POST_PROCSESING capabilities.
+     * FULL mode devices will always support OFF and OFF_KEEP_STATE.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
+     *   <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AF_MODE
      * @see #CONTROL_MODE_OFF
@@ -1037,18 +1251,41 @@
             new Key<Integer>("android.control.mode", int.class);
 
     /**
-     * <p>A camera mode optimized for conditions typical in a particular
-     * capture setting.</p>
+     * <p>Control for which scene mode is currently active.</p>
+     * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
+     * capture settings.</p>
      * <p>This is the mode that that is active when
      * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
      * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
-     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.
-     * The scene modes available for a given camera device are listed in
-     * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}.</p>
+     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
      * <p>The interpretation and implementation of these scene modes is left
      * to the implementor of the camera device. Their behavior will not be
      * consistent across all devices, and any given device may only implement
      * a subset of these modes.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AF_MODE
@@ -1081,18 +1318,26 @@
     /**
      * <p>Whether video stabilization is
      * active.</p>
-     * <p>Video stabilization automatically translates and scales images from the camera
-     * in order to stabilize motion between consecutive frames.</p>
+     * <p>Video stabilization automatically translates and scales images from
+     * the camera in order to stabilize motion between consecutive frames.</p>
      * <p>If enabled, video stabilization can modify the
      * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p>
-     * <p>Switching between different video stabilization modes may take several frames
-     * to initialize, the camera device will report the current mode in capture result
-     * metadata. For example, When "ON" mode is requested, the video stabilization modes
-     * in the first several capture results may still be "OFF", and it will become "ON"
-     * when the initialization is done.</p>
-     * <p>If a camera device supports both this mode and OIS ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}),
-     * turning both modes on may produce undesirable interaction, so it is recommended not to
-     * enable both at the same time.</p>
+     * <p>Switching between different video stabilization modes may take several
+     * frames to initialize, the camera device will report the current mode
+     * in capture result metadata. For example, When "ON" mode is requested,
+     * the video stabilization modes in the first several capture results may
+     * still be "OFF", and it will become "ON" when the initialization is
+     * done.</p>
+     * <p>If a camera device supports both this mode and OIS
+     * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
+     * produce undesirable interaction, so it is recommended not to enable
+     * both at the same time.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
      * @see CaptureRequest#SCALER_CROP_REGION
@@ -1106,16 +1351,28 @@
     /**
      * <p>Operation mode for edge
      * enhancement.</p>
-     * <p>Edge/sharpness/detail enhancement. OFF means no
-     * enhancement will be applied by the camera device.</p>
-     * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p>
+     * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
+     * no enhancement will be applied by the camera device.</p>
      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
      * will be applied. HIGH_QUALITY mode indicates that the
      * camera device will use the highest-quality enhancement algorithms,
      * even if it slows down capture rate. FAST means the camera device will
      * not slow down capture rate when applying edge enhancement.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #EDGE_MODE_OFF OFF}</li>
+     *   <li>{@link #EDGE_MODE_FAST FAST}</li>
+     *   <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #EDGE_MODE_OFF
      * @see #EDGE_MODE_FAST
      * @see #EDGE_MODE_HIGH_QUALITY
@@ -1139,6 +1396,13 @@
      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
      * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #FLASH_MODE_OFF OFF}</li>
+     *   <li>{@link #FLASH_MODE_SINGLE SINGLE}</li>
+     *   <li>{@link #FLASH_MODE_TORCH TORCH}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
@@ -1153,12 +1417,19 @@
             new Key<Integer>("android.flash.mode", int.class);
 
     /**
-     * <p>Set operational mode for hot pixel correction.</p>
-     * <p>Valid modes for this camera device are listed in
-     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
+     * <p>Operational mode for hot pixel correction.</p>
      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
-     * that do not accurately encode the incoming light (i.e. pixels that
-     * are stuck at an arbitrary value).</p>
+     * that do not accurately measure the incoming light (i.e. pixels that
+     * are stuck at an arbitrary value or are oversensitive).</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li>
+     *   <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li>
+     *   <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
      * @see #HOT_PIXEL_MODE_OFF
@@ -1171,6 +1442,10 @@
 
     /**
      * <p>A location object to use when generating image GPS metadata.</p>
+     * <p>Setting a location object in a request will include the GPS coordinates of the location
+     * into any JPEG images captured based on the request. These coordinates can then be
+     * viewed by anyone who receives the JPEG image.</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     @SyntheticKey
@@ -1179,7 +1454,10 @@
 
     /**
      * <p>GPS coordinates to include in output JPEG
-     * EXIF</p>
+     * EXIF.</p>
+     * <p><b>Range of valid values:</b><br>
+     * (-180 - 180], [-90,90], [-inf, inf]</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<double[]> JPEG_GPS_COORDINATES =
@@ -1187,7 +1465,9 @@
 
     /**
      * <p>32 characters describing GPS algorithm to
-     * include in EXIF</p>
+     * include in EXIF.</p>
+     * <p><b>Units</b>: UTF-8 null-terminated string</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
@@ -1195,15 +1475,49 @@
 
     /**
      * <p>Time GPS fix was made to include in
-     * EXIF</p>
+     * EXIF.</p>
+     * <p><b>Units</b>: UTC in seconds since January 1, 1970</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<Long> JPEG_GPS_TIMESTAMP =
             new Key<Long>("android.jpeg.gpsTimestamp", long.class);
 
     /**
-     * <p>Orientation of JPEG image to
-     * write</p>
+     * <p>The orientation for a JPEG image.</p>
+     * <p>The clockwise rotation angle in degrees, relative to the orientation
+     * to the camera, that the JPEG picture needs to be rotated by, to be viewed
+     * upright.</p>
+     * <p>Camera devices may either encode this value into the JPEG EXIF header, or
+     * rotate the image data to match this orientation.</p>
+     * <p>Note that this orientation is relative to the orientation of the camera sensor, given
+     * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
+     * <p>To translate from the device orientation given by the Android sensor APIs, the following
+     * sample code may be used:</p>
+     * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
+     *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
+     *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
+     *
+     *     // Round device orientation to a multiple of 90
+     *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
+     *
+     *     // Reverse device orientation for front-facing cameras
+     *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
+     *     if (facingFront) deviceOrientation = -deviceOrientation;
+     *
+     *     // Calculate desired JPEG orientation relative to camera orientation to make
+     *     // the image upright relative to the device orientation
+     *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
+     *
+     *     return jpegOrientation;
+     * }
+     * </code></pre>
+     * <p><b>Units</b>: Degrees in multiples of 90</p>
+     * <p><b>Range of valid values:</b><br>
+     * 0, 90, 180, 270</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_ORIENTATION
      */
     @PublicKey
     public static final Key<Integer> JPEG_ORIENTATION =
@@ -1213,6 +1527,9 @@
      * <p>Compression quality of the final JPEG
      * image.</p>
      * <p>85-95 is typical usage range.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 1-100; larger is higher quality</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Byte> JPEG_QUALITY =
@@ -1221,6 +1538,9 @@
     /**
      * <p>Compression quality of JPEG
      * thumbnail.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 1-100; larger is higher quality</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
@@ -1230,25 +1550,29 @@
      * <p>Resolution of embedded JPEG thumbnail.</p>
      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
      * but the captured JPEG will still be a valid image.</p>
-     * <p>When a jpeg image capture is issued, the thumbnail size selected should have
-     * the same aspect ratio as the jpeg image.</p>
+     * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
+     * should have the same aspect ratio as the main JPEG output.</p>
      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
      * generate the thumbnail image. The thumbnail image will always have a smaller Field
      * Of View (FOV) than the primary image when aspect ratios differ.</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES
      */
     @PublicKey
     public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE =
             new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class);
 
     /**
-     * <p>The ratio of lens focal length to the effective
-     * aperture diameter.</p>
-     * <p>This will only be supported on the camera devices that
-     * have variable aperture lens. The aperture value can only be
-     * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
+     * <p>The desired lens aperture size, as a ratio of lens focal length to the
+     * effective aperture diameter.</p>
+     * <p>Setting this value is only supported on the camera devices that have a variable
+     * aperture lens.</p>
      * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
      * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
@@ -1261,8 +1585,16 @@
      * the ON modes, this will be overridden by the camera device
      * auto-exposure algorithm, the overridden values are then provided
      * back to the user in the corresponding result.</p>
+     * <p><b>Units</b>: The f-number (f/N)</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
      * @see CaptureResult#LENS_STATE
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
@@ -1274,10 +1606,8 @@
             new Key<Float>("android.lens.aperture", float.class);
 
     /**
-     * <p>State of lens neutral density filter(s).</p>
-     * <p>This will not be supported on most camera devices. On devices
-     * where this is supported, this may only be set to one of the
-     * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
+     * <p>The desired setting for the lens neutral density filter(s).</p>
+     * <p>This control will not be supported on most camera devices.</p>
      * <p>Lens filters are typically used to lower the amount of light the
      * sensor is exposed to (measured in steps of EV). As used here, an EV
      * step is the standard logarithmic representation, which are
@@ -1289,7 +1619,15 @@
      * <p>It may take several frames before the lens filter density changes
      * to the requested value. While the filter density is still changing,
      * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
+     * <p><b>Units</b>: Exposure Value (EV)</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
      * @see CaptureResult#LENS_STATE
      */
@@ -1298,7 +1636,7 @@
             new Key<Float>("android.lens.filterDensity", float.class);
 
     /**
-     * <p>The current lens focal length; used for optical zoom.</p>
+     * <p>The desired lens focal length; used for optical zoom.</p>
      * <p>This setting controls the physical focal length of the camera
      * device's lens. Changing the focal length changes the field of
      * view of the camera device, and is usually used for optical zoom.</p>
@@ -1307,10 +1645,15 @@
      * frames before the lens can change to the requested focal length.
      * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
      * be set to MOVING.</p>
-     * <p>This is expected not to be supported on most devices.</p>
+     * <p>Optical zoom will not be supported on most devices.</p>
+     * <p><b>Units</b>: Millimeters</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#LENS_APERTURE
      * @see CaptureRequest#LENS_FOCUS_DISTANCE
+     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
      * @see CaptureResult#LENS_STATE
      */
     @PublicKey
@@ -1318,16 +1661,30 @@
             new Key<Float>("android.lens.focalLength", float.class);
 
     /**
-     * <p>Distance to plane of sharpest focus,
+     * <p>Desired distance to plane of sharpest focus,
      * measured from frontmost surface of the lens.</p>
-     * <p>0 means infinity focus. Used value will be clamped
-     * to [0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}].</p>
+     * <p>This control can be used for setting manual focus, on devices that support
+     * the MANUAL_SENSOR capability and have a variable-focus lens (see
+     * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}).</p>
+     * <p>A value of <code>0.0f</code> means infinity focus. The value set will be clamped to
+     * <code>[0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>.</p>
      * <p>Like {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, this setting won't be applied
      * instantaneously, and it may take several frames before the lens
      * can move to the requested focus distance. While the lens is still moving,
      * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
+     * <p>LEGACY devices support at most setting this to <code>0.0f</code>
+     * for infinity focus.</p>
+     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 0</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#LENS_FOCAL_LENGTH
+     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
      * @see CaptureResult#LENS_STATE
      */
@@ -1349,14 +1706,26 @@
      * capture result metadata. For example, When "ON" mode is requested, the
      * optical stabilization modes in the first several capture results may still
      * be "OFF", and it will become "ON" when the initialization is done.</p>
-     * <p>If a camera device supports both OIS and EIS ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}),
-     * turning both modes on may produce undesirable interaction, so it is recommended not
-     * to enable both at the same time.</p>
+     * <p>If a camera device supports both OIS and digital image stabilization
+     * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable
+     * interaction, so it is recommended not to enable both at the same time.</p>
      * <p>Not all devices will support OIS; see
      * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for
      * available controls.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li>
+     *   <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
      * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
      * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
@@ -1367,16 +1736,28 @@
 
     /**
      * <p>Mode of operation for the noise reduction algorithm.</p>
-     * <p>Noise filtering control. OFF means no noise reduction
-     * will be applied by the camera device.</p>
-     * <p>This must be set to a valid mode from
-     * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
+     * <p>The noise reduction algorithm attempts to improve image quality by removing
+     * excessive noise added by the capture process, especially in dark conditions.
+     * OFF means no noise reduction will be applied by the camera device.</p>
      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
      * will be applied. HIGH_QUALITY mode indicates that the camera device
      * will use the highest-quality noise filtering algorithms,
      * even if it slows down capture rate. FAST means the camera device will not
      * slow down capture rate when applying noise filtering.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li>
+     *   <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li>
+     *   <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
      * @see #NOISE_REDUCTION_MODE_OFF
      * @see #NOISE_REDUCTION_MODE_FAST
@@ -1390,13 +1771,18 @@
      * <p>An application-specified ID for the current
      * request. Must be maintained unchanged in output
      * frame</p>
+     * <p><b>Units</b>: arbitrary integer assigned by application</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any int</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @hide
      */
     public static final Key<Integer> REQUEST_ID =
             new Key<Integer>("android.request.id", int.class);
 
     /**
-     * <p>The region of the sensor to read out for this capture.</p>
+     * <p>The desired region of the sensor to read out for this capture.</p>
+     * <p>This control can be used to implement digital zoom.</p>
      * <p>The crop region coordinate system is based off
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the
      * top-left corner of the sensor active array.</p>
@@ -1426,6 +1812,9 @@
      * for rounding and other hardware requirements; the final
      * crop region used will be included in the output capture
      * result.</p>
+     * <p><b>Units</b>: Pixel coordinates relative to
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -1437,8 +1826,23 @@
     /**
      * <p>Duration each pixel is exposed to
      * light.</p>
-     * <p>If the sensor can't expose this exact duration, it should shorten the
-     * duration exposed to the nearest possible value (rather than expose longer).</p>
+     * <p>If the sensor can't expose this exact duration, it will shorten the
+     * duration exposed to the nearest possible value (rather than expose longer).
+     * The final exposure time used will be available in the output capture result.</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
+     * OFF; otherwise the auto-exposure algorithm will override this value.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
      */
     @PublicKey
     public static final Key<Long> SENSOR_EXPOSURE_TIME =
@@ -1516,8 +1920,23 @@
      * delivered.</p>
      * <p>For more details about stalling, see
      * StreamConfigurationMap#getOutputStallDuration(int,Size).</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
+     * OFF; otherwise the auto-exposure algorithm will override this value.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration},
+     * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration
+     * is capped to <code>max(duration, exposureTime + overhead)</code>.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
+     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
      */
     @PublicKey
     public static final Key<Long> SENSOR_FRAME_DURATION =
@@ -1535,7 +1954,15 @@
      * requested, it will reduce the gain to the nearest supported
      * value. The final sensitivity used will be available in the
      * output capture result.</p>
+     * <p><b>Units</b>: ISO arithmetic units</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
      * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
      */
@@ -1569,7 +1996,21 @@
      * <p>For example, if manual flash is enabled, flash firing should still
      * occur (and that the test pattern remain unmodified, since the flash
      * would not actually affect it).</p>
+     * <p>Defaults to OFF.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
      * @see #SENSOR_TEST_PATTERN_MODE_OFF
      * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
      * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
@@ -1587,30 +2028,41 @@
      * <p>When set to OFF mode, no lens shading correction will be applied by the
      * camera device, and an identity lens shading map data will be provided
      * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
-     * shading map with size specified as <code>android.lens.info.shadingMapSize = [ 4, 3 ]</code>,
-     * the output android.statistics.lensShadingMap for this case will be an identity map
-     * shown below:</p>
+     * shading map with size of <code>[ 4, 3 ]</code>,
+     * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity
+     * map shown below:</p>
      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,   1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
      * </code></pre>
-     * <p>When set to other modes, lens shading correction will be applied by the
-     * camera device. Applications can request lens shading map data by setting
-     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
-     * lens shading map data in android.statistics.lensShadingMap, with size specified
-     * by android.lens.info.shadingMapSize; the returned shading map data will be the one
-     * applied by the camera device for this capture request.</p>
-     * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore the reliability
-     * of the map data may be affected by the AE and AWB algorithms. When AE and AWB are in
-     * AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code> OFF),
-     * to get best results, it is recommended that the applications wait for the AE and AWB to
-     * be converged before using the returned shading map data.</p>
+     * <p>When set to other modes, lens shading correction will be applied by the camera
+     * device. Applications can request lens shading map data by setting
+     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens
+     * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map
+     * data will be the one applied by the camera device for this capture request.</p>
+     * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
+     * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
+     * AWB are in AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code>
+     * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
+     * to be converged before using the returned shading map data.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SHADING_MODE_OFF OFF}</li>
+     *   <li>{@link #SHADING_MODE_FAST FAST}</li>
+     *   <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AWB_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
      * @see #SHADING_MODE_OFF
      * @see #SHADING_MODE_FAST
@@ -1621,12 +2073,20 @@
             new Key<Integer>("android.shading.mode", int.class);
 
     /**
-     * <p>Control for the face detector
+     * <p>Operating mode for the face detector
      * unit.</p>
      * <p>Whether face detection is enabled, and whether it
      * should output just the basic fields or the full set of
-     * fields. Value must be one of the
-     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
+     * fields.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
      * @see #STATISTICS_FACE_DETECT_MODE_OFF
@@ -1638,10 +2098,12 @@
             new Key<Integer>("android.statistics.faceDetectMode", int.class);
 
     /**
-     * <p>Operating mode for hotpixel map generation.</p>
-     * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
-     * If set to OFF, no hotpixel map will be returned.</p>
-     * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
+     * <p>Operating mode for hot pixel map generation.</p>
+     * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
+     * If set to <code>false</code>, no hot pixel map will be returned.</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
      * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
@@ -1656,6 +2118,18 @@
      * <p>When set to ON,
      * android.statistics.lensShadingMap will be provided in
      * the output result metadata.</p>
+     * <p>ON is always supported on devices with the RAW capability.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li>
+     *   <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
      */
@@ -1668,7 +2142,12 @@
      * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
      * <p>See android.tonemap.curveRed for more details.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
      */
@@ -1680,7 +2159,12 @@
      * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
      * <p>See android.tonemap.curveRed for more details.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
      */
@@ -1693,10 +2177,10 @@
      * CONTRAST_CURVE.</p>
      * <p>Each channel's curve is defined by an array of control points:</p>
      * <pre><code>android.tonemap.curveRed =
-     * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
+     *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
      * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
-     * <p>These are sorted in order of increasing <code>Pin</code>; it is always
-     * guaranteed that input values 0.0 and 1.0 are included in the list to
+     * <p>These are sorted in order of increasing <code>Pin</code>; it is
+     * required that input values 0.0 and 1.0 are included in the list to
      * define a complete mapping. For input values between control points,
      * the camera device must linearly interpolate between the control
      * points.</p>
@@ -1717,21 +2201,29 @@
      * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
      * <pre><code>android.tonemap.curveRed = [
-     * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
-     * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
-     * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
-     * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
+     *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
+     *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
+     *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
+     *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
      * </code></pre>
      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
      * <pre><code>android.tonemap.curveRed = [
-     * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
-     * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
-     * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
-     * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
+     *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
+     *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
+     *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
+     *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
      * </code></pre>
      * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
+     * <p><b>Range of valid values:</b><br>
+     * 0-1 on both input and output coordinates, normalized
+     * as a floating-point value such that 0 == black and 1 == white.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
@@ -1747,7 +2239,7 @@
      * example. The same logic applies to green and blue channel.
      * Each channel's curve is defined by an array of control points:</p>
      * <pre><code>curveRed =
-     * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
+     *   [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
      * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
      * <p>These are sorted in order of increasing <code>Pin</code>; it is always
      * guaranteed that input values 0.0 and 1.0 are included in the list to
@@ -1771,21 +2263,26 @@
      * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
      * <pre><code>curveRed = [
-     * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
-     * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
-     * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
-     * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
+     *   (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
+     *   (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
+     *   (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
+     *   (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
      * </code></pre>
      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
      * <pre><code>curveRed = [
-     * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
-     * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
-     * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
-     * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
+     *   (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
+     *   (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
+     *   (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
+     *   (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
      * </code></pre>
      * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
      * @see CaptureRequest#TONEMAP_MODE
      */
@@ -1807,8 +2304,6 @@
      * tables, selective chroma enhancement, or other non-linear color
      * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
-     * <p>This must be set to a valid mode in
-     * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
      * <p>When using either FAST or HIGH_QUALITY, the camera device will
      * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.
      * These values are always available, and as close as possible to the
@@ -1816,7 +2311,20 @@
      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
      * roughly the same.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li>
+     *   <li>{@link #TONEMAP_MODE_FAST FAST}</li>
+     *   <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
      * @see CaptureRequest#TONEMAP_CURVE
      * @see CaptureRequest#TONEMAP_MODE
@@ -1839,6 +2347,7 @@
      * data is stored locally on the device.</p>
      * <p>The LED <em>may</em> be off if a trusted application is using the data that
      * doesn't violate the above rules.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @hide
      */
     public static final Key<Boolean> LED_TRANSMIT =
@@ -1847,9 +2356,9 @@
     /**
      * <p>Whether black-level compensation is locked
      * to its current values, or is free to vary.</p>
-     * <p>When set to ON, the values used for black-level
+     * <p>When set to <code>true</code> (ON), the values used for black-level
      * compensation will not change until the lock is set to
-     * OFF.</p>
+     * <code>false</code> (OFF).</p>
      * <p>Since changes to certain capture parameters (such as
      * exposure time) may require resetting of black level
      * compensation, the camera device must report whether setting
@@ -1882,6 +2391,12 @@
      * possible, only overriding the lock to OFF when changes to
      * other request parameters require a black level recalculation
      * or reset.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<Boolean> BLACK_LEVEL_LOCK =
@@ -1891,4 +2406,6 @@
      * End generated code
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
 
+
+
 }
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 01276a2..d208649 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -327,7 +327,6 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
-
     /**
      * <p>The mode control selects how the image data is converted from the
      * sensor's native color into linear sRGB color.</p>
@@ -369,10 +368,21 @@
      * </code></pre>
      * <p>Both the input and output value ranges must match. Overflow/underflow
      * values are clipped to fit within the range.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li>
+     *   <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li>
+     *   <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
      * @see CaptureRequest#CONTROL_AWB_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
      * @see #COLOR_CORRECTION_MODE_FAST
      * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
@@ -393,8 +403,14 @@
      * in this matrix result metadata. The transform should keep the magnitude
      * of the output color values within <code>[0, 1.0]</code> (assuming input color
      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
+     * <p><b>Units</b>: Unitless scale factors</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM =
@@ -410,8 +426,14 @@
      * TRANSFORM_MATRIX.</p>
      * <p>The gains in the result metadata are the gains actually
      * applied by the camera device to the current frame.</p>
+     * <p><b>Units</b>: Unitless gain factors</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS =
@@ -419,8 +441,6 @@
 
     /**
      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
-     * <p>This must be set to a valid mode from
-     * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}.</p>
      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
      * can not focus on the same point after exiting from the lens. This metadata defines
      * the high level control of chromatic aberration correction algorithm, which aims to
@@ -431,6 +451,16 @@
      * use the highest-quality aberration correction algorithms, even if it slows down
      * capture rate. FAST means the camera device will not slow down capture rate when
      * applying aberration correction.</p>
+     * <p>LEGACY devices will always be in FAST mode.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li>
+     *   <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
      * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
@@ -463,7 +493,7 @@
      * options for the antibanding mode. The
      * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
      * the available modes for a given camera device.</p>
-     * <p>The default mode is AUTO, which must be supported by all
+     * <p>The default mode is AUTO, which is supported by all
      * camera devices.</p>
      * <p>If manual exposure control is enabled (by setting
      * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
@@ -471,6 +501,16 @@
      * ensure it selects exposure times that do not cause banding
      * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
      * the application in this.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li>
+     *   <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br></p>
+     * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
      * @see CaptureRequest#CONTROL_AE_MODE
@@ -503,6 +543,10 @@
      * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
+     * <p><b>Units</b>: Compensation steps</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE
      * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
@@ -517,9 +561,11 @@
     /**
      * <p>Whether auto-exposure (AE) is currently locked to its latest
      * calculated values.</p>
-     * <p>Note that even when AE is locked, the flash may be
-     * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
-     * ON_AUTO_FLASH_REDEYE.</p>
+     * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
+     * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
+     * <p>Note that even when AE is locked, the flash may be fired if
+     * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH /
+     * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
      * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
      * is ON, the camera device will still adjust its exposure value.</p>
      * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
@@ -528,7 +574,21 @@
      * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
      * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
+     * <p>Since the camera device has a pipeline of in-flight requests, the settings that
+     * get locked do not necessarily correspond to the settings that were present in the
+     * latest capture result received from the camera device, since additional captures
+     * and AE updates may have occurred even before the result was sent out. If an
+     * application is switching between automatic and manual control and wishes to eliminate
+     * any flicker during the switch, the following procedure is recommended:</p>
+     * <ol>
+     * <li>Starting in auto-AE mode:</li>
+     * <li>Lock AE</li>
+     * <li>Wait for the first result to be output that has the AE locked</li>
+     * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
+     * <li>Submit the capture request, proceed to run manual AE as desired.</li>
+     * </ol>
      * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
      * @see CaptureRequest#CONTROL_AE_MODE
@@ -562,7 +622,19 @@
      * camera device auto-exposure routine for the overridden
      * fields for a given capture will be available in its
      * CaptureResult.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON ON}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li>
+     *   <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
      * @see CaptureRequest#FLASH_MODE
@@ -580,25 +652,35 @@
             new Key<Integer>("android.control.aeMode", int.class);
 
     /**
-     * <p>List of areas to use for
-     * metering.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
+     * <p>List of metering areas to use for auto-exposure adjustment.</p>
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of regions supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array.</p>
-     * <p>The weight must range from 0 to 1000, and represents a weight
+     * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
      * for every pixel in the area. This means that a large metering area
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other exposure metering regions, so if only one
+     * region is used, all non-zero weights will have the same effect. A region with 0
+     * weight is ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata.  If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
@@ -610,12 +692,20 @@
             new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class);
 
     /**
-     * <p>Range over which fps can be adjusted to
-     * maintain exposure.</p>
+     * <p>Range over which the auto-exposure routine can
+     * adjust the capture frame rate to maintain good
+     * exposure.</p>
      * <p>Only constrains auto-exposure (AE) algorithm, not
-     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
+     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
+     * <p><b>Units</b>: Frames per second (FPS)</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
      */
     @PublicKey
     public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE =
@@ -640,8 +730,22 @@
      * depends on the current AE mode and state; see
      * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition
      * details.</p>
+     * <p>On LEGACY-level devices, the precapture trigger is not supported;
+     * capturing a high-resolution JPEG image will automatically trigger a
+     * precapture sequence before the high-resolution capture, including
+     * potentially firing a pre-capture flash.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li>
+     *   <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureResult#CONTROL_AE_STATE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
      * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
      */
@@ -831,12 +935,26 @@
      * </tr>
      * </tbody>
      * </table>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AE_STATE_INACTIVE INACTIVE}</li>
+     *   <li>{@link #CONTROL_AE_STATE_SEARCHING SEARCHING}</li>
+     *   <li>{@link #CONTROL_AE_STATE_CONVERGED CONVERGED}</li>
+     *   <li>{@link #CONTROL_AE_STATE_LOCKED LOCKED}</li>
+     *   <li>{@link #CONTROL_AE_STATE_FLASH_REQUIRED FLASH_REQUIRED}</li>
+     *   <li>{@link #CONTROL_AE_STATE_PRECAPTURE PRECAPTURE}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_LOCK
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
      * @see CaptureRequest#CONTROL_MODE
      * @see CaptureRequest#CONTROL_SCENE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #CONTROL_AE_STATE_INACTIVE
      * @see #CONTROL_AE_STATE_SEARCHING
      * @see #CONTROL_AE_STATE_CONVERGED
@@ -856,7 +974,20 @@
      * <p>If the lens is controlled by the camera device auto-focus algorithm,
      * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState}
      * in result metadata.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AF_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li>
+     *   <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li>
+     *   <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES
      * @see CaptureResult#CONTROL_AF_STATE
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
@@ -872,25 +1003,35 @@
             new Key<Integer>("android.control.afMode", int.class);
 
     /**
-     * <p>List of areas to use for focus
-     * estimation.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
+     * <p>List of metering areas to use for auto-focus.</p>
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of focus areas supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array.</p>
-     * <p>The weight must range from 0 to 1000, and represents a weight
+     * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
      * for every pixel in the area. This means that a large metering area
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other metering regions, so if only one region
+     * is used, all non-zero weights will have the same effect. A region with 0 weight is
+     * ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata. If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
@@ -914,6 +1055,13 @@
      * START for multiple captures in a row means restarting the AF operation over
      * and over again.</p>
      * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li>
+     *   <li>{@link #CONTROL_AF_TRIGGER_START START}</li>
+     *   <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureResult#CONTROL_AF_STATE
      * @see #CONTROL_AF_TRIGGER_IDLE
@@ -1306,6 +1454,17 @@
      * </tr>
      * </tbody>
      * </table>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AF_STATE_INACTIVE INACTIVE}</li>
+     *   <li>{@link #CONTROL_AF_STATE_PASSIVE_SCAN PASSIVE_SCAN}</li>
+     *   <li>{@link #CONTROL_AF_STATE_PASSIVE_FOCUSED PASSIVE_FOCUSED}</li>
+     *   <li>{@link #CONTROL_AF_STATE_ACTIVE_SCAN ACTIVE_SCAN}</li>
+     *   <li>{@link #CONTROL_AF_STATE_FOCUSED_LOCKED FOCUSED_LOCKED}</li>
+     *   <li>{@link #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED NOT_FOCUSED_LOCKED}</li>
+     *   <li>{@link #CONTROL_AF_STATE_PASSIVE_UNFOCUSED PASSIVE_UNFOCUSED}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AF_MODE
      * @see CaptureRequest#CONTROL_MODE
@@ -1325,9 +1484,26 @@
     /**
      * <p>Whether auto-white balance (AWB) is currently locked to its
      * latest calculated values.</p>
+     * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
+     * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
+     * <p>Since the camera device has a pipeline of in-flight requests, the settings that
+     * get locked do not necessarily correspond to the settings that were present in the
+     * latest capture result received from the camera device, since additional captures
+     * and AWB updates may have occurred even before the result was sent out. If an
+     * application is switching between automatic and manual control and wishes to eliminate
+     * any flicker during the switch, the following procedure is recommended:</p>
+     * <ol>
+     * <li>Starting in auto-AWB mode:</li>
+     * <li>Lock AWB</li>
+     * <li>Wait for the first result to be output that has the AWB locked</li>
+     * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
+     * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
+     * </ol>
      * <p>Note that AWB lock is only meaningful when
      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes,
      * AWB is already fixed to a specific setting.</p>
+     * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AWB_MODE
      */
@@ -1355,10 +1531,26 @@
      * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform},
      * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
      * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li>
+     *   <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_MODE
      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
+     * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES
      * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AWB_MODE_OFF
      * @see #CONTROL_AWB_MODE_AUTO
@@ -1375,10 +1567,12 @@
             new Key<Integer>("android.control.awbMode", int.class);
 
     /**
-     * <p>List of areas to use for illuminant
+     * <p>List of metering areas to use for auto-white-balance illuminant
      * estimation.</p>
-     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
+     * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
      * Otherwise will always be present.</p>
+     * <p>The maximum number of regions supported by the device is determined by the value
+     * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -1389,11 +1583,20 @@
      * with the same weight as a smaller area will have more effect in
      * the metering result. Metering areas can partially overlap and the
      * camera device will add the weights in the overlap region.</p>
-     * <p>If all regions have 0 weight, then no specific metering area
-     * needs to be used by the camera device. If the metering region is
-     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
-     * the camera device will ignore the sections outside the region and output the
-     * used sections in the result metadata.</p>
+     * <p>The weights are relative to weights of other white balance metering regions, so if
+     * only one region is used, all non-zero weights will have the same effect. A region with
+     * 0 weight is ignored.</p>
+     * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
+     * camera device.</p>
+     * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
+     * capture result metadata, the camera device will ignore the sections outside the crop
+     * region and output only the intersection rectangle as the metering region in the result
+     * metadata.  If the region is entirely outside the crop region, it will be ignored and
+     * not reported in the result metadata.</p>
+     * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p><b>Range of valid values:</b><br>
+     * Coordinates must be between <code>[(0,0), (width, height))</code> of
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
@@ -1413,7 +1616,18 @@
      * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
      * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
      * contains ZSL. MANUAL will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
-     * contains MANUAL_SENSOR.</p>
+     * contains MANUAL_SENSOR. Other intent values are always supported.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
+     *   <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_MODE
      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
@@ -1546,11 +1760,23 @@
      * </tr>
      * </tbody>
      * </table>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_AWB_STATE_INACTIVE INACTIVE}</li>
+     *   <li>{@link #CONTROL_AWB_STATE_SEARCHING SEARCHING}</li>
+     *   <li>{@link #CONTROL_AWB_STATE_CONVERGED CONVERGED}</li>
+     *   <li>{@link #CONTROL_AWB_STATE_LOCKED LOCKED}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AWB_LOCK
      * @see CaptureRequest#CONTROL_AWB_MODE
      * @see CaptureRequest#CONTROL_MODE
      * @see CaptureRequest#CONTROL_SCENE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #CONTROL_AWB_STATE_INACTIVE
      * @see #CONTROL_AWB_STATE_SEARCHING
      * @see #CONTROL_AWB_STATE_CONVERGED
@@ -1568,10 +1794,23 @@
      * implementor of the camera device, and should not be
      * depended on to be consistent (or present) across all
      * devices.</p>
-     * <p>A color effect will only be applied if
-     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li>
+     *   <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p>
+     * <p>This key is available on all devices.</p>
      *
-     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
      * @see #CONTROL_EFFECT_MODE_OFF
      * @see #CONTROL_EFFECT_MODE_MONO
      * @see #CONTROL_EFFECT_MODE_NEGATIVE
@@ -1587,9 +1826,9 @@
             new Key<Integer>("android.control.effectMode", int.class);
 
     /**
-     * <p>Overall mode of 3A control
+     * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
      * routines.</p>
-     * <p>High-level 3A control. When set to OFF, all 3A control
+     * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
      * by the camera device is disabled. The application must set the fields for
      * capture parameters itself.</p>
      * <p>When set to AUTO, the individual algorithm controls in
@@ -1604,6 +1843,18 @@
      * update, as if this frame is never captured. This mode can be used in the scenario
      * where the application doesn't want a 3A manual control capture to affect
      * the subsequent auto 3A capture results.</p>
+     * <p>LEGACY mode devices will only support AUTO and USE_SCENE_MODE modes.
+     * LIMITED mode devices will only support OFF and OFF_KEEP_STATE if they
+     * support the MANUAL_SENSOR and MANUAL_POST_PROCSESING capabilities.
+     * FULL mode devices will always support OFF and OFF_KEEP_STATE.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
+     *   <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
+     *   <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AF_MODE
      * @see #CONTROL_MODE_OFF
@@ -1616,18 +1867,41 @@
             new Key<Integer>("android.control.mode", int.class);
 
     /**
-     * <p>A camera mode optimized for conditions typical in a particular
-     * capture setting.</p>
+     * <p>Control for which scene mode is currently active.</p>
+     * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
+     * capture settings.</p>
      * <p>This is the mode that that is active when
      * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
      * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
-     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.
-     * The scene modes available for a given camera device are listed in
-     * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}.</p>
+     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
      * <p>The interpretation and implementation of these scene modes is left
      * to the implementor of the camera device. Their behavior will not be
      * consistent across all devices, and any given device may only implement
      * a subset of these modes.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
+     *   <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AF_MODE
@@ -1660,18 +1934,26 @@
     /**
      * <p>Whether video stabilization is
      * active.</p>
-     * <p>Video stabilization automatically translates and scales images from the camera
-     * in order to stabilize motion between consecutive frames.</p>
+     * <p>Video stabilization automatically translates and scales images from
+     * the camera in order to stabilize motion between consecutive frames.</p>
      * <p>If enabled, video stabilization can modify the
      * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p>
-     * <p>Switching between different video stabilization modes may take several frames
-     * to initialize, the camera device will report the current mode in capture result
-     * metadata. For example, When "ON" mode is requested, the video stabilization modes
-     * in the first several capture results may still be "OFF", and it will become "ON"
-     * when the initialization is done.</p>
-     * <p>If a camera device supports both this mode and OIS ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}),
-     * turning both modes on may produce undesirable interaction, so it is recommended not to
-     * enable both at the same time.</p>
+     * <p>Switching between different video stabilization modes may take several
+     * frames to initialize, the camera device will report the current mode
+     * in capture result metadata. For example, When "ON" mode is requested,
+     * the video stabilization modes in the first several capture results may
+     * still be "OFF", and it will become "ON" when the initialization is
+     * done.</p>
+     * <p>If a camera device supports both this mode and OIS
+     * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
+     * produce undesirable interaction, so it is recommended not to enable
+     * both at the same time.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li>
+     *   <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
      * @see CaptureRequest#SCALER_CROP_REGION
@@ -1685,16 +1967,28 @@
     /**
      * <p>Operation mode for edge
      * enhancement.</p>
-     * <p>Edge/sharpness/detail enhancement. OFF means no
-     * enhancement will be applied by the camera device.</p>
-     * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p>
+     * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
+     * no enhancement will be applied by the camera device.</p>
      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
      * will be applied. HIGH_QUALITY mode indicates that the
      * camera device will use the highest-quality enhancement algorithms,
      * even if it slows down capture rate. FAST means the camera device will
      * not slow down capture rate when applying edge enhancement.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #EDGE_MODE_OFF OFF}</li>
+     *   <li>{@link #EDGE_MODE_FAST FAST}</li>
+     *   <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #EDGE_MODE_OFF
      * @see #EDGE_MODE_FAST
      * @see #EDGE_MODE_HIGH_QUALITY
@@ -1718,6 +2012,13 @@
      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
      * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #FLASH_MODE_OFF OFF}</li>
+     *   <li>{@link #FLASH_MODE_SINGLE SINGLE}</li>
+     *   <li>{@link #FLASH_MODE_TORCH TORCH}</li>
+     * </ul></p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
@@ -1737,8 +2038,33 @@
      * <p>When the camera device doesn't have flash unit
      * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
      * Other states indicate the current flash status.</p>
+     * <p>In certain conditions, this will be available on LEGACY devices:</p>
+     * <ul>
+     * <li>Flash-less cameras always return UNAVAILABLE.</li>
+     * <li>Using {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>==</code> ON_ALWAYS_FLASH
+     *    will always return FIRED.</li>
+     * <li>Using {@link CaptureRequest#FLASH_MODE android.flash.mode} <code>==</code> TORCH
+     *    will always return FIRED.</li>
+     * </ul>
+     * <p>In all other conditions the state will not be available on
+     * LEGACY devices (i.e. it will be <code>null</code>).</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #FLASH_STATE_UNAVAILABLE UNAVAILABLE}</li>
+     *   <li>{@link #FLASH_STATE_CHARGING CHARGING}</li>
+     *   <li>{@link #FLASH_STATE_READY READY}</li>
+     *   <li>{@link #FLASH_STATE_FIRED FIRED}</li>
+     *   <li>{@link #FLASH_STATE_PARTIAL PARTIAL}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CaptureRequest#CONTROL_AE_MODE
      * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * @see CaptureRequest#FLASH_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #FLASH_STATE_UNAVAILABLE
      * @see #FLASH_STATE_CHARGING
      * @see #FLASH_STATE_READY
@@ -1750,12 +2076,19 @@
             new Key<Integer>("android.flash.state", int.class);
 
     /**
-     * <p>Set operational mode for hot pixel correction.</p>
-     * <p>Valid modes for this camera device are listed in
-     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
+     * <p>Operational mode for hot pixel correction.</p>
      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
-     * that do not accurately encode the incoming light (i.e. pixels that
-     * are stuck at an arbitrary value).</p>
+     * that do not accurately measure the incoming light (i.e. pixels that
+     * are stuck at an arbitrary value or are oversensitive).</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li>
+     *   <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li>
+     *   <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
      * @see #HOT_PIXEL_MODE_OFF
@@ -1768,6 +2101,10 @@
 
     /**
      * <p>A location object to use when generating image GPS metadata.</p>
+     * <p>Setting a location object in a request will include the GPS coordinates of the location
+     * into any JPEG images captured based on the request. These coordinates can then be
+     * viewed by anyone who receives the JPEG image.</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     @SyntheticKey
@@ -1776,7 +2113,10 @@
 
     /**
      * <p>GPS coordinates to include in output JPEG
-     * EXIF</p>
+     * EXIF.</p>
+     * <p><b>Range of valid values:</b><br>
+     * (-180 - 180], [-90,90], [-inf, inf]</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<double[]> JPEG_GPS_COORDINATES =
@@ -1784,7 +2124,9 @@
 
     /**
      * <p>32 characters describing GPS algorithm to
-     * include in EXIF</p>
+     * include in EXIF.</p>
+     * <p><b>Units</b>: UTF-8 null-terminated string</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
@@ -1792,15 +2134,49 @@
 
     /**
      * <p>Time GPS fix was made to include in
-     * EXIF</p>
+     * EXIF.</p>
+     * <p><b>Units</b>: UTC in seconds since January 1, 1970</p>
+     * <p>This key is available on all devices.</p>
      * @hide
      */
     public static final Key<Long> JPEG_GPS_TIMESTAMP =
             new Key<Long>("android.jpeg.gpsTimestamp", long.class);
 
     /**
-     * <p>Orientation of JPEG image to
-     * write</p>
+     * <p>The orientation for a JPEG image.</p>
+     * <p>The clockwise rotation angle in degrees, relative to the orientation
+     * to the camera, that the JPEG picture needs to be rotated by, to be viewed
+     * upright.</p>
+     * <p>Camera devices may either encode this value into the JPEG EXIF header, or
+     * rotate the image data to match this orientation.</p>
+     * <p>Note that this orientation is relative to the orientation of the camera sensor, given
+     * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
+     * <p>To translate from the device orientation given by the Android sensor APIs, the following
+     * sample code may be used:</p>
+     * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
+     *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
+     *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
+     *
+     *     // Round device orientation to a multiple of 90
+     *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
+     *
+     *     // Reverse device orientation for front-facing cameras
+     *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
+     *     if (facingFront) deviceOrientation = -deviceOrientation;
+     *
+     *     // Calculate desired JPEG orientation relative to camera orientation to make
+     *     // the image upright relative to the device orientation
+     *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
+     *
+     *     return jpegOrientation;
+     * }
+     * </code></pre>
+     * <p><b>Units</b>: Degrees in multiples of 90</p>
+     * <p><b>Range of valid values:</b><br>
+     * 0, 90, 180, 270</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_ORIENTATION
      */
     @PublicKey
     public static final Key<Integer> JPEG_ORIENTATION =
@@ -1810,6 +2186,9 @@
      * <p>Compression quality of the final JPEG
      * image.</p>
      * <p>85-95 is typical usage range.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 1-100; larger is higher quality</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Byte> JPEG_QUALITY =
@@ -1818,6 +2197,9 @@
     /**
      * <p>Compression quality of JPEG
      * thumbnail.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 1-100; larger is higher quality</p>
+     * <p>This key is available on all devices.</p>
      */
     @PublicKey
     public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
@@ -1827,25 +2209,29 @@
      * <p>Resolution of embedded JPEG thumbnail.</p>
      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
      * but the captured JPEG will still be a valid image.</p>
-     * <p>When a jpeg image capture is issued, the thumbnail size selected should have
-     * the same aspect ratio as the jpeg image.</p>
+     * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
+     * should have the same aspect ratio as the main JPEG output.</p>
      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
      * generate the thumbnail image. The thumbnail image will always have a smaller Field
      * Of View (FOV) than the primary image when aspect ratios differ.</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p>
+     * <p>This key is available on all devices.</p>
+     *
+     * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES
      */
     @PublicKey
     public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE =
             new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class);
 
     /**
-     * <p>The ratio of lens focal length to the effective
-     * aperture diameter.</p>
-     * <p>This will only be supported on the camera devices that
-     * have variable aperture lens. The aperture value can only be
-     * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
+     * <p>The desired lens aperture size, as a ratio of lens focal length to the
+     * effective aperture diameter.</p>
+     * <p>Setting this value is only supported on the camera devices that have a variable
+     * aperture lens.</p>
      * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
      * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
@@ -1858,8 +2244,16 @@
      * the ON modes, this will be overridden by the camera device
      * auto-exposure algorithm, the overridden values are then provided
      * back to the user in the corresponding result.</p>
+     * <p><b>Units</b>: The f-number (f/N)</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
      * @see CaptureResult#LENS_STATE
      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
@@ -1871,10 +2265,8 @@
             new Key<Float>("android.lens.aperture", float.class);
 
     /**
-     * <p>State of lens neutral density filter(s).</p>
-     * <p>This will not be supported on most camera devices. On devices
-     * where this is supported, this may only be set to one of the
-     * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
+     * <p>The desired setting for the lens neutral density filter(s).</p>
+     * <p>This control will not be supported on most camera devices.</p>
      * <p>Lens filters are typically used to lower the amount of light the
      * sensor is exposed to (measured in steps of EV). As used here, an EV
      * step is the standard logarithmic representation, which are
@@ -1886,7 +2278,15 @@
      * <p>It may take several frames before the lens filter density changes
      * to the requested value. While the filter density is still changing,
      * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
+     * <p><b>Units</b>: Exposure Value (EV)</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
      * @see CaptureResult#LENS_STATE
      */
@@ -1895,7 +2295,7 @@
             new Key<Float>("android.lens.filterDensity", float.class);
 
     /**
-     * <p>The current lens focal length; used for optical zoom.</p>
+     * <p>The desired lens focal length; used for optical zoom.</p>
      * <p>This setting controls the physical focal length of the camera
      * device's lens. Changing the focal length changes the field of
      * view of the camera device, and is usually used for optical zoom.</p>
@@ -1904,10 +2304,15 @@
      * frames before the lens can change to the requested focal length.
      * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
      * be set to MOVING.</p>
-     * <p>This is expected not to be supported on most devices.</p>
+     * <p>Optical zoom will not be supported on most devices.</p>
+     * <p><b>Units</b>: Millimeters</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#LENS_APERTURE
      * @see CaptureRequest#LENS_FOCUS_DISTANCE
+     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
      * @see CaptureResult#LENS_STATE
      */
     @PublicKey
@@ -1915,9 +2320,19 @@
             new Key<Float>("android.lens.focalLength", float.class);
 
     /**
-     * <p>Distance to plane of sharpest focus,
+     * <p>Desired distance to plane of sharpest focus,
      * measured from frontmost surface of the lens.</p>
      * <p>Should be zero for fixed-focus cameras</p>
+     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 0</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
      */
     @PublicKey
     public static final Key<Float> LENS_FOCUS_DISTANCE =
@@ -1928,6 +2343,17 @@
      * sharp focus (depth of field).</p>
      * <p>If variable focus not supported, can still report
      * fixed depth of field range</p>
+     * <p><b>Units</b>: A pair of focus distances in diopters: (near,
+     * far); see {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details.</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;=0</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
      */
     @PublicKey
     public static final Key<android.util.Pair<Float,Float>> LENS_FOCUS_RANGE =
@@ -1947,14 +2373,26 @@
      * capture result metadata. For example, When "ON" mode is requested, the
      * optical stabilization modes in the first several capture results may still
      * be "OFF", and it will become "ON" when the initialization is done.</p>
-     * <p>If a camera device supports both OIS and EIS ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}),
-     * turning both modes on may produce undesirable interaction, so it is recommended not
-     * to enable both at the same time.</p>
+     * <p>If a camera device supports both OIS and digital image stabilization
+     * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable
+     * interaction, so it is recommended not to enable both at the same time.</p>
      * <p>Not all devices will support OIS; see
      * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for
      * available controls.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li>
+     *   <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
      * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
      * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
@@ -1984,7 +2422,17 @@
      * <p>Then this state will always be STATIONARY.</p>
      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
      * is changing.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #LENS_STATE_STATIONARY STATIONARY}</li>
+     *   <li>{@link #LENS_STATE_MOVING MOVING}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#LENS_APERTURE
      * @see CaptureRequest#LENS_FILTER_DENSITY
      * @see CaptureRequest#LENS_FOCAL_LENGTH
@@ -2002,16 +2450,28 @@
 
     /**
      * <p>Mode of operation for the noise reduction algorithm.</p>
-     * <p>Noise filtering control. OFF means no noise reduction
-     * will be applied by the camera device.</p>
-     * <p>This must be set to a valid mode from
-     * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
+     * <p>The noise reduction algorithm attempts to improve image quality by removing
+     * excessive noise added by the capture process, especially in dark conditions.
+     * OFF means no noise reduction will be applied by the camera device.</p>
      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
      * will be applied. HIGH_QUALITY mode indicates that the camera device
      * will use the highest-quality noise filtering algorithms,
      * even if it slows down capture rate. FAST means the camera device will not
      * slow down capture rate when applying noise filtering.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li>
+     *   <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li>
+     *   <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
      * @see #NOISE_REDUCTION_MODE_OFF
      * @see #NOISE_REDUCTION_MODE_FAST
@@ -2035,6 +2495,8 @@
      * in any order relative to other frames, but all PARTIAL buffers for a given
      * capture must arrive before the FINAL buffer for that capture. This entry may
      * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
+     * <p><b>Range of valid values:</b><br>
+     * Optional. Default value is FINAL.</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
@@ -2048,6 +2510,10 @@
      * increases with every new result (that is, each new result has a unique
      * frameCount value).</p>
      * <p>Reset on release()</p>
+     * <p><b>Units</b>: count of frames</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt; 0</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @deprecated
      * @hide
      */
@@ -2059,6 +2525,10 @@
      * <p>An application-specified ID for the current
      * request. Must be maintained unchanged in output
      * frame</p>
+     * <p><b>Units</b>: arbitrary integer assigned by application</p>
+     * <p><b>Range of valid values:</b><br>
+     * Any int</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @hide
      */
     public static final Key<Integer> REQUEST_ID =
@@ -2072,6 +2542,9 @@
      * what streams are configured, the data may undergo less processing,
      * and some pipeline stages skipped.</p>
      * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
+     * <p><b>Range of valid values:</b><br>
+     * &lt;= {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
      */
@@ -2080,7 +2553,8 @@
             new Key<Byte>("android.request.pipelineDepth", byte.class);
 
     /**
-     * <p>The region of the sensor to read out for this capture.</p>
+     * <p>The desired region of the sensor to read out for this capture.</p>
+     * <p>This control can be used to implement digital zoom.</p>
      * <p>The crop region coordinate system is based off
      * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the
      * top-left corner of the sensor active array.</p>
@@ -2110,6 +2584,9 @@
      * for rounding and other hardware requirements; the final
      * crop region used will be included in the output capture
      * result.</p>
+     * <p><b>Units</b>: Pixel coordinates relative to
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -2121,8 +2598,23 @@
     /**
      * <p>Duration each pixel is exposed to
      * light.</p>
-     * <p>If the sensor can't expose this exact duration, it should shorten the
-     * duration exposed to the nearest possible value (rather than expose longer).</p>
+     * <p>If the sensor can't expose this exact duration, it will shorten the
+     * duration exposed to the nearest possible value (rather than expose longer).
+     * The final exposure time used will be available in the output capture result.</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
+     * OFF; otherwise the auto-exposure algorithm will override this value.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
      */
     @PublicKey
     public static final Key<Long> SENSOR_EXPOSURE_TIME =
@@ -2200,8 +2692,23 @@
      * delivered.</p>
      * <p>For more details about stalling, see
      * StreamConfigurationMap#getOutputStallDuration(int,Size).</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
+     * OFF; otherwise the auto-exposure algorithm will override this value.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration},
+     * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration
+     * is capped to <code>max(duration, exposureTime + overhead)</code>.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
+     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
      */
     @PublicKey
     public static final Key<Long> SENSOR_FRAME_DURATION =
@@ -2219,7 +2726,15 @@
      * requested, it will reduce the gain to the nearest supported
      * value. The final sensitivity used will be available in the
      * output capture result.</p>
+     * <p><b>Units</b>: ISO arithmetic units</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
      * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
      */
@@ -2243,6 +2758,10 @@
      * android.os.SystemClock#elapsedRealtimeNanos(), and they can be
      * compared to other timestamps from other subsystems that are using
      * that base.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt; 0</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
      */
@@ -2267,10 +2786,10 @@
 
     /**
      * <p>Noise model coefficients for each CFA mosaic channel.</p>
-     * <p>This tag contains two noise model coefficients for each CFA channel
+     * <p>This key contains two noise model coefficients for each CFA channel
      * corresponding to the sensor amplification (S) and sensor readout
      * noise (O).  These are given as pairs of coefficients for each channel
-     * in the same order as channels listed for the CFA layout tag
+     * in the same order as channels listed for the CFA layout key
      * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}).  This is
      * represented as an array of Pair&lt;Double, Double&gt;, where
      * the first member of the Pair at index n is the S coefficient and the
@@ -2324,6 +2843,8 @@
      * <li>R &gt; 1.20 will require strong software correction to produce
      * a usuable image (&gt;20% divergence).</li>
      * </ul>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>&gt;= 0</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      */
     @PublicKey
@@ -2356,7 +2877,21 @@
      * <p>For example, if manual flash is enabled, flash firing should still
      * occur (and that the test pattern remain unmodified, since the flash
      * would not actually affect it).</p>
+     * <p>Defaults to OFF.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li>
+     *   <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p>
      * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
      * @see #SENSOR_TEST_PATTERN_MODE_OFF
      * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
      * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
@@ -2371,12 +2906,22 @@
     /**
      * <p>Duration between the start of first row exposure
      * and the start of last row exposure.</p>
-     * <p>This is the exposure time skew (in the unit of nanosecond) between the first and
-     * last row exposure start times. The first row and the last row are the first
-     * and last rows inside of the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
+     * <p>This is the exposure time skew between the first and last
+     * row exposure start times. The first row and the last row are
+     * the first and last rows inside of the
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
      * <p>For typical camera sensors that use rolling shutters, this is also equivalent
      * to the frame readout time.</p>
+     * <p><b>Units</b>: Nanoseconds</p>
+     * <p><b>Range of valid values:</b><br>
+     * &gt;= 0 and &lt;
+     * StreamConfigurationMap#getOutputMinFrameDuration(int, Size).</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Limited capability</b> -
+     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
     @PublicKey
@@ -2389,30 +2934,41 @@
      * <p>When set to OFF mode, no lens shading correction will be applied by the
      * camera device, and an identity lens shading map data will be provided
      * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
-     * shading map with size specified as <code>android.lens.info.shadingMapSize = [ 4, 3 ]</code>,
-     * the output android.statistics.lensShadingMap for this case will be an identity map
-     * shown below:</p>
+     * shading map with size of <code>[ 4, 3 ]</code>,
+     * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity
+     * map shown below:</p>
      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,   1.0, 1.0, 1.0, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
+     *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
      * </code></pre>
-     * <p>When set to other modes, lens shading correction will be applied by the
-     * camera device. Applications can request lens shading map data by setting
-     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
-     * lens shading map data in android.statistics.lensShadingMap, with size specified
-     * by android.lens.info.shadingMapSize; the returned shading map data will be the one
-     * applied by the camera device for this capture request.</p>
-     * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore the reliability
-     * of the map data may be affected by the AE and AWB algorithms. When AE and AWB are in
-     * AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code> OFF),
-     * to get best results, it is recommended that the applications wait for the AE and AWB to
-     * be converged before using the returned shading map data.</p>
+     * <p>When set to other modes, lens shading correction will be applied by the camera
+     * device. Applications can request lens shading map data by setting
+     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens
+     * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map
+     * data will be the one applied by the camera device for this capture request.</p>
+     * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
+     * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
+     * AWB are in AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code>
+     * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
+     * to be converged before using the returned shading map data.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SHADING_MODE_OFF OFF}</li>
+     *   <li>{@link #SHADING_MODE_FAST FAST}</li>
+     *   <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_AWB_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+     * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
      * @see #SHADING_MODE_OFF
      * @see #SHADING_MODE_FAST
@@ -2423,12 +2979,20 @@
             new Key<Integer>("android.shading.mode", int.class);
 
     /**
-     * <p>Control for the face detector
+     * <p>Operating mode for the face detector
      * unit.</p>
      * <p>Whether face detection is enabled, and whether it
      * should output just the basic fields or the full set of
-     * fields. Value must be one of the
-     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
+     * fields.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li>
+     *   <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
      * @see #STATISTICS_FACE_DETECT_MODE_OFF
@@ -2444,7 +3008,8 @@
      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
      * to the camera device.  A face that leaves the field of view and later returns may be
      * assigned a new ID.</p>
-     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL</p>
+     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
+     * This key is available on all devices.</p>
      *
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      * @hide
@@ -2457,7 +3022,8 @@
      * faces.</p>
      * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
-     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL</p>
+     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
+     * This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
@@ -2471,7 +3037,8 @@
      * faces.</p>
      * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
-     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF</p>
+     * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF
+     * This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
@@ -2484,6 +3051,9 @@
      * <p>List of the face confidence scores for
      * detected faces</p>
      * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF.</p>
+     * <p><b>Range of valid values:</b><br>
+     * 1-100</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      * @hide
@@ -2493,8 +3063,9 @@
 
     /**
      * <p>List of the faces detected through camera face detection
-     * in this result.</p>
+     * in this capture.</p>
      * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} <code>!=</code> OFF.</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
      */
@@ -2528,11 +3099,11 @@
      * <pre><code>width,height = [ 4, 3 ]
      * values =
      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
-     * 1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
-     * 1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
-     * 1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
-     * 1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
+     *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
+     *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
+     *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
+     *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
+     *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
      * </code></pre>
      * <p>The low-resolution scaling map images for each channel are
      * (displayed using nearest-neighbor interpolation):</p>
@@ -2543,8 +3114,15 @@
      * <p>As a visualization only, inverting the full-color map to recover an
      * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
+     * <p><b>Range of valid values:</b><br>
+     * Each gain factor is &gt;= 1</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP =
@@ -2576,11 +3154,11 @@
      * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
      * android.statistics.lensShadingMap =
      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
-     * 1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
-     * 1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
-     * 1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
-     * 1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
-     * 1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
+     *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
+     *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
+     *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
+     *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
+     *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
      * </code></pre>
      * <p>The low-resolution scaling map images for each channel are
      * (displayed using nearest-neighbor interpolation):</p>
@@ -2591,8 +3169,15 @@
      * <p>As a visualization only, inverting the full-color map to recover an
      * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
+     * <p><b>Range of valid values:</b><br>
+     * Each gain factor is &gt;= 1</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @hide
      */
     public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
@@ -2659,10 +3244,21 @@
      * into this metadata field. See
      * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} for more details.</p>
      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #STATISTICS_SCENE_FLICKER_NONE NONE}</li>
+     *   <li>{@link #STATISTICS_SCENE_FLICKER_50HZ 50HZ}</li>
+     *   <li>{@link #STATISTICS_SCENE_FLICKER_60HZ 60HZ}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      * @see CaptureRequest#CONTROL_AE_MODE
      * @see CaptureRequest#CONTROL_MODE
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #STATISTICS_SCENE_FLICKER_NONE
      * @see #STATISTICS_SCENE_FLICKER_50HZ
      * @see #STATISTICS_SCENE_FLICKER_60HZ
@@ -2672,10 +3268,12 @@
             new Key<Integer>("android.statistics.sceneFlicker", int.class);
 
     /**
-     * <p>Operating mode for hotpixel map generation.</p>
-     * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
-     * If set to OFF, no hotpixel map will be returned.</p>
-     * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
+     * <p>Operating mode for hot pixel map generation.</p>
+     * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
+     * If set to <code>false</code>, no hot pixel map will be returned.</p>
+     * <p><b>Range of valid values:</b><br>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
      * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
@@ -2692,6 +3290,11 @@
      * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
      * This may include hot pixels that lie outside of the active array
      * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
+     * <p><b>Range of valid values:</b><br></p>
+     * <p>n &lt;= number of pixels on the sensor.
+     * The <code>(x, y)</code> coordinates must be bounded by
+     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
@@ -2706,6 +3309,18 @@
      * <p>When set to ON,
      * android.statistics.lensShadingMap will be provided in
      * the output result metadata.</p>
+     * <p>ON is always supported on devices with the RAW capability.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li>
+     *   <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li>
+     * </ul></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+     *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
      */
@@ -2718,7 +3333,12 @@
      * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
      * <p>See android.tonemap.curveRed for more details.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
      */
@@ -2730,7 +3350,12 @@
      * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
      * <p>See android.tonemap.curveRed for more details.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
      */
@@ -2743,10 +3368,10 @@
      * CONTRAST_CURVE.</p>
      * <p>Each channel's curve is defined by an array of control points:</p>
      * <pre><code>android.tonemap.curveRed =
-     * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
+     *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
      * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
-     * <p>These are sorted in order of increasing <code>Pin</code>; it is always
-     * guaranteed that input values 0.0 and 1.0 are included in the list to
+     * <p>These are sorted in order of increasing <code>Pin</code>; it is
+     * required that input values 0.0 and 1.0 are included in the list to
      * define a complete mapping. For input values between control points,
      * the camera device must linearly interpolate between the control
      * points.</p>
@@ -2767,21 +3392,29 @@
      * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
      * <pre><code>android.tonemap.curveRed = [
-     * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
-     * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
-     * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
-     * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
+     *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
+     *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
+     *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
+     *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
      * </code></pre>
      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
      * <pre><code>android.tonemap.curveRed = [
-     * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
-     * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
-     * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
-     * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
+     *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
+     *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
+     *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
+     *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
      * </code></pre>
      * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
+     * <p><b>Range of valid values:</b><br>
+     * 0-1 on both input and output coordinates, normalized
+     * as a floating-point value such that 0 == black and 1 == white.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
      * @see CaptureRequest#TONEMAP_MODE
      * @hide
@@ -2797,7 +3430,7 @@
      * example. The same logic applies to green and blue channel.
      * Each channel's curve is defined by an array of control points:</p>
      * <pre><code>curveRed =
-     * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
+     *   [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
      * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
      * <p>These are sorted in order of increasing <code>Pin</code>; it is always
      * guaranteed that input values 0.0 and 1.0 are included in the list to
@@ -2821,21 +3454,26 @@
      * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
      * <pre><code>curveRed = [
-     * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
-     * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
-     * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
-     * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
+     *   (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
+     *   (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
+     *   (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
+     *   (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
      * </code></pre>
      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
      * <pre><code>curveRed = [
-     * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
-     * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
-     * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
-     * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
+     *   (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
+     *   (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
+     *   (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
+     *   (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
      * </code></pre>
      * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
      * @see CaptureRequest#TONEMAP_MODE
      */
@@ -2857,8 +3495,6 @@
      * tables, selective chroma enhancement, or other non-linear color
      * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>
-     * <p>This must be set to a valid mode in
-     * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
      * <p>When using either FAST or HIGH_QUALITY, the camera device will
      * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.
      * These values are always available, and as close as possible to the
@@ -2866,7 +3502,20 @@
      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
      * roughly the same.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li>
+     *   <li>{@link #TONEMAP_MODE_FAST FAST}</li>
+     *   <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
      * @see CaptureRequest#TONEMAP_CURVE
      * @see CaptureRequest#TONEMAP_MODE
@@ -2889,6 +3538,7 @@
      * data is stored locally on the device.</p>
      * <p>The LED <em>may</em> be off if a trusted application is using the data that
      * doesn't violate the above rules.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      * @hide
      */
     public static final Key<Boolean> LED_TRANSMIT =
@@ -2901,8 +3551,13 @@
      * ON if {@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock} was ON in the capture request, unless
      * a change in other capture settings forced the camera device to
      * perform a black level reset.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
      * @see CaptureRequest#BLACK_LEVEL_LOCK
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     @PublicKey
     public static final Key<Boolean> BLACK_LEVEL_LOCK =
@@ -2960,6 +3615,15 @@
      * <p>In other words, results for this current request and up to
      * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
      * android.sync.frameNumber change to CONVERGING.</p>
+     * <p><b>Possible values:</b>
+     * <ul>
+     *   <li>{@link #SYNC_FRAME_NUMBER_CONVERGING CONVERGING}</li>
+     *   <li>{@link #SYNC_FRAME_NUMBER_UNKNOWN UNKNOWN}</li>
+     * </ul></p>
+     * <p><b>Available values for this device:</b><br>
+     * Either a non-negative value corresponding to a
+     * <code>frame_number</code>, or one of the two enums (CONVERGING / UNKNOWN).</p>
+     * <p>This key is available on all devices.</p>
      *
      * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
      * @see #SYNC_FRAME_NUMBER_CONVERGING
@@ -2973,4 +3637,6 @@
      * End generated code
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
 
+
+
 }
diff --git a/core/java/android/hardware/location/GeofenceHardware.java b/core/java/android/hardware/location/GeofenceHardware.java
index 7dd105a..f537a77 100644
--- a/core/java/android/hardware/location/GeofenceHardware.java
+++ b/core/java/android/hardware/location/GeofenceHardware.java
@@ -490,7 +490,7 @@
 
             // and only call the updated callback on on L and above, this complies with the
             // documentation of GeofenceHardwareMonitorCallback
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.L) {
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                 c.onMonitoringSystemChange(event);
             }
         }
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 5f95b04..ee36012 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -485,7 +485,7 @@
         public static final int JELLY_BEAN = 16;
 
         /**
-         * Android 4.2: Moar jelly beans!
+         * November 2012: Android 4.2, Moar jelly beans!
          *
          * <p>Applications targeting this or a later release will get these
          * new changes in behavior:</p>
@@ -505,12 +505,12 @@
         public static final int JELLY_BEAN_MR1 = 17;
 
         /**
-         * Android 4.3: Jelly Bean MR2, the revenge of the beans.
+         * July 2013: Android 4.3, the revenge of the beans.
          */
         public static final int JELLY_BEAN_MR2 = 18;
 
         /**
-         * Android 4.4: KitKat, another tasty treat.
+         * October 2013: Android 4.4, KitKat, another tasty treat.
          *
          * <p>Applications targeting this or a later release will get these
          * new changes in behavior:</p>
@@ -553,7 +553,12 @@
         public static final int KITKAT_WATCH = 20;
 
         /**
-         * L!
+         * Temporary until we completely switch to {@link #LOLLIPOP}.
+         */
+        public static final int L = 21;
+
+        /**
+         * Lollipop.  A flat one with beautiful shadows.  But still tasty.
          *
          * <p>Applications targeting this or a later release will get these
          * new changes in behavior:</p>
@@ -563,7 +568,7 @@
          * Intent.</li>
          * </ul>
          */
-        public static final int L = 21;
+        public static final int LOLLIPOP = 21;
     }
     
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index b6b70cc..6a0bddc 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -260,7 +260,7 @@
 
     /** @hide */
     public static void updateCheckRecycle(int targetSdkVersion) {
-        if (targetSdkVersion < Build.VERSION_CODES.L) {
+        if (targetSdkVersion < Build.VERSION_CODES.LOLLIPOP) {
             gCheckRecycle = false;
         }
     }
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 984f12f..1368f39 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -19,7 +19,6 @@
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
 import android.content.Context;
-import android.content.pm.PackageManager;
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
@@ -434,7 +433,7 @@
      * Used to determine whether the user making this call is subject to
      * teleportations.
      *
-     * <p>As of {@link android.os.Build.VERSION_CODES#L}, this method can
+     * <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
      * now automatically identify goats using advanced goat recognition technology.</p>
      *
      * @return Returns true if the user making this call is a goat.
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index d137f0c..736ec54 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -256,7 +256,7 @@
      * object in the extra field. This is useful for applications that only need a small image.
      * If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri
      * value of EXTRA_OUTPUT.
-     * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through
+     * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through
      * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must
      * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications.
      * If you don't set a ClipData, it will be copied there for you when calling
@@ -281,7 +281,7 @@
      * object in the extra field. This is useful for applications that only need a small image.
      * If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri
      * value of EXTRA_OUTPUT.
-     * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through
+     * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through
      * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must
      * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications.
      * If you don't set a ClipData, it will be copied there for you when calling
@@ -304,7 +304,7 @@
      * where the video is written. If EXTRA_OUTPUT is not present the video will be
      * written to the standard location for videos, and the Uri of that location will be
      * returned in the data field of the Uri.
-     * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through
+     * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through
      * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must
      * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications.
      * If you don't set a ClipData, it will be copied there for you when calling
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 5d6acd8..3d39b18 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -268,9 +268,9 @@
      *     {@link android.app.NotificationManager#notify(String, int, android.app.Notification)}.
      * <p>
      * @deprecated Use {@link #cancelNotification(String key)}
-     * instead. Beginning with {@link android.os.Build.VERSION_CODES#L} this method will no longer
+     * instead. Beginning with {@link android.os.Build.VERSION_CODES#LOLLIPOP} this method will no longer
      * cancel the notification. It will continue to cancel the notification for applications
-     * whose {@code targetSdkVersion} is earlier than {@link android.os.Build.VERSION_CODES#L}.
+     * whose {@code targetSdkVersion} is earlier than {@link android.os.Build.VERSION_CODES#LOLLIPOP}.
      */
     public final void cancelNotification(String pkg, String tag, int id) {
         if (!isBound()) return;
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index dffcca4..5926d5f 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -211,7 +211,7 @@
             // system context), assume we want hardware acceleration.
             final Context context = view.getContext();
             if (context != null
-                    && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.L) {
+                    && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
                 wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
             }
         }
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index de7d2d0..20ef646 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -17,7 +17,6 @@
 package android.webkit;
 
 import android.net.WebAddress;
-import android.webkit.ValueCallback;
 
 /**
  * Manages the cookies used by an application's {@link WebView} instances.
@@ -81,7 +80,7 @@
      * <p>
      * Apps that target {@link android.os.Build.VERSION_CODES#KITKAT} or below
      * default to allowing third party cookies. Apps targeting
-     * {@link android.os.Build.VERSION_CODES#L} or later default to disallowing
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP} or later default to disallowing
      * third party cookies.
      *
      * @param webview the {@link WebView} instance to set the cookie policy on
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 6d7c803..db8fc6f 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1461,7 +1461,7 @@
      *
      * By default, apps that target {@link android.os.Build.VERSION_CODES#KITKAT} or below default
      * to {@link #MIXED_CONTENT_ALWAYS_ALLOW}. Apps targeting
-     * {@link android.os.Build.VERSION_CODES#L} default to {@link #MIXED_CONTENT_NEVER_ALLOW}.
+     * {@link android.os.Build.VERSION_CODES#LOLLIPOP} default to {@link #MIXED_CONTENT_NEVER_ALLOW}.
      *
      * The preferred and most secure mode of operation for the WebView is
      * {@link #MIXED_CONTENT_NEVER_ALLOW} and use of {@link #MIXED_CONTENT_ALWAYS_ALLOW} is
@@ -1482,7 +1482,7 @@
 
     /**
      * Sets whether to use a video overlay for embedded encrypted video.
-     * In API levels prior to {@link android.os.Build.VERSION_CODES#L}, encrypted video can
+     * In API levels prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, encrypted video can
      * only be rendered directly on a secure video surface, so it had been a hard problem to play
      * encrypted video in HTML.  When this flag is on, WebView can play encrypted video (MSE/EME)
      * by using a video overlay (aka hole-punching) for videos embedded using HTML &lt;video&gt;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 081bfdf..40aee96 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -25,7 +25,6 @@
 import android.graphics.Picture;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
-import android.net.Uri;
 import android.net.http.SslCertificate;
 import android.os.Build;
 import android.os.Bundle;
@@ -1754,7 +1753,7 @@
      * safety.
      * </li>
      * <li> The Java object's fields are not accessible.</li>
-     * <li> For applications targeted to API level {@link android.os.Build.VERSION_CODES#L}
+     * <li> For applications targeted to API level {@link android.os.Build.VERSION_CODES#LOLLIPOP}
      * and above, methods of injected Java objects are enumerable from
      * JavaScript.</li>
      * </ul>
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 128a06c..936da32 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -82,7 +82,6 @@
 import android.view.DragEvent;
 import android.view.Gravity;
 import android.view.HardwareCanvas;
-import android.view.HardwareRenderer;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -2793,7 +2792,7 @@
         @Override
         public boolean onCreateActionMode(ActionMode mode, Menu menu) {
             final boolean legacy = mTextView.getContext().getApplicationInfo().targetSdkVersion <
-                    Build.VERSION_CODES.L;
+                    Build.VERSION_CODES.LOLLIPOP;
             final Context context = !legacy && menu instanceof MenuBuilder ?
                     ((MenuBuilder) menu).getContext() :
                     mTextView.getContext();
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index 98d52ff..0d76239 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -417,7 +417,7 @@
      * {@link Adapter#getItemViewType(int) getItemViewType(int)} on the object
      * returned from {@link #getAdapter()} will always return 0. Calling
      * {@link Adapter#getViewTypeCount() getViewTypeCount()} will always return
-     * 1. On API {@link Build.VERSION_CODES#L} and above, attempting to set an
+     * 1. On API {@link Build.VERSION_CODES#LOLLIPOP} and above, attempting to set an
      * adapter with more than one view type will throw an
      * {@link IllegalArgumentException}.
      *
@@ -434,7 +434,7 @@
         mRecycler.clear();
 
         final int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion;
-        if (targetSdkVersion >= Build.VERSION_CODES.L
+        if (targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP
                 && adapter != null && adapter.getViewTypeCount() != 1) {
             throw new IllegalArgumentException("Spinner adapter view type count must be 1");
         }
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java
index abd1791..f92fd55 100644
--- a/core/java/com/android/internal/app/PlatLogoActivity.java
+++ b/core/java/com/android/internal/app/PlatLogoActivity.java
@@ -16,124 +16,199 @@
 
 package com.android.internal.app;
 
+import android.animation.ObjectAnimator;
 import android.app.Activity;
 import android.content.ActivityNotFoundException;
 import android.content.ContentResolver;
-import android.content.Context;
 import android.content.Intent;
-import android.graphics.Color;
-import android.graphics.Typeface;
-import android.os.Build;
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Outline;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.RippleDrawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.shapes.OvalShape;
 import android.os.Bundle;
 import android.provider.Settings;
-import android.util.AttributeSet;
 import android.util.DisplayMetrics;
+import android.util.Log;
 import android.view.Gravity;
 import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewOutlineProvider;
+import android.view.animation.PathInterpolator;
 import android.widget.FrameLayout;
-import android.widget.TextView;
+import android.widget.ImageView;
 
 public class PlatLogoActivity extends Activity {
-    private static class Torso extends FrameLayout {
-        boolean mAnimate = false;
-        TextView mText;
+    final static int[] FLAVORS = {
+            0xFF9C27B0, 0xFFBA68C8, // grape
+            0xFFFF9800, 0xFFFFB74D, // orange
+            0xFFF06292, 0xFFF8BBD0, // bubblegum
+            0xFFAFB42B, 0xFFCDDC39, // lime
+            0xFFFFEB3B, 0xFFFFF176, // lemon
+            0xFF795548, 0xFFA1887F, // mystery flavor
+    };
+    FrameLayout mLayout;
+    int mTapCount;
+    PathInterpolator mInterpolator = new PathInterpolator(0f, 0f, 0.5f, 1f);
 
-        public Torso(Context context) {
-            this(context, null);
-        }
-        public Torso(Context context, AttributeSet attrs) {
-            this(context, attrs, 0);
-        }
-        public Torso(Context context, AttributeSet attrs, int flags) {
-            super(context, attrs, flags);
+    static int newColorIndex() {
+        return 2*((int) (Math.random()*FLAVORS.length/2));
+    }
 
-            for (int i=0; i<2; i++) {
-                final View v = new View(context);
-                v.setBackgroundColor(i % 2 == 0 ? Color.BLUE : Color.RED);
-                addView(v);
-            }
-
-            mText = new TextView(context);
-            mText.setTextColor(Color.BLACK);
-            mText.setTextSize(14 /* sp */);
-            mText.setTypeface(Typeface.create("monospace", Typeface.BOLD));
-
-            addView(mText, new FrameLayout.LayoutParams(
-                    FrameLayout.LayoutParams.MATCH_PARENT,
-                    FrameLayout.LayoutParams.WRAP_CONTENT,
-                    Gravity.BOTTOM | Gravity.LEFT
-            ));
-        }
-
-        private Runnable mRunnable = new Runnable() {
-            @Override
-            public void run() {
-                mText.setText(String.format("android_%s.flv - build %s",
-                        Build.VERSION.CODENAME,
-                        Build.VERSION.INCREMENTAL));
-                final int N = getChildCount();
-                final float parentw = getMeasuredWidth();
-                final float parenth = getMeasuredHeight();
-                for (int i=0; i<N; i++) {
-                    final View v = getChildAt(i);
-                    if (v instanceof TextView) continue;
-
-                    final int w = (int) (Math.random() * parentw);
-                    final int h = (int) (Math.random() * parenth);
-                    v.setLayoutParams(new FrameLayout.LayoutParams(w, h));
-
-                    v.setX((float) Math.random() * (parentw - w));
-                    v.setY((float) Math.random() * (parenth - h));
-                }
-
-                if (mAnimate) postDelayed(this, 1000);
-            }
-        };
-        @Override
-        protected void onAttachedToWindow() {
-            mAnimate = true;
-            post(mRunnable);
-        }
-        @Override
-        protected void onDetachedFromWindow() {
-            mAnimate = false;
-            removeCallbacks(mRunnable);
-        }
+    Drawable makeRipple() {
+        final int idx = newColorIndex();
+        final ShapeDrawable popbg = new ShapeDrawable(new OvalShape());
+        popbg.getPaint().setColor(FLAVORS[idx]);
+        final RippleDrawable ripple = new RippleDrawable(
+                ColorStateList.valueOf(FLAVORS[idx+1]),
+                popbg, null);
+        return ripple;
     }
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        final Torso t = new Torso(this);
-        t.setBackgroundColor(Color.WHITE);
+        mLayout = new FrameLayout(this);
+        setContentView(mLayout);
+    }
 
-        t.getChildAt(0)
-                .setOnLongClickListener(new View.OnLongClickListener() {
+    @Override
+    public void onAttachedToWindow() {
+        final DisplayMetrics dm = getResources().getDisplayMetrics();
+        final float dp = dm.density;
+        final int size = (int)
+                (Math.min(Math.min(dm.widthPixels, dm.heightPixels), 600*dp) - 100*dp);
+
+        final View stick = new View(this) {
+            Paint mPaint = new Paint();
+            Path mShadow = new Path();
+
+            @Override
+            public void onAttachedToWindow() {
+                super.onAttachedToWindow();
+                setWillNotDraw(false);
+                setOutlineProvider(new ViewOutlineProvider() {
                     @Override
-                    public boolean onLongClick(View v) {
-                        final ContentResolver cr = getContentResolver();
-                        if (Settings.System.getLong(cr, Settings.System.EGG_MODE, 0)
-                                == 0) {
-                            // For posterity: the moment this user unlocked the easter egg
-                            Settings.System.putLong(cr,
-                                    Settings.System.EGG_MODE,
-                                    System.currentTimeMillis());
-                        }
-                        try {
-                            startActivity(new Intent(Intent.ACTION_MAIN)
-                                    .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
-                                            | Intent.FLAG_ACTIVITY_CLEAR_TASK
-                                            | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
-                                    .addCategory("com.android.internal.category.PLATLOGO"));
-                        } catch (ActivityNotFoundException ex) {
-                            android.util.Log.e("PlatLogoActivity", "Couldn't catch a break.");
-                        }
-                        finish();
-                        return true;
+                    public void getOutline(View view, Outline outline) {
+                        outline.setRect(0, getHeight() / 2, getWidth(), getHeight());
                     }
                 });
+            }
+            @Override
+            public void onDraw(Canvas c) {
+                final int w = c.getWidth();
+                final int h = c.getHeight() / 2;
+                c.translate(0, h);
+                final GradientDrawable g = new GradientDrawable();
+                g.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT);
+                g.setGradientCenter(w * 0.75f, 0);
+                g.setColors(new int[] { 0xFFFFFFFF, 0xFFAAAAAA });
+                g.setBounds(0, 0, w, h);
+                g.draw(c);
+                mPaint.setColor(0xFFAAAAAA);
+                mShadow.reset();
+                mShadow.moveTo(0,0);
+                mShadow.lineTo(w, 0);
+                mShadow.lineTo(w, size/2 + 1.5f*w);
+                mShadow.lineTo(0, size/2);
+                mShadow.close();
+                c.drawPath(mShadow, mPaint);
+            }
+        };
+        mLayout.addView(stick, new FrameLayout.LayoutParams((int) (32 * dp),
+                ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER_HORIZONTAL));
+        stick.setAlpha(0f);
 
-        setContentView(t);
+        final ImageView im = new ImageView(this);
+        im.setTranslationZ(20);
+        im.setScaleX(0);
+        im.setScaleY(0);
+        final Drawable platlogo = getDrawable(com.android.internal.R.drawable.platlogo);
+        platlogo.setAlpha(0);
+        im.setImageDrawable(platlogo);
+        im.setBackground(makeRipple());
+        im.setClickable(true);
+        final ShapeDrawable highlight = new ShapeDrawable(new OvalShape());
+        highlight.getPaint().setColor(0x10FFFFFF);
+        highlight.setBounds((int)(size*.15f), (int)(size*.15f),
+                            (int)(size*.6f), (int)(size*.6f));
+        im.getOverlay().add(highlight);
+        im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mTapCount == 0) {
+                    im.animate()
+                            .translationZ(40)
+                            .scaleX(1)
+                            .scaleY(1)
+                            .setInterpolator(mInterpolator)
+                            .setDuration(700)
+                            .setStartDelay(500)
+                            .start();
+
+                    final ObjectAnimator a = ObjectAnimator.ofInt(platlogo, "alpha", 0, 255);
+                    a.setInterpolator(mInterpolator);
+                    a.setStartDelay(1000);
+                    a.start();
+
+                    stick.animate()
+                            .translationZ(20)
+                            .alpha(1)
+                            .setInterpolator(mInterpolator)
+                            .setDuration(700)
+                            .setStartDelay(750)
+                            .start();
+
+                    im.setOnLongClickListener(new View.OnLongClickListener() {
+                        @Override
+                        public boolean onLongClick(View v) {
+                            if (mTapCount < 5) return false;
+
+                            final ContentResolver cr = getContentResolver();
+                            if (Settings.System.getLong(cr, Settings.System.EGG_MODE, 0)
+                                    == 0) {
+                                // For posterity: the moment this user unlocked the easter egg
+                                Settings.System.putLong(cr,
+                                        Settings.System.EGG_MODE,
+                                        System.currentTimeMillis());
+                            }
+                            im.post(new Runnable() {
+                                @Override
+                                public void run() {
+                                    try {
+                                        startActivity(new Intent(Intent.ACTION_MAIN)
+                                                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                                                        | Intent.FLAG_ACTIVITY_CLEAR_TASK
+                                                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
+                                                .addCategory("com.android.internal.category.PLATLOGO"));
+                                    } catch (ActivityNotFoundException ex) {
+                                        Log.e("PlatLogoActivity", "No more eggs.");
+                                    }
+                                    finish();
+                                }
+                            });
+                            return true;
+                        }
+                    });
+                } else {
+                    im.setBackground(makeRipple());
+                }
+                mTapCount++;
+            }
+        });
+
+        mLayout.addView(im, new FrameLayout.LayoutParams(size, size, Gravity.CENTER));
+
+        im.animate().scaleX(0.3f).scaleY(0.3f)
+                .setInterpolator(mInterpolator)
+                .setDuration(500)
+                .setStartDelay(800)
+                .start();
     }
 }
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 5685ad7..aa55d23 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -25,7 +25,6 @@
 import android.text.TextUtils;
 import android.util.Slog;
 import android.widget.AbsListView;
-import android.widget.GridView;
 import com.android.internal.R;
 import com.android.internal.content.PackageMonitor;
 
@@ -487,7 +486,7 @@
     }
 
     private boolean versionNumberAtLeastL(int versionNumber) {
-        return versionNumber >= Build.VERSION_CODES.L;
+        return versionNumber >= Build.VERSION_CODES.LOLLIPOP;
     }
 
     private void setAlwaysButtonEnabled(boolean hasValidSelection, int checkedPos,
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 6d78127..937f83a 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2900,6 +2900,7 @@
         </activity>
         <activity android:name="com.android.internal.app.PlatLogoActivity"
                 android:theme="@style/Theme.Wallpaper.NoTitleBar.Fullscreen"
+                android:configChanges="orientation|keyboardHidden"
                 android:process=":ui">
         </activity>
         <activity android:name="com.android.internal.app.DisableCarModeActivity"
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index fb52830..65cb046 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -1,10 +1,11 @@
 <!--
-    Copyright (C) 2014 The Android Open Source Project
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at"+
+Copyright (C) 2014 The Android Open Source Project
 
-    http://www.apache.org/licenses/LICENSE-2.0
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,31 +13,36 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="400dp"
-        android:height="400dp"
-        android:viewportHeight="25"
-        android:viewportWidth="25" >
-
+        android:width="560.0dp"
+        android:height="560.0dp"
+        android:viewportWidth="560.0"
+        android:viewportHeight="560.0">
     <path
-        android:name="torso"
-        android:pathData="m2,2 l21,0 l0,21 l-21,0 z"
-        android:fillColor="#FFFFFFFF"
-        />
-
+        android:pathData="M264.079987,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L264.559998,339.0l-11.32,0.0l0.0,-98.269997L264.079987,240.731zM265.809998,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C280.51,250.169998 271.0,256.059998 265.809998,264.869995z"
+        android:fillColor="#FFFFFF"/>
     <path
-        android:name="|"
-        android:pathData="m4,4 l8,0 l0,17 l-8,0 z"
-        android:fillColor="#FF0000FF"
-        />
-
+        android:pathData="M445.731,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L446.210052,339.0l-11.32,0.0l0.0,-98.269997L445.731,240.731zM447.459991,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C462.160004,250.169998 452.649994,256.059998 447.459991,264.869995z"
+        android:fillColor="#FFFFFF"/>
     <path
-        android:name="_"
-        android:pathData="m5,14 l16,0 l0,6 l-16,0 z"
-        android:fillColor="#FFFF0000"
-        />
-
+        android:pathData="M169.490005,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C151.169998,239.0 169.490005,257.399994 169.490005,279.880005zM158.089996,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C144.960007,309.8387 158.089996,296.309998 158.089996,280.040009z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M423.790009,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C405.470,239.0 423.790009,257.399994 423.790009,279.880005zM412.395,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C399.26,309.8387 412.395,296.309998 412.395,280.040009z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M229.02,221.0l11.17,0.0l0.0,11.48l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M229.02,240.65l11.17,0.0l0.0,78.62l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M65.4,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M180.58,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M204.8,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
 </vector>
-
-
diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml
index 1fee2df..d89d1f9 100644
--- a/core/res/res/drawable-nodpi/stat_sys_adb.xml
+++ b/core/res/res/drawable-nodpi/stat_sys_adb.xml
@@ -1,10 +1,11 @@
 <!--
-    Copyright (C) 2014 The Android Open Source Project
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at"+
+Copyright (C) 2014 The Android Open Source Project
 
-    http://www.apache.org/licenses/LICENSE-2.0
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
 
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,33 +13,15 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="25dp"
-        android:height="25dp"
-        android:viewportHeight="25"
-        android:viewportWidth="25" >
-
+        android:width="24.0dp"
+        android:height="24.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
     <path
-        android:name="L-card"
-
-        android:pathData="
-        m4,2
-        a2,2,0,0,0,-2,2 l0,17
-        a2,2,0,0,0,2,2  l17,0
-        a2,2,0,0,0,2,-2 l0,-17
-        a2,2,0,0,0,-2,-2
-        z
-
-        M7,2 l3,0 l0,13 l13,0 l0,3 l-16,0
-
-        M15,2 l3,0 l0,5 l5,0 l0,3 l-8,0
-
-        z"
-        android:fillColor="#FFFFFFFF"
-        />
-
-
+        android:pathData="M19.000000,10.000000c0.000000,3.866000 -3.134000,7.000000 -7.000000,7.000000s-7.000000,-3.134000 -7.000000,-7.000000c0.000000,-2.318000 1.131000,-4.367000 2.867000,-5.641000L5.778000,2.270000l0.824000,-0.825000l2.290000,2.290000C9.830000,3.269000 10.882000,3.000000 12.000000,3.000000c1.118000,0.000000 2.170000,0.269000 3.107000,0.734000l2.290000,-2.290000l0.824000,0.825000l-2.089000,2.090000C17.868000,5.633000 19.000000,7.682000 19.000000,10.000000zM10.000000,8.000000c0.000000,-0.552000 -0.447000,-1.000000 -1.000000,-1.000000S8.000000,7.448000 8.000000,8.000000s0.447000,1.000000 1.000000,1.000000S10.000000,8.552000 10.000000,8.000000zM16.000000,8.000000c0.000000,-0.552000 -0.447000,-1.000000 -1.000000,-1.000000s-1.000000,0.448000 -1.000000,1.000000s0.447000,1.000000 1.000000,1.000000S16.000000,8.552000 16.000000,8.000000z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M11,18l2,0l0,5l-2,0z"
+        android:fillColor="#FFFFFF"/>
 </vector>
-
-
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 8fc0ec6..417b48b 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1598,7 +1598,7 @@
     <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Umesahau Ruwaza"</string>
     <string name="kg_wrong_pattern" msgid="1850806070801358830">"Mchoro Usio sahihi"</string>
     <string name="kg_wrong_password" msgid="2333281762128113157">"Nenosiri Lisilo sahihi"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"PIN isiyo sahihi"</string>
+    <string name="kg_wrong_pin" msgid="1131306510833563801">"Nambari ya PIN si sahihi"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Jaribu tena baada ya sekunde <xliff:g id="NUMBER">%1$d</xliff:g>."</string>
     <string name="kg_pattern_instructions" msgid="398978611683075868">"Chora ruwaza yako"</string>
     <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Ingiza PIN ya SIM"</string>
diff --git a/docs/html/google/play-services/index.jd b/docs/html/google/play-services/index.jd
index e5479bb..9f6962d 100644
--- a/docs/html/google/play-services/index.jd
+++ b/docs/html/google/play-services/index.jd
@@ -65,7 +65,7 @@
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png"
     class="toggle-content-img"
-      alt=""/>Google Play services, Version 6.1</a> <em>(September 2014)</em>
+      alt=""/>Google Play services, Version 6.1</a> <em>(October 2014)</em>
   </p>
 
   <div class="toggle-content-toggleme">
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
index af466ab..7ad881a 100644
--- a/docs/html/preview/setup-sdk.jd
+++ b/docs/html/preview/setup-sdk.jd
@@ -206,6 +206,12 @@
 experimental 64-bit system images along with standard 32-bit system images.
 </p>
 
+<p class="note"><strong>Note:</strong> The 64-bit system images require the
+Intel x86 Emulator Accelerator (HAXM) Rev.5 which can be downloaded from the
+<a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> <em>Extras</em> 
+folder.</p>
+
+
 <h3 id="installImage">Install the L Preview System Image</h3>
 
 <p class="warning"><b>Warning:</b> This is a preview version of the Android
@@ -361,4 +367,4 @@
     }
   });
 
-</script>
\ No newline at end of file
+</script>
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 9ed70ed..d91e7e8 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -308,7 +308,7 @@
   If you're a new Android developer, you should consider starting with Android Studio, because the
   ADT plugin for Eclipse is no longer in active development.</p>
   <p style="margin: 0;">
-  <a href="/sdk/installing/studio.html">Learn more about Android Studio</a></p>
+  <a href="/sdk/installing/studio.html" style="position:relative;z-index:99">Learn more about Android Studio</a></p>
   </div>
 
 
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index c2aaae8..b9803e4 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -25,9 +25,42 @@
 <p>For a summary of all known issues in SDK Tools, see <a
 href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
 
+
 <div class="toggle-content opened">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 23.0.4</a> <em>(October 2014)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <dl>
+    <dt>Dependencies:</dt>
+
+    <dd>
+      <ul>
+        <li>Android SDK Platform-tools revision 19 or later.</li>
+        <li>If you are developing in Eclipse with ADT, note that this version of SDK Tools is
+          designed for use with ADT 23.0.4 and later. If you haven't already, update your
+        <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 23.0.4.</li>
+        <li>If you are developing outside Eclipse, you must have
+          <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+      </ul>
+    </dd>
+
+    <dt>General Notes:</dt>
+    <dd>
+      <ul>
+        <li>Fixed duplicate devices in AVD for Wear and TV.</li>
+      </ul>
+    </dd>
+  </div>
+</div>
+
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
       alt=""/>SDK Tools, Revision 23.0.2</a> <em>(July 2014)</em>
   </p>
 
diff --git a/docs/html/training/wearables/ui/cards.jd b/docs/html/training/wearables/ui/cards.jd
index 0633720..21f7e5c 100644
--- a/docs/html/training/wearables/ui/cards.jd
+++ b/docs/html/training/wearables/ui/cards.jd
@@ -167,3 +167,9 @@
     cardScrollView.setCardGravity(Gravity.BOTTOM);
 }
 </pre>
+
+<p><code>CardScrollView</code> detects the shape of the screen and displays the card differently
+on round and square devices, using wider side margins on round screens. However,
+placing the <code>CardScrollView</code> element inside a <code>BoxInsetLayout</code> and using the
+<code>layout_box="bottom"</code> attribute is useful to align the card to the bottom of round
+screens without cropping its content.</p>
diff --git a/docs/html/training/wearables/ui/exit.jd b/docs/html/training/wearables/ui/exit.jd
index b89711a..84e1e45 100644
--- a/docs/html/training/wearables/ui/exit.jd
+++ b/docs/html/training/wearables/ui/exit.jd
@@ -28,7 +28,7 @@
 You must also inform your users the first time they run your app that they can exit using
 a long press.</p>
 
-<p>For design guidelines on exiting Android Wear activities, see
+<p>For design guidelines about exiting Android Wear activities, see
 <a href="{@docRoot}design/wear/structure.html#Custom">Breaking out of the card</a>.</p>
 
 
diff --git a/docs/html/training/wearables/ui/lists.jd b/docs/html/training/wearables/ui/lists.jd
index 5458541..e8aaed4 100644
--- a/docs/html/training/wearables/ui/lists.jd
+++ b/docs/html/training/wearables/ui/lists.jd
@@ -172,8 +172,9 @@
 definition uses the custom layout implementation from the previous section and defines an icon
 and a text view whose IDs match those in the layout implementation class:</p>
 
+<p class="code-caption">res/layout/list_item.xml</p>
+
 <pre>
-&lt;-- res/layout/list_item.xml -->
 &lt;com.example.android.support.wearable.notifications.WearableListItemLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:gravity="center_vertical"
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index eda1a5d..da58884 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -260,7 +260,7 @@
         public boolean inScaled;
 
         /**
-         * @deprecated As of {@link android.os.Build.VERSION_CODES#L}, this is
+         * @deprecated As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this is
          * ignored.
          *
          * In {@link android.os.Build.VERSION_CODES#KITKAT} and below, if this
@@ -295,7 +295,7 @@
         public boolean inPurgeable;
 
         /**
-         * @deprecated As of {@link android.os.Build.VERSION_CODES#L}, this is
+         * @deprecated As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this is
          * ignored.
          *
          * In {@link android.os.Build.VERSION_CODES#KITKAT} and below, this
diff --git a/graphics/java/android/graphics/Picture.java b/graphics/java/android/graphics/Picture.java
index d28c3d5..fa9af2a 100644
--- a/graphics/java/android/graphics/Picture.java
+++ b/graphics/java/android/graphics/Picture.java
@@ -111,7 +111,7 @@
     /**
      * Draw this picture on the canvas.
      * <p>
-     * Prior to {@link android.os.Build.VERSION_CODES#L}, this call could
+     * Prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this call could
      * have the side effect of changing the matrix and clip of the canvas
      * if this picture had imbalanced saves/restores.
      *
diff --git a/graphics/java/android/graphics/drawable/ColorDrawable.java b/graphics/java/android/graphics/drawable/ColorDrawable.java
index 0608065..1253c46 100644
--- a/graphics/java/android/graphics/drawable/ColorDrawable.java
+++ b/graphics/java/android/graphics/drawable/ColorDrawable.java
@@ -157,7 +157,7 @@
     /**
      * Sets the color filter applied to this color.
      * <p>
-     * Only supported on version {@link android.os.Build.VERSION_CODES#L} and
+     * Only supported on version {@link android.os.Build.VERSION_CODES#LOLLIPOP} and
      * above. Calling this method has no effect on earlier versions.
      *
      * @see android.graphics.drawable.Drawable#setColorFilter(ColorFilter)
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 0445869..ed408e0 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -1112,7 +1112,7 @@
      * {@link #requestLocationUpdates(String, long, float, LocationListener)}.
      *
      * <p>
-     * Before API version {@link android.os.Build.VERSION_CODES#L}, this
+     * Before API version {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this
      * method would throw {@link SecurityException} if the location permissions
      * were not sufficient to use the specified provider.
      *
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 96ce2c1..5aee2e8 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -76,6 +76,7 @@
 import android.view.Surface;
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityManager;
+import android.view.OrientationEventListener;
 
 import com.android.internal.telephony.ITelephony;
 import com.android.internal.util.XmlUtils;
@@ -510,6 +511,8 @@
     // If absolute volume is supported in AVRCP device
     private boolean mAvrcpAbsVolSupported = false;
 
+    private AudioOrientationEventListener mOrientationListener;
+
     ///////////////////////////////////////////////////////////////////////////
     // Construction
     ///////////////////////////////////////////////////////////////////////////
@@ -618,6 +621,10 @@
             mDeviceRotation = ((WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE))
                     .getDefaultDisplay().getRotation();
             Log.v(TAG, "monitoring device rotation, initial=" + mDeviceRotation);
+
+            mOrientationListener = new AudioOrientationEventListener(mContext);
+            mOrientationListener.enable();
+
             // initialize rotation in AudioSystem
             setRotationForAudioSystem();
         }
@@ -903,6 +910,25 @@
         return (index * mStreamStates[dstStream].getMaxIndex() + mStreamStates[srcStream].getMaxIndex() / 2) / mStreamStates[srcStream].getMaxIndex();
     }
 
+    private class AudioOrientationEventListener
+            extends OrientationEventListener {
+        public AudioOrientationEventListener(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void onOrientationChanged(int orientation) {
+            //Even though we're responding to phone orientation events,
+            //use display rotation so audio stays in sync with video/dialogs
+            int newRotation = ((WindowManager) mContext.getSystemService(
+                    Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
+            if (newRotation != mDeviceRotation) {
+                mDeviceRotation = newRotation;
+                setRotationForAudioSystem();
+            }
+        }
+    }
+
     ///////////////////////////////////////////////////////////////////////////
     // IPC methods
     ///////////////////////////////////////////////////////////////////////////
@@ -4828,8 +4854,16 @@
                     sendStickyBroadcastToAll(newIntent);
                 }
             } else if (action.equals(Intent.ACTION_SCREEN_ON)) {
+                if (mMonitorRotation) {
+                    mOrientationListener.onOrientationChanged(0); //argument is ignored anyway
+                    mOrientationListener.enable();
+                }
                 AudioSystem.setParameters("screen_state=on");
             } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
+                if (mMonitorRotation) {
+                    //reduce wakeups (save current) by only listening when display is on
+                    mOrientationListener.disable();
+                }
                 AudioSystem.setParameters("screen_state=off");
             } else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
                 handleConfigurationChanged(context);
@@ -4932,14 +4966,6 @@
                     setOrientationForAudioSystem();
                 }
             }
-            if (mMonitorRotation) {
-                int newRotation = ((WindowManager) context.getSystemService(
-                        Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
-                if (newRotation != mDeviceRotation) {
-                    mDeviceRotation = newRotation;
-                    setRotationForAudioSystem();
-                }
-            }
             sendMsg(mAudioHandler,
                     MSG_CONFIGURE_SAFE_MEDIA_VOLUME,
                     SENDMSG_REPLACE,
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
index e6c9e6c..dfea166 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
@@ -295,8 +295,14 @@
     @Override
     public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
         // Check if this was the result of hitting the enter key
-        if (actionId == EditorInfo.IME_NULL || actionId == EditorInfo.IME_ACTION_DONE
-                || actionId == EditorInfo.IME_ACTION_NEXT) {
+        final boolean isSoftImeEvent = event == null
+                && (actionId == EditorInfo.IME_NULL
+                || actionId == EditorInfo.IME_ACTION_DONE
+                || actionId == EditorInfo.IME_ACTION_NEXT);
+        final boolean isKeyboardEnterKey = event != null
+                && KeyEvent.isConfirmKey(event.getKeyCode())
+                && event.getAction() == KeyEvent.ACTION_DOWN;
+        if (isSoftImeEvent || isKeyboardEnterKey) {
             verifyPasswordAndUnlock();
             return true;
         }
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index eeb79b9..b3e60d1 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -121,7 +121,7 @@
         android:allowBackup="false"
         android:hardwareAccelerated="true"
         android:label="@string/app_label"
-        android:icon="@*android:drawable/platlogo"
+        android:icon="@drawable/icon"
         android:process="com.android.systemui"
         android:supportsRtl="true"
         android:theme="@style/systemui_theme">
@@ -288,7 +288,7 @@
         </activity>
 
         <activity android:name=".egg.LLandActivity"
-                  android:theme="@android:style/Theme.Material.Light.NoActionBar.TranslucentDecor"
+                  android:theme="@android:style/Theme.Material.Light.NoActionBar"
                   android:exported="true"
                   android:label="@string/lland"
                   android:hardwareAccelerated="true"
diff --git a/packages/SystemUI/res/drawable-nodpi/icon.xml b/packages/SystemUI/res/drawable-nodpi/icon.xml
new file mode 100644
index 0000000..dc1e633
--- /dev/null
+++ b/packages/SystemUI/res/drawable-nodpi/icon.xml
@@ -0,0 +1,60 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="48dp"
+        android:height="48dp"
+        android:viewportWidth="560.0"
+        android:viewportHeight="560.0">
+    <path
+        android:pathData="M280.000000,288.000000m-260.000000,0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,520.000000 0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,-520.000000 0.000000"
+        android:fillColor="#14000000"/>
+    <path
+        android:pathData="M280.000000,285.000000m-255.000000,0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,510.000000 0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,-510.000000 0.000000"
+        android:fillColor="#26000000"/>
+    <path
+        android:pathData="M280.000000,282.000000m-252.000000,0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,504.000000 0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,-504.000000 0.000000"
+        android:fillColor="#26000000"/>
+    <path
+        android:pathData="M280.000000,280.000000m-250.000000,0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,500.000000 0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,-500.000000 0.000000"
+        android:fillColor="#9C27B0"/>
+    <path
+        android:pathData="M265.786011,244.938004l0.000000,8.768000c6.527000,-6.384000 15.303000,-10.321000 25.063000,-10.321000c20.214001,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.215000,36.500000 -36.429001,36.500000c-9.759000,0.000000 -18.107000,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L265.786011,244.937988L265.786011,244.938004zM267.330994,266.490997c-0.420000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.197000,13.339000 22.882999,13.339000c14.671000,0.000000 26.742001,-11.999000 26.742001,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.742001,-26.607000C280.454987,253.365997 271.963989,258.625000 267.330994,266.490997z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M427.973999,244.938004l0.000000,8.768000c6.526000,-6.384000 15.304000,-10.321000 25.062000,-10.321000c20.215000,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.214001,36.500000 -36.429001,36.500000c-9.758000,0.000000 -18.106001,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L427.973999,244.937988L427.973999,244.938004zM429.518005,266.490997c-0.419000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.196000,13.339000 22.884001,13.339000c14.670000,0.000000 26.740999,-11.999000 26.740999,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.740999,-26.607000C442.643005,253.365997 434.152008,258.625000 429.518005,266.490997z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M181.330994,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.438000,36.715000c-20.214001,0.000000 -36.643002,-16.500999 -36.643002,-36.715000c0.000000,-20.070999 16.419001,-36.500000 36.643002,-36.500000C164.973007,243.393005 181.330994,259.821014 181.330994,279.893005zM171.151993,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.259001,-26.669001c-14.741000,0.000000 -26.250000,12.000000 -26.250000,26.669001c0.000000,14.536000 11.509000,26.607000 26.250000,26.607000C159.429001,306.634003 171.151993,294.562012 171.151993,280.036011z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M408.384003,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.437000,36.715000c-20.215000,0.000000 -36.644001,-16.500999 -36.644001,-36.715000c0.000000,-20.070999 16.420000,-36.500000 36.644001,-36.500000C392.026001,243.393005 408.384003,259.821014 408.384003,279.893005zM398.204987,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.257999,-26.669001c-14.742000,0.000000 -26.250999,12.000000 -26.250999,26.669001c0.000000,14.536000 11.509000,26.607000 26.250999,26.607000C386.481995,306.634003 398.204987,294.562012 398.204987,280.036011z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M234.481995,227.320999l9.973000,0.000000l0.000000,10.250000l-9.973000,0.000000z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M234.481995,244.865997l9.973000,0.000000l0.000000,70.195999l-9.973000,0.000000z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M88.392998,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M191.231995,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M212.856995,227.320999l9.974000,0.000000l0.000000,87.740997l-9.974000,0.000000z"
+        android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable-nodpi/lollipop.xml b/packages/SystemUI/res/drawable-nodpi/lollipop.xml
new file mode 100644
index 0000000..cb63af0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-nodpi/lollipop.xml
@@ -0,0 +1,48 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.0apache.0org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.0android.0com/apk/res/android"
+        android:width="560.0dp"
+        android:height="560.0dp"
+        android:viewportWidth="560.0"
+        android:viewportHeight="560.0">
+    <path
+        android:pathData="M264.079987,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L264.559998,339.0l-11.32,0.0l0.0,-98.269997L264.079987,240.731zM265.809998,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C280.51,250.169998 271.0,256.059998 265.809998,264.869995z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M445.731,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L446.210052,339.0l-11.32,0.0l0.0,-98.269997L445.731,240.731zM447.459991,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C462.160004,250.169998 452.649994,256.059998 447.459991,264.869995z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M169.490005,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C151.169998,239.0 169.490005,257.399994 169.490005,279.880005zM158.089996,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C144.960007,309.8387 158.089996,296.309998 158.089996,280.040009z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M423.790009,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C405.470,239.0 423.790009,257.399994 423.790009,279.880005zM412.395,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C399.26,309.8387 412.395,296.309998 412.395,280.040009z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M229.02,221.0l11.17,0.0l0.0,11.48l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M229.02,240.65l11.17,0.0l0.0,78.62l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M65.4,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M180.58,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M204.8,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z"
+        android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/placeholder.xml b/packages/SystemUI/res/drawable/placeholder.xml
deleted file mode 100644
index 1933145..0000000
--- a/packages/SystemUI/res/drawable/placeholder.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-Copyright (C) 2014 The Android Open Source Project
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="100dp"
-        android:height="400dp"
-        android:viewportWidth="100"
-        android:viewportHeight="400">
-
-    <!-- future site of real artwork -->
-
-    <path android:fillColor="#FFFFFF00"
-        android:pathData="M 0,0 L 100,0 L 100,400 L 0,400 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,0 L 100,25 L 100,50 L 0,25 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,50 L 100,75 L 100,100 L 0,75 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,100 L 100,125 L 100,150 L 0,125 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,150 L 100,175 L 100,200 L 0,175 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,200 L 100,225 L 100,250 L 0,225 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,250 L 100,275 L 100,300 L 0,275 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,300 L 100,325 L 100,350 L 0,325 z" />
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M 0,350 L 100,375 L 100,400 L 0,375 z" />
-</vector>
-
diff --git a/packages/SystemUI/res/drawable/pop_belt.xml b/packages/SystemUI/res/drawable/pop_belt.xml
new file mode 100644
index 0000000..5c0c3d7
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_belt.xml
@@ -0,0 +1,33 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000m-47.599998,0.000000a47.599998,47.599998 0.000000,1.000000 1.000000,95.199997 0.000000a47.599998,47.599998 0.000000,1.000000 1.000000,-95.199997 0.000000"
+        android:fillColor="#D81B60"/>
+    <path
+        android:pathData="M50.000000,2.429000c-26.337999,0.000000 -47.688999,21.351000 -47.688999,47.688999c0.000000,13.168000 5.337000,25.091000 13.968000,33.722000l67.444000,-67.443001C75.092003,7.766000 63.168999,2.429000 50.000000,2.429000z"
+        android:fillColor="#F06292"/>
+    <path
+        android:pathData="M0.000000,41.573002l100.000000,0.000000l0.000000,17.090000l-100.000000,0.000000z"
+        android:fillColor="#D81B60"/>
+    <path
+        android:pathData="M0.000000,58.662998l0.000000,-17.089996 100.000000,0.000000z"
+        android:fillColor="#F06292"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_droid.xml b/packages/SystemUI/res/drawable/pop_droid.xml
new file mode 100644
index 0000000..eed325c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_droid.xml
@@ -0,0 +1,33 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000m-50.000000,0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,100.000000 0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,-100.000000 0.000000"
+        android:fillColor="#9E9D24"/>
+    <path
+        android:pathData="M30.775999,24.528000m-4.209000,0.000000a4.209000,4.209000 0.000000,1.000000 1.000000,8.418000 0.000000a4.209000,4.209000 0.000000,1.000000 1.000000,-8.418000 0.000000"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M69.226997,24.528000m-4.210000,0.000000a4.210000,4.210000 0.000000,1.000000 1.000000,8.420000 0.000000a4.210000,4.210000 0.000000,1.000000 1.000000,-8.420000 0.000000"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M85.352997,14.648000C65.829002,-4.877000 34.168999,-4.877000 14.646000,14.646000C4.882000,24.410000 0.002000,37.207001 0.000000,50.000999l99.996002,0.002000C99.996002,37.207001 95.115997,24.410000 85.352997,14.648000z"
+        android:fillColor="#C0CA33"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_pizza.xml b/packages/SystemUI/res/drawable/pop_pizza.xml
new file mode 100644
index 0000000..b6d2bb3
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_pizza.xml
@@ -0,0 +1,45 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M14.645000,14.645000C5.597000,23.693001 0.000000,36.193001 0.000000,50.000000l50.000000,0.000000L14.645000,14.645000z"
+        android:fillColor="#7BAAF7"/>
+    <path
+        android:pathData="M100.000000,50.000000c0.000000,-13.807000 -5.597000,-26.306999 -14.645000,-35.355000L50.000000,50.000000L100.000000,50.000000z"
+        android:fillColor="#D81B60"/>
+    <path
+        android:pathData="M85.355003,14.645000C76.306999,5.597000 63.806999,0.000000 50.000000,0.000000l0.000000,50.000000L85.355003,14.645000z"
+        android:fillColor="#F06292"/>
+    <path
+        android:pathData="M50.000000,0.000000C36.193001,0.000000 23.693001,5.597000 14.645000,14.645000L50.000000,50.000000L50.000000,0.000000z"
+        android:fillColor="#FFF176"/>
+    <path
+        android:pathData="M50.000000,50.000000l35.355000,35.355000C94.403000,76.307999 100.000000,63.807999 100.000000,50.000000L50.000000,50.000000z"
+        android:fillColor="#7BAAF7"/>
+    <path
+        android:pathData="M50.000000,100.000000c13.807000,0.000000 26.306999,-5.596000 35.355000,-14.645000L50.000000,50.000000L50.000000,100.000000z"
+        android:fillColor="#FFF176"/>
+    <path
+        android:pathData="M14.645000,85.355003C23.693001,94.403999 36.193001,100.000000 50.000000,100.000000L50.000000,50.000000L14.645000,85.355003z"
+        android:fillColor="#F06292"/>
+    <path
+        android:pathData="M0.000000,50.000000c0.000000,13.808000 5.597000,26.308001 14.645000,35.355000L50.000000,50.000000L0.000000,50.000000z"
+        android:fillColor="#D81B60"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_stripes.xml b/packages/SystemUI/res/drawable/pop_stripes.xml
new file mode 100644
index 0000000..ef6c8e8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_stripes.xml
@@ -0,0 +1,36 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000m-50.000000,0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,100.000000 0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,-100.000000 0.000000"
+        android:fillColor="#F57C00"/>
+    <path
+        android:pathData="M50.000999,100.000000c14.136000,0.000000 26.893000,-5.876000 35.987000,-15.308000L14.013000,84.692001C23.106001,94.124001 35.862999,100.000000 50.000999,100.000000z"
+        android:fillColor="#E65100"/>
+    <path
+        android:pathData="M50.000999,0.000000C35.862999,0.000000 23.106001,5.876000 14.013000,15.308000l71.974998,0.000000C76.893997,5.876000 64.137001,0.000000 50.000999,0.000000z"
+        android:fillColor="#FFA726"/>
+    <path
+        android:pathData="M96.501999,31.631001c-2.423000,-6.127000 -6.020000,-11.660000 -10.514000,-16.323000L14.013000,15.308001C9.517000,19.971001 5.922000,25.503000 3.499000,31.631001L96.501999,31.631001z"
+        android:fillColor="#FB8C00"/>
+    <path
+        android:pathData="M3.499000,68.370003c2.423000,6.128000 6.018000,11.658000 10.514000,16.322001l71.974998,0.000000c4.494000,-4.664000 8.091000,-10.194000 10.514000,-16.322001L3.499000,68.370003z"
+        android:fillColor="#EF6C00"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_swirl.xml b/packages/SystemUI/res/drawable/pop_swirl.xml
new file mode 100644
index 0000000..acd6d3d
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_swirl.xml
@@ -0,0 +1,57 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000C86.898003,27.834999 79.244003,11.688000 76.177002,7.399000c-7.240000,-4.459000 -15.703000,-7.112000 -24.770000,-7.363000C56.247002,2.253000 70.815002,12.456000 50.000000,50.000000z"
+        android:fillColor="#82B1FF"/>
+    <path
+        android:pathData="M50.000000,50.000000c20.815001,-37.543999 6.247000,-47.747002 1.407000,-49.964001C50.938000,0.022000 50.472000,0.000000 50.000000,0.000000c-8.627000,0.000000 -16.743999,2.186000 -23.827000,6.032000C31.392000,5.514000 49.251999,6.903000 50.000000,50.000000z"
+        android:fillColor="#76FF03"/>
+    <path
+        android:pathData="M50.000000,50.000000c37.543999,20.816000 47.747002,6.248000 49.965000,1.408000C99.977997,50.938000 100.000000,50.473000 100.000000,50.000000c0.000000,-8.627000 -2.186000,-16.743999 -6.032000,-23.827000C94.486000,31.393000 93.098000,49.251999 50.000000,50.000000z"
+        android:fillColor="#76FF03"/>
+    <path
+        android:pathData="M50.000000,50.000000c43.098000,-0.748000 44.486000,-18.607000 43.967999,-23.827000c-4.186000,-7.708000 -10.344000,-14.188000 -17.791000,-18.773001C79.244003,11.688000 86.898003,27.834999 50.000000,50.000000z"
+        android:fillColor="#303F9F"/>
+    <path
+        android:pathData="M50.000000,50.000000C27.834000,13.103000 11.687000,20.757000 7.398000,23.823999C2.940000,31.063000 0.287000,39.527000 0.035000,48.592999C2.253000,43.752998 12.456000,29.184999 50.000000,50.000000z"
+        android:fillColor="#FAFAFA"/>
+    <path
+        android:pathData="M50.000000,50.000000C49.251999,6.903000 31.392000,5.514000 26.173000,6.032000c-7.709000,4.187000 -14.188000,10.344000 -18.774000,17.792000C11.687000,20.757000 27.834000,13.103000 50.000000,50.000000z"
+        android:fillColor="#303F9F"/>
+    <path
+        android:pathData="M50.000000,50.000000C12.456000,29.184999 2.253000,43.752998 0.035000,48.592999C0.022000,49.062000 0.000000,49.528000 0.000000,50.000000c0.000000,8.628000 2.186000,16.743999 6.032000,23.827999C5.514000,68.609001 6.902000,50.749001 50.000000,50.000000z"
+        android:fillColor="#76FF03"/>
+    <path
+        android:pathData="M50.000000,50.000000c0.748000,43.098000 18.608000,44.486000 23.827000,43.969002c7.709000,-4.187000 14.188000,-10.344000 18.774000,-17.791000C88.313004,79.244003 72.166000,86.898003 50.000000,50.000000z"
+        android:fillColor="#303F9F"/>
+    <path
+        android:pathData="M50.000000,50.000000c22.166000,36.897999 38.313000,29.243999 42.602001,26.177999c4.458000,-7.240000 7.111000,-15.703000 7.363000,-24.770000C97.747002,56.248001 87.543999,70.816002 50.000000,50.000000z"
+        android:fillColor="#FAFAFA"/>
+    <path
+        android:pathData="M50.000000,50.000000c-20.815001,37.544998 -6.247000,47.748001 -1.407000,49.965000C49.062000,99.978996 49.528000,100.000000 50.000000,100.000000c8.627000,0.000000 16.743999,-2.185000 23.827000,-6.031000C68.608002,94.486000 50.748001,93.098000 50.000000,50.000000z"
+        android:fillColor="#76FF03"/>
+    <path
+        android:pathData="M50.000000,50.000000C13.103000,72.166000 20.757000,88.313004 23.823000,92.601997c7.240000,4.459000 15.703000,7.112000 24.770000,7.363000C43.752998,97.748001 29.184999,87.544998 50.000000,50.000000z"
+        android:fillColor="#82B1FF"/>
+    <path
+        android:pathData="M50.000000,50.000000C6.902000,50.749001 5.514000,68.609001 6.032000,73.828003c4.186000,7.708000 10.344000,14.188000 17.791000,18.773001C20.757000,88.313004 13.103000,72.166000 50.000000,50.000000z"
+        android:fillColor="#303F9F"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_vortex.xml b/packages/SystemUI/res/drawable/pop_vortex.xml
new file mode 100644
index 0000000..faefcb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_vortex.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000m-50.000000,0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,100.000000 0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,-100.000000 0.000000"
+        android:fillColor="#FFF176"/>
+    <path
+        android:pathData="M58.658001,89.648003c-19.330000,0.000000 -35.000000,-15.670000 -35.000000,-35.000000c0.000000,-13.531000 10.969000,-24.500000 24.500000,-24.500000c9.472000,0.000000 17.150000,7.679000 17.150000,17.150000c0.000000,6.631000 -5.375000,12.006000 -12.006000,12.006000c-3.798000,0.000000 -7.004000,-2.522000 -8.045000,-5.982000c1.021000,1.136000 2.497000,1.854000 4.145000,1.854000c2.644000,0.000000 4.853000,-1.841000 5.428000,-4.310000c0.175000,-0.558000 0.271000,-1.150000 0.271000,-1.766000c0.000000,-4.642000 -3.763000,-8.404000 -8.403000,-8.404000c-6.631000,0.000000 -12.006000,5.375000 -12.006000,12.006000c0.000000,9.472000 7.679000,17.149000 17.150000,17.149000c13.531000,0.000000 24.500000,-10.969000 24.500000,-24.500000c0.000000,-19.330000 -15.670000,-35.000000 -35.000000,-35.000000c-12.963000,0.000000 -24.773001,4.935000 -33.657001,13.025000C2.824000,31.087000 0.000000,40.212002 0.000000,50.000000c0.000000,27.615000 22.386000,50.000000 50.000000,50.000000c17.825001,0.000000 33.462002,-9.335000 42.313999,-23.375999C83.431000,84.714996 71.621002,89.648003 58.658001,89.648003z"
+        android:fillColor="#7BAAF7"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/pop_vortex2.xml b/packages/SystemUI/res/drawable/pop_vortex2.xml
new file mode 100644
index 0000000..0a96b74
--- /dev/null
+++ b/packages/SystemUI/res/drawable/pop_vortex2.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="100.0dp"
+        android:height="100.0dp"
+        android:viewportWidth="100.0"
+        android:viewportHeight="100.0">
+    <path
+        android:pathData="M50.000000,50.000000m-50.000000,0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,100.000000 0.000000a50.000000,50.000000 0.000000,1.000000 1.000000,-100.000000 0.000000"
+        android:fillColor="#D81B60"/>
+    <path
+        android:pathData="M21.250000,78.369003c-13.200000,-16.000000 -10.930000,-39.671001 5.070000,-52.870998c12.799000,-10.560000 31.737000,-8.743000 42.294998,4.057000c8.448000,10.239000 6.996000,25.389000 -3.244000,33.837002c-8.191000,6.759000 -20.311001,5.596000 -27.068001,-2.596000c-5.408000,-6.554000 -4.478000,-16.249001 2.076000,-21.656000c5.242000,-4.325000 12.998000,-3.581000 17.323999,1.661000c3.460000,4.194000 2.865000,10.399000 -1.330000,13.859000c-3.354000,2.769000 -8.318000,2.293000 -11.087000,-1.062000c-2.214000,-2.685000 -1.833000,-6.655000 0.851000,-8.870000c2.147000,-1.771000 5.324000,-1.468000 7.096000,0.681000c1.393000,1.688000 1.174000,4.165000 -0.464000,5.596000c0.409000,-0.564000 0.657000,-1.253000 0.657000,-2.004000c0.000000,-1.021000 -0.455000,-1.928000 -1.165000,-2.556000c-0.067000,-0.112000 -0.134000,-0.226000 -0.220000,-0.329000c-1.135000,-1.373000 -3.168000,-1.568000 -4.542000,-0.435000c-1.719000,1.417000 -1.962000,3.958000 -0.544000,5.677000c1.771000,2.146000 4.949000,2.451000 7.096000,0.680000c2.684000,-2.215000 3.064000,-6.186000 0.851000,-8.870000c-2.769000,-3.356000 -7.732000,-3.831000 -11.087000,-1.063000c-4.195000,3.460000 -4.790000,9.665000 -1.330000,13.859000c4.326000,5.244000 12.082000,5.987000 17.323999,1.662000c6.554000,-5.407000 7.484000,-15.102000 2.076000,-21.656000c-6.758000,-8.191000 -18.875999,-9.354000 -27.069000,-2.596000c-10.239000,8.448000 -11.691000,23.598000 -3.244000,33.837002c10.560000,12.800000 29.497000,14.616000 42.296001,4.056000c16.000000,-13.199000 18.270000,-36.869999 5.070000,-52.868999C68.397003,5.620000 52.516998,-0.139000 37.205002,1.659000c-8.665000,2.287000 -16.410999,6.836000 -22.561001,12.985000C5.597000,23.693001 0.000000,36.193001 0.000000,50.000000c0.000000,13.808000 5.597000,26.308001 14.645000,35.355000C23.693001,94.403999 36.193001,100.000000 50.000000,100.000000c11.935000,0.000000 22.886999,-4.187000 31.482000,-11.164000C61.909000,100.523003 36.202999,96.495003 21.250000,78.369003z"
+        android:fillColor="#F06292"/>
+</vector>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 7439b97..b30b80c 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -31,7 +31,7 @@
   </plurals>
     <string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Nėra įspėjimų"</string>
     <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Vykstantys"</string>
-    <string name="status_bar_latest_events_title" msgid="6594767438577593172">"Įspėjimai"</string>
+    <string name="status_bar_latest_events_title" msgid="6594767438577593172">"Pranešimai"</string>
     <string name="battery_low_title" msgid="6456385927409742437">"Akumuliatorius senka"</string>
     <string name="battery_low_percent_format" msgid="1077244949318261761">"Liko <xliff:g id="NUMBER">%d%%</xliff:g>"</string>
     <string name="battery_low_percent_format_saver_started" msgid="6534746636002666456">"Liko <xliff:g id="NUMBER">%d%%</xliff:g>. Akumuliatoriaus tausojimo priemonė įjungta."</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index e66522f..9ab3d91 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -181,7 +181,7 @@
     <string name="accessibility_quick_settings_bluetooth_changed_off" msgid="2730003763480934529">"Bluetooth imezimwa."</string>
     <string name="accessibility_quick_settings_bluetooth_changed_on" msgid="8722351798763206577">"Bluetooth imewashwa."</string>
     <string name="accessibility_quick_settings_location_off" msgid="5119080556976115520">"Programu ya Kuonyesha mahali ulipo imezimwa."</string>
-    <string name="accessibility_quick_settings_location_on" msgid="5809937096590102036">"Programu ya Kuonyesha mahali ulipo inawaka."</string>
+    <string name="accessibility_quick_settings_location_on" msgid="5809937096590102036">"Programu ya kuonyesha mahali ulipo imewashwa."</string>
     <string name="accessibility_quick_settings_location_changed_off" msgid="8526845571503387376">"Programu ya Kuonyesha mahali ulipo imezimwa."</string>
     <string name="accessibility_quick_settings_location_changed_on" msgid="339403053079338468">"Programu ya Kuonyesha mahali ulipo imewashwa."</string>
     <string name="accessibility_quick_settings_alarm" msgid="3959908972897295660">"Kengele imewekwa <xliff:g id="TIME">%s</xliff:g>."</string>
@@ -251,7 +251,7 @@
     <string name="quick_settings_wifi_detail_empty_text" msgid="2831702993995222755">"Hakuna mitandao iliyohifadhiwa inayopatikana"</string>
     <string name="quick_settings_cast_title" msgid="1893629685050355115">"Tuma skrini"</string>
     <string name="quick_settings_casting" msgid="6601710681033353316">"Inatuma"</string>
-    <string name="quick_settings_cast_device_default_name" msgid="5367253104742382945">"Kifaa kisichokuwa na jina"</string>
+    <string name="quick_settings_cast_device_default_name" msgid="5367253104742382945">"Kifaa hakina jina"</string>
     <string name="quick_settings_cast_device_default_description" msgid="2484573682378634413">"Tayari kutuma"</string>
     <string name="quick_settings_cast_detail_empty_text" msgid="311785821261640623">"Hakuna vifaa vilivyopatikana"</string>
     <string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ung\'avu"</string>
diff --git a/packages/SystemUI/res/values/lland_config.xml b/packages/SystemUI/res/values/lland_config.xml
index 56125a5..5d74082 100644
--- a/packages/SystemUI/res/values/lland_config.xml
+++ b/packages/SystemUI/res/values/lland_config.xml
@@ -20,10 +20,11 @@
 <resources>
     <dimen name="obstacle_spacing">380dp</dimen>
     <dimen name="translation_per_sec">100dp</dimen>
-    <dimen name="boost_dv">600dp</dimen>
+    <dimen name="boost_dv">550dp</dimen>
     <dimen name="player_hit_size">40dp</dimen>
     <dimen name="player_size">40dp</dimen>
-    <dimen name="obstacle_width">80dp</dimen>
+    <dimen name="obstacle_width">90dp</dimen>
+    <dimen name="obstacle_stem_width">12dp</dimen>
     <dimen name="obstacle_gap">170dp</dimen>
     <dimen name="obstacle_height_min">40dp</dimen>
     <dimen name="building_width_min">20dp</dimen>
@@ -38,8 +39,8 @@
     <dimen name="G">30dp</dimen>
     <dimen name="max_v">1000dp</dimen>
     <dimen name="scenery_z">6dp</dimen>
-    <dimen name="obstacle_z">15dp</dimen>
-    <dimen name="player_z">15dp</dimen>
-    <dimen name="player_z_boost">18dp</dimen>
+    <dimen name="obstacle_z">18dp</dimen>
+    <dimen name="player_z">18dp</dimen>
+    <dimen name="player_z_boost">20dp</dimen>
     <dimen name="hud_z">35dp</dimen>
 </resources>
diff --git a/packages/SystemUI/src/com/android/systemui/egg/LLand.java b/packages/SystemUI/src/com/android/systemui/egg/LLand.java
index d1c02dd..cdfe6e5 100644
--- a/packages/SystemUI/src/com/android/systemui/egg/LLand.java
+++ b/packages/SystemUI/src/com/android/systemui/egg/LLand.java
@@ -19,26 +19,37 @@
 import android.animation.TimeAnimator;
 import android.content.Context;
 import android.content.res.Resources;
-import android.graphics.*;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Matrix;
+import android.graphics.Outline;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PorterDuff;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.GradientDrawable;
 import android.util.AttributeSet;
 import android.util.Log;
-import android.view.*;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewOutlineProvider;
 import android.view.animation.DecelerateInterpolator;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.TextView;
 
-import java.util.ArrayList;
-
 import com.android.systemui.R;
 
+import java.util.ArrayList;
+
 public class LLand extends FrameLayout {
     public static final String TAG = "LLand";
 
     public static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
-    public static final boolean DEBUG_DRAW = false && DEBUG;
+    public static final boolean DEBUG_DRAW = false; // DEBUG
 
     public static final void L(String s, Object ... objects) {
         if (DEBUG) {
@@ -52,13 +63,24 @@
     public static final float DEBUG_SPEED_MULTIPLIER = 1f; // 0.1f;
     public static final boolean DEBUG_IDDQD = false;
 
+    final static int[] POPS = {
+            // resid                // spinny!
+            R.drawable.pop_belt,    0,
+            R.drawable.pop_droid,   0,
+            R.drawable.pop_pizza,   1,
+            R.drawable.pop_stripes, 0,
+            R.drawable.pop_swirl,   1,
+            R.drawable.pop_vortex,  1,
+            R.drawable.pop_vortex2, 1,
+    };
+
     private static class Params {
         public float TRANSLATION_PER_SEC;
         public int OBSTACLE_SPACING, OBSTACLE_PERIOD;
         public int BOOST_DV;
         public int PLAYER_HIT_SIZE;
         public int PLAYER_SIZE;
-        public int OBSTACLE_WIDTH;
+        public int OBSTACLE_WIDTH, OBSTACLE_STEM_WIDTH;
         public int OBSTACLE_GAP;
         public int OBSTACLE_MIN;
         public int BUILDING_WIDTH_MIN, BUILDING_WIDTH_MAX;
@@ -76,6 +98,7 @@
             PLAYER_HIT_SIZE = res.getDimensionPixelSize(R.dimen.player_hit_size);
             PLAYER_SIZE = res.getDimensionPixelSize(R.dimen.player_size);
             OBSTACLE_WIDTH = res.getDimensionPixelSize(R.dimen.obstacle_width);
+            OBSTACLE_STEM_WIDTH = res.getDimensionPixelSize(R.dimen.obstacle_stem_width);
             OBSTACLE_GAP = res.getDimensionPixelSize(R.dimen.obstacle_gap);
             OBSTACLE_MIN = res.getDimensionPixelSize(R.dimen.obstacle_height_min);
             BUILDING_HEIGHT_MIN = res.getDimensionPixelSize(R.dimen.building_height_min);
@@ -112,6 +135,7 @@
     private int mWidth, mHeight;
     private boolean mAnimating, mPlaying;
     private boolean mFrozen; // after death, a short backoff
+    private boolean mFlipped;
 
     private int mTimeOfDay;
     private static final int DAY = 0, NIGHT = 1, TWILIGHT = 2, SUNSET = 3;
@@ -119,7 +143,7 @@
             { 0xFFc0c0FF, 0xFFa0a0FF }, // DAY
             { 0xFF000010, 0xFF000000 }, // NIGHT
             { 0xFF000040, 0xFF000010 }, // TWILIGHT
-            { 0xFF805010, 0xFF202080 }, // SUNSET
+            { 0xFFa08020, 0xFF204080 }, // SUNSET
     };
 
     private static Params PARAMS;
@@ -183,7 +207,8 @@
         sky.setDither(true);
         setBackground(sky);
 
-        setScaleX(frand() > 0.5f ? 1 : -1);
+        mFlipped = frand() > 0.5f;
+        setScaleX(mFlipped ? -1 : 1);
 
         setScore(0);
 
@@ -276,9 +301,7 @@
         mDroid.setX(mWidth / 2);
         mDroid.setY(mHeight / 2);
         addView(mDroid, new LayoutParams(PARAMS.PLAYER_SIZE, PARAMS.PLAYER_SIZE));
-        if (mAnim != null) {
-            Log.wtf(TAG, "reseting while animating??!?");
-        }
+
         mAnim = new TimeAnimator();
         mAnim.setTimeListener(new TimeAnimator.TimeListener() {
             @Override
@@ -303,7 +326,8 @@
             mPlaying = true;
 
             t = 0;
-            mLastPipeTime = getGameTime() - PARAMS.OBSTACLE_PERIOD; // queue up a obstacle
+            // there's a sucker born every OBSTACLE_PERIOD
+            mLastPipeTime = getGameTime() - PARAMS.OBSTACLE_PERIOD;
 
             if (mSplash != null && mSplash.getAlpha() > 0f) {
                 mSplash.setTranslationZ(PARAMS.HUD_Z);
@@ -407,7 +431,7 @@
                 L("player hit an obstacle");
                 stop();
             } else if (ob.cleared(mDroid)) {
-                passedBarrier = true;
+                if (ob instanceof Stem) passedBarrier = true;
                 mObstaclesInPlay.remove(j);
             }
         }
@@ -438,52 +462,91 @@
             final int obstacley = (int) (Math.random()
                     * (mHeight - 2*PARAMS.OBSTACLE_MIN - PARAMS.OBSTACLE_GAP)) + PARAMS.OBSTACLE_MIN;
 
-            final Obstacle p1 = new Obstacle(getContext(), obstacley);
+            final int inset = (PARAMS.OBSTACLE_WIDTH - PARAMS.OBSTACLE_STEM_WIDTH) / 2;
+            final int yinset = PARAMS.OBSTACLE_WIDTH/2;
+
+            final int d1 = irand(0,250);
+            final Obstacle s1 = new Stem(getContext(), obstacley - yinset, false);
+            addView(s1, new LayoutParams(
+                    PARAMS.OBSTACLE_STEM_WIDTH,
+                    (int) s1.h,
+                    Gravity.TOP|Gravity.LEFT));
+            s1.setTranslationX(mWidth+inset);
+            s1.setTranslationY(-s1.h-yinset);
+            s1.setTranslationZ(PARAMS.OBSTACLE_Z*0.75f);
+            s1.animate()
+                    .translationY(0)
+                    .setStartDelay(d1)
+                    .setDuration(250);
+            mObstaclesInPlay.add(s1);
+
+            final Obstacle p1 = new Pop(getContext(), PARAMS.OBSTACLE_WIDTH);
             addView(p1, new LayoutParams(
                     PARAMS.OBSTACLE_WIDTH,
-                    mHeight,
+                    PARAMS.OBSTACLE_WIDTH,
                     Gravity.TOP|Gravity.LEFT));
             p1.setTranslationX(mWidth);
-            p1.setTranslationY(-mHeight);
-            p1.setTranslationZ(0);
+            p1.setTranslationY(-PARAMS.OBSTACLE_WIDTH);
+            p1.setTranslationZ(PARAMS.OBSTACLE_Z);
+            p1.setScaleX(0.25f);
+            p1.setScaleY(0.25f);
             p1.animate()
-                    .translationY(-mHeight+p1.h)
-                    .translationZ(PARAMS.OBSTACLE_Z)
-                    .setStartDelay(irand(0,250))
+                    .translationY(s1.h-inset)
+                    .scaleX(1f)
+                    .scaleY(1f)
+                    .setStartDelay(d1)
                     .setDuration(250);
             mObstaclesInPlay.add(p1);
 
-            final Obstacle p2 = new Obstacle(getContext(),
-                    mHeight - obstacley - PARAMS.OBSTACLE_GAP);
+            final int d2 = irand(0,250);
+            final Obstacle s2 = new Stem(getContext(),
+                    mHeight - obstacley - PARAMS.OBSTACLE_GAP - yinset,
+                    true);
+            addView(s2, new LayoutParams(
+                    PARAMS.OBSTACLE_STEM_WIDTH,
+                    (int) s2.h,
+                    Gravity.TOP|Gravity.LEFT));
+            s2.setTranslationX(mWidth+inset);
+            s2.setTranslationY(mHeight+yinset);
+            s2.setTranslationZ(PARAMS.OBSTACLE_Z*0.75f);
+            s2.animate()
+                    .translationY(mHeight-s2.h)
+                    .setStartDelay(d2)
+                    .setDuration(400);
+            mObstaclesInPlay.add(s2);
+
+            final Obstacle p2 = new Pop(getContext(), PARAMS.OBSTACLE_WIDTH);
             addView(p2, new LayoutParams(
                     PARAMS.OBSTACLE_WIDTH,
-                    mHeight,
+                    PARAMS.OBSTACLE_WIDTH,
                     Gravity.TOP|Gravity.LEFT));
             p2.setTranslationX(mWidth);
             p2.setTranslationY(mHeight);
-            p2.setTranslationZ(0);
+            p2.setTranslationZ(PARAMS.OBSTACLE_Z);
+            p2.setScaleX(0.25f);
+            p2.setScaleY(0.25f);
             p2.animate()
-                    .translationY(mHeight-p2.h)
-                    .translationZ(PARAMS.OBSTACLE_Z)
-                    .setStartDelay(irand(0,100))
+                    .translationY(mHeight-s2.h-yinset)
+                    .scaleX(1f)
+                    .scaleY(1f)
+                    .setStartDelay(d2)
                     .setDuration(400);
             mObstaclesInPlay.add(p2);
         }
 
-        if (DEBUG) {
-            final Rect r = new Rect();
-            mDroid.getHitRect(r);
-            r.inset(-4, -4);
-            invalidate(r);
-        }
+        if (DEBUG_DRAW) invalidate();
     }
     
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
         if (DEBUG) L("touch: %s", ev);
-        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
-            poke();
-            return true;
+        switch (ev.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                poke();
+                return true;
+            case MotionEvent.ACTION_UP:
+                unpoke();
+                return true;
         }
         return false;
     }
@@ -491,9 +554,13 @@
     @Override
     public boolean onTrackballEvent(MotionEvent ev) {
         if (DEBUG) L("trackball: %s", ev);
-        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
-            poke();
-            return true;
+        switch (ev.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                poke();
+                return true;
+            case MotionEvent.ACTION_UP:
+                unpoke();
+                return true;
         }
         return false;
     }
@@ -514,6 +581,21 @@
     }
 
     @Override
+    public boolean onKeyUp(int keyCode, KeyEvent ev) {
+        if (DEBUG) L("keyDown: %d", keyCode);
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_DPAD_CENTER:
+            case KeyEvent.KEYCODE_DPAD_UP:
+            case KeyEvent.KEYCODE_SPACE:
+            case KeyEvent.KEYCODE_ENTER:
+            case KeyEvent.KEYCODE_BUTTON_A:
+                unpoke();
+                return true;
+        }
+        return false;
+    }
+
+    @Override
     public boolean onGenericMotionEvent (MotionEvent ev) {
         if (DEBUG) L("generic: %s", ev);
         return false;
@@ -535,6 +617,13 @@
         }
     }
 
+    private void unpoke() {
+        L("unboost");
+        if (mFrozen) return;
+        if (!mAnimating) return;
+        mDroid.unboost();
+    }
+
     @Override
     public void onDraw(Canvas c) {
         super.onDraw(c);
@@ -555,15 +644,23 @@
                     pt);
         }
 
+        pt.setStyle(Paint.Style.STROKE);
+        pt.setStrokeWidth(getResources().getDisplayMetrics().density);
+
         final int M = getChildCount();
-        pt.setColor(0x6000FF00);
+        pt.setColor(0x8000FF00);
         for (int i=0; i<M; i++) {
             final View v = getChildAt(i);
             if (v == mDroid) continue;
             if (!(v instanceof GameView)) continue;
-            final Rect r = new Rect();
-            v.getHitRect(r);
-            c.drawRect(r, pt);
+            if (v instanceof Pop) {
+                final Pop p = (Pop) v;
+                c.drawCircle(p.cx, p.cy, p.r, pt);
+            } else {
+                final Rect r = new Rect();
+                v.getHitRect(r);
+                c.drawRect(r, pt);
+            }
         }
 
         pt.setColor(Color.BLACK);
@@ -585,6 +682,8 @@
     private class Player extends ImageView implements GameView {
         public float dv;
 
+        private boolean mBoosting;
+
         private final float[] sHull = new float[] {
                 0.3f,  0f,    // left antenna
                 0.7f,  0f,    // right antenna
@@ -639,7 +738,11 @@
         public void step(long t_ms, long dt_ms, float t, float dt) {
             if (getVisibility() != View.VISIBLE) return; // not playing yet
 
-            dv += PARAMS.G;
+            if (mBoosting) {
+                dv = -PARAMS.BOOST_DV;
+            } else {
+                dv += PARAMS.G;
+            }
             if (dv < -PARAMS.MAX_V) dv = -PARAMS.MAX_V;
             else if (dv > PARAMS.MAX_V) dv = PARAMS.MAX_V;
 
@@ -652,15 +755,28 @@
         }
 
         public void boost() {
+            mBoosting = true;
             dv = -PARAMS.BOOST_DV;
-            setTranslationZ(PARAMS.PLAYER_Z_BOOST);
+
+            animate().cancel();
+            animate()
+                    .scaleX(1.25f)
+                    .scaleY(1.25f)
+                    .translationZ(PARAMS.PLAYER_Z_BOOST)
+                    .setDuration(100);
             setScaleX(1.25f);
             setScaleY(1.25f);
+        }
+
+        public void unboost() {
+            mBoosting = false;
+
+            animate().cancel();
             animate()
-                .scaleX(1f)
-                .scaleY(1f)
-                .translationZ(PARAMS.PLAYER_Z)
-                .setDuration(200);
+                    .scaleX(1f)
+                    .scaleY(1f)
+                    .translationZ(PARAMS.PLAYER_Z)
+                    .setDuration(200);
         }
     }
 
@@ -671,7 +787,7 @@
 
         public Obstacle(Context context, float h) {
             super(context);
-            setBackgroundResource(R.drawable.placeholder);
+            setBackgroundColor(0xFFFF0000);
             this.h = h;
         }
 
@@ -701,6 +817,91 @@
         }
     }
 
+    private class Pop extends Obstacle {
+        int mRotate;
+        int cx, cy, r;
+        public Pop(Context context, float h) {
+            super(context, h);
+            int idx = 2*irand(0, POPS.length/2);
+            setBackgroundResource(POPS[idx]);
+            setScaleX(frand() < 0.5f ? -1 : 1);
+            mRotate = POPS[idx+1] == 0 ? 0 : (frand() < 0.5f ? -1 : 1);
+            setOutlineProvider(new ViewOutlineProvider() {
+                @Override
+                public void getOutline(View view, Outline outline) {
+                    final int pad = (int) (getWidth() * 0.02f);
+                    outline.setOval(pad, pad, getWidth()-pad, getHeight()-pad);
+                }
+            });
+        }
+
+        public boolean intersects(Player p) {
+            final int N = p.corners.length/2;
+            for (int i=0; i<N; i++) {
+                final int x = (int) p.corners[i*2];
+                final int y = (int) p.corners[i*2+1];
+                if (Math.hypot(x-cx, y-cy) <= r) return true;
+            }
+            return false;
+        }
+
+        @Override
+        public void step(long t_ms, long dt_ms, float t, float dt) {
+            super.step(t_ms, dt_ms, t, dt);
+            if (mRotate != 0) {
+                setRotation(getRotation() + dt * 45 * mRotate);
+            }
+
+            cx = (hitRect.left + hitRect.right)/2;
+            cy = (hitRect.top + hitRect.bottom)/2;
+            r = getWidth()/2;
+        }
+    }
+
+    private class Stem extends Obstacle {
+        Paint mPaint = new Paint();
+        Path mShadow = new Path();
+        boolean mDrawShadow;
+
+        public Stem(Context context, float h, boolean drawShadow) {
+            super(context, h);
+            mDrawShadow = drawShadow;
+            mPaint.setColor(0xFFAAAAAA);
+            setBackground(null);
+        }
+
+        @Override
+        public void onAttachedToWindow() {
+            super.onAttachedToWindow();
+            setWillNotDraw(false);
+            setOutlineProvider(new ViewOutlineProvider() {
+                @Override
+                public void getOutline(View view, Outline outline) {
+                    outline.setRect(0, 0, getWidth(), getHeight());
+                }
+            });
+        }
+        @Override
+        public void onDraw(Canvas c) {
+            final int w = c.getWidth();
+            final int h = c.getHeight();
+            final GradientDrawable g = new GradientDrawable();
+            g.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT);
+            g.setGradientCenter(w * 0.75f, 0);
+            g.setColors(new int[] { 0xFFFFFFFF, 0xFFAAAAAA });
+            g.setBounds(0, 0, w, h);
+            g.draw(c);
+            if (!mDrawShadow) return;
+            mShadow.reset();
+            mShadow.moveTo(0,0);
+            mShadow.lineTo(w, 0);
+            mShadow.lineTo(w, PARAMS.OBSTACLE_WIDTH/2+w*1.5f);
+            mShadow.lineTo(0, PARAMS.OBSTACLE_WIDTH/2);
+            mShadow.close();
+            c.drawPath(mShadow, mPaint);
+        }
+    }
+
     private class Scenery extends FrameLayout implements GameView {
         public float z;
         public float v;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index eef4a5a..9492a14 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -696,7 +696,7 @@
         if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) {
             // Using custom RemoteViews
             if (entry.targetSdk >= Build.VERSION_CODES.GINGERBREAD
-                    && entry.targetSdk < Build.VERSION_CODES.L) {
+                    && entry.targetSdk < Build.VERSION_CODES.LOLLIPOP) {
                 entry.row.setShowingLegacyBackground(true);
                 entry.legacy = true;
             }
@@ -712,7 +712,7 @@
         }
 
         if (entry.icon != null) {
-            if (entry.targetSdk >= Build.VERSION_CODES.L) {
+            if (entry.targetSdk >= Build.VERSION_CODES.LOLLIPOP) {
                 entry.icon.setColorFilter(mContext.getResources().getColor(android.R.color.white));
             } else {
                 entry.icon.setColorFilter(null);
@@ -1385,7 +1385,7 @@
 
             Drawable iconDrawable = StatusBarIconView.getIcon(mContext, ic);
             icon.setImageDrawable(iconDrawable);
-            if (entry.targetSdk >= Build.VERSION_CODES.L
+            if (entry.targetSdk >= Build.VERSION_CODES.LOLLIPOP
                     || mNotificationColorUtil.isGrayscaleIcon(iconDrawable)) {
                 icon.setBackgroundResource(
                         com.android.internal.R.drawable.notification_icon_legacy_bg);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 5f3b877..e9a114a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -3334,7 +3334,7 @@
         final int targetSdk = context.getApplicationInfo().targetSdkVersion;
         final boolean targetPreHoneycomb = targetSdk < android.os.Build.VERSION_CODES.HONEYCOMB;
         final boolean targetPreIcs = targetSdk < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
-        final boolean targetPreL = targetSdk < android.os.Build.VERSION_CODES.L;
+        final boolean targetPreL = targetSdk < android.os.Build.VERSION_CODES.LOLLIPOP;
         final boolean targetHcNeedsOptions = context.getResources().getBoolean(
                 R.bool.target_honeycomb_needs_options_menu);
         final boolean noActionBar = !hasFeature(FEATURE_ACTION_BAR) || hasFeature(FEATURE_NO_TITLE);
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index fca13f8..7623514 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -1839,13 +1839,14 @@
             // If the provider was not found it may be because it was restored and
             // we did not know its UID so let us find if there is such one.
             if (existing == null) {
-                providerId = new ProviderId(UNKNOWN_UID, componentName);
-                existing = lookupProviderLocked(providerId);
+                ProviderId restoredProviderId = new ProviderId(UNKNOWN_UID, componentName);
+                existing = lookupProviderLocked(restoredProviderId);
             }
 
             if (existing != null) {
                 if (existing.zombie && !mSafeMode) {
                     // it's a placeholder that was set up during an app restore
+                    existing.id = providerId;
                     existing.zombie = false;
                     existing.info = provider.info; // the real one filled out from the ResolveInfo
                     if (DEBUG) {
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 9a5ffbd..4d2df24 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -7048,6 +7048,11 @@
         private  void startRestore() {
             sendStartRestore(mAcceptSet.size());
 
+            // If we're starting a full-system restore, set up to begin widget ID remapping
+            if (mIsSystemRestore) {
+                AppWidgetBackupBridge.restoreStarting(UserHandle.USER_OWNER);
+            }
+
             try {
                 String transportDir = mTransport.transportDirName();
                 mStateDir = new File(mBaseStateDir, transportDir);
diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java
index 0fb80c9..926235f 100644
--- a/services/core/java/com/android/server/MmsServiceBroker.java
+++ b/services/core/java/com/android/server/MmsServiceBroker.java
@@ -34,7 +34,7 @@
 import android.os.IBinder;
 import android.os.Message;
 import android.os.RemoteException;
-import android.os.ServiceManager;
+import android.os.SystemClock;
 import android.telephony.TelephonyManager;
 import android.util.Slog;
 
@@ -56,10 +56,12 @@
     private static final Uri FAKE_SMS_DRAFT_URI = Uri.parse("content://sms/draft/0");
     private static final Uri FAKE_MMS_DRAFT_URI = Uri.parse("content://mms/draft/0");
 
+    private static final long SERVICE_CONNECTION_WAIT_TIME_MS = 4 * 1000L; // 4 seconds
+    private static final long RETRY_DELAY_ON_DISCONNECTION_MS = 3 * 1000L; // 3 seconds
+
     private Context mContext;
     // The actual MMS service instance to invoke
     private volatile IMms mService;
-    private boolean mIsConnecting;
 
     // Cached system service instances
     private volatile AppOpsManager mAppOpsManager = null;
@@ -85,7 +87,7 @@
             Slog.i(TAG, "MmsService connected");
             synchronized (MmsServiceBroker.this) {
                 mService = IMms.Stub.asInterface(service);
-                mIsConnecting = false;
+                MmsServiceBroker.this.notifyAll();
             }
         }
 
@@ -94,8 +96,13 @@
             Slog.i(TAG, "MmsService unexpectedly disconnected");
             synchronized (MmsServiceBroker.this) {
                 mService = null;
-                mIsConnecting = false;
+                MmsServiceBroker.this.notifyAll();
             }
+            // Retry connecting, but not too eager (with a delay)
+            // since it may come back by itself.
+            mConnectionHandler.sendMessageDelayed(
+                    mConnectionHandler.obtainMessage(MSG_TRY_CONNECTING),
+                    RETRY_DELAY_ON_DISCONNECTION_MS);
         }
     };
 
@@ -103,7 +110,6 @@
         super(context);
         mContext = context;
         mService = null;
-        mIsConnecting = false;
     }
 
     @Override
@@ -118,29 +124,50 @@
     private void tryConnecting() {
         Slog.i(TAG, "Connecting to MmsService");
         synchronized (this) {
-            if (mIsConnecting) {
-                Slog.d(TAG, "Already connecting");
+            if (mService != null) {
+                Slog.d(TAG, "Already connected");
                 return;
             }
             final Intent intent = new Intent();
             intent.setComponent(MMS_SERVICE_COMPONENT);
             try {
-                if (mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE)) {
-                    mIsConnecting = true;
-                } else {
-                    Slog.e(TAG, "Failed to connect to MmsService");
+                if (!mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE)) {
+                    Slog.e(TAG, "Failed to bind to MmsService");
                 }
             } catch (SecurityException e) {
-                Slog.e(TAG, "Forbidden to connect to MmsService", e);
+                Slog.e(TAG, "Forbidden to bind to MmsService", e);
             }
         }
     }
 
     private void ensureService() {
-        if (mService == null) {
-            // Service instance lost, kicking off the connection again
-            mConnectionHandler.sendMessage(mConnectionHandler.obtainMessage(MSG_TRY_CONNECTING));
-            throw new RuntimeException("MMS service is not connected");
+        synchronized (this) {
+            if (mService == null) {
+                // Service is not connected. Try blocking connecting.
+                Slog.w(TAG, "MmsService not connected. Try connecting...");
+                mConnectionHandler.sendMessage(
+                        mConnectionHandler.obtainMessage(MSG_TRY_CONNECTING));
+                final long shouldEnd =
+                        SystemClock.elapsedRealtime() + SERVICE_CONNECTION_WAIT_TIME_MS;
+                long waitTime = SERVICE_CONNECTION_WAIT_TIME_MS;
+                while (waitTime > 0) {
+                    try {
+                        // TODO: consider using Java concurrent construct instead of raw object wait
+                        this.wait(waitTime);
+                    } catch (InterruptedException e) {
+                        Slog.w(TAG, "Connection wait interrupted", e);
+                    }
+                    if (mService != null) {
+                        // Success
+                        return;
+                    }
+                    // Calculate remaining waiting time to make sure we wait the full timeout period
+                    waitTime = shouldEnd - SystemClock.elapsedRealtime();
+                }
+                // Timed out. Something's really wrong.
+                Slog.e(TAG, "Can not connect to MmsService (timed out)");
+                throw new RuntimeException("Timed out in connecting to MmsService");
+            }
         }
     }
 
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index f430c56..0b253f5 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -31,7 +31,6 @@
 import android.os.SystemProperties;
 import android.util.ArrayMap;
 import android.util.ArraySet;
-import com.android.internal.app.ProcessMap;
 import com.android.internal.app.ProcessStats;
 import com.android.internal.os.BatteryStatsImpl;
 import com.android.internal.os.TransferPipe;
@@ -591,7 +590,7 @@
                         r.cancelNotification();
                         r.foregroundId = 0;
                         r.foregroundNoti = null;
-                    } else if (r.appInfo.targetSdkVersion >= Build.VERSION_CODES.L) {
+                    } else if (r.appInfo.targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
                         r.stripForegroundServiceFlagFromNotification();
                     }
                 }
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index 985f77a7..4521c28 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -262,7 +262,7 @@
         if (serviceInfo == null) {
             Slog.w(TAG, "Dream " + component + " does not exist");
             return false;
-        } else if (serviceInfo.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.L
+        } else if (serviceInfo.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP
                 && !BIND_DREAM_SERVICE.equals(serviceInfo.permission)) {
             Slog.w(TAG, "Dream " + component
                     + " is not available because its manifest is missing the " + BIND_DREAM_SERVICE
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index f456bcd..c6d2db2 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -70,8 +70,7 @@
  */
 public class JobSchedulerService extends com.android.server.SystemService
         implements StateChangedListener, JobCompletedListener {
-    // TODO: Switch this off for final version.
-    static final boolean DEBUG = true;
+    static final boolean DEBUG = false;
     /** The number of concurrent jobs we run at one time. */
     private static final int MAX_JOB_CONTEXTS_COUNT = 3;
     static final String TAG = "JobSchedulerService";
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index 9df21a2..63c8d92 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -62,7 +62,7 @@
  *
  */
 public class JobServiceContext extends IJobCallback.Stub implements ServiceConnection {
-    private static final boolean DEBUG = true;
+    private static final boolean DEBUG = false;
     private static final String TAG = "JobServiceContext";
     /** Define the maximum # of jobs allowed to run on a service at once. */
     private static final int defaultMaxActiveJobsPerService =
diff --git a/services/core/java/com/android/server/job/controllers/StateController.java b/services/core/java/com/android/server/job/controllers/StateController.java
index 81658bf..ca56886 100644
--- a/services/core/java/com/android/server/job/controllers/StateController.java
+++ b/services/core/java/com/android/server/job/controllers/StateController.java
@@ -29,7 +29,7 @@
  * are ready to run, or whether they must be stopped.
  */
 public abstract class StateController {
-    protected static final boolean DEBUG = true;
+    protected static final boolean DEBUG = false;
     protected Context mContext;
     protected StateChangedListener mStateChangedListener;
 
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index a0ec1d5..ebce3ad 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -625,12 +625,12 @@
 
     private PlaybackState getStateWithUpdatedPosition() {
         PlaybackState state;
+        long duration = -1;
         synchronized (mLock) {
             state = mPlaybackState;
-        }
-        long duration = -1;
-        if (mMetadata != null && mMetadata.containsKey(MediaMetadata.METADATA_KEY_DURATION)) {
-            duration = mMetadata.getLong(MediaMetadata.METADATA_KEY_DURATION);
+            if (mMetadata != null && mMetadata.containsKey(MediaMetadata.METADATA_KEY_DURATION)) {
+                duration = mMetadata.getLong(MediaMetadata.METADATA_KEY_DURATION);
+            }
         }
         PlaybackState result = null;
         if (state != null) {
@@ -725,10 +725,14 @@
 
         @Override
         public void setMetadata(MediaMetadata metadata) {
-            // Make a copy of the metadata as the underlying bundle may be
-            // modified on this thread.
             synchronized (mLock) {
-                mMetadata = metadata == null ? null : new MediaMetadata.Builder(metadata).build();
+                MediaMetadata temp = metadata == null ? null : new MediaMetadata.Builder(metadata)
+                        .build();
+                // This is to guarantee that the underlying bundle is unparceled
+                // before we set it to prevent concurrent reads from throwing an
+                // exception
+                temp.size();
+                mMetadata = temp;
             }
             mHandler.post(MessageHandler.MSG_UPDATE_METADATA);
         }
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index 13fbf6c..0c7d71b 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -496,7 +496,7 @@
         synchronized (mMutex) {
             try {
                 ManagedServiceInfo info = newServiceInfo(service, component, userid,
-                        true /*isSystem*/, null, Build.VERSION_CODES.L);
+                        true /*isSystem*/, null, Build.VERSION_CODES.LOLLIPOP);
                 service.asBinder().linkToDeath(info, 0);
                 mServices.add(info);
                 return info;
@@ -585,7 +585,7 @@
         }
 
         public boolean supportsProfiles() {
-            return targetSdkVersion >= Build.VERSION_CODES.L;
+            return targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP;
         }
 
         @Override
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmAnalyzer.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmAnalyzer.java
index 9a10f79..aa51c46 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmAnalyzer.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmAnalyzer.java
@@ -242,7 +242,8 @@
 
         for (Entry<String, ClassReader> entry : zipClasses.entrySet()) {
             String class_name = entry.getKey();
-            if (regexp.matcher(class_name).matches()) {
+            if (regexp.matcher(class_name).matches() &&
+                    !mExcludedClasses.contains(getOuterClassName(class_name))) {
                 findClass(class_name, zipClasses, inOutFound);
             }
         }
@@ -273,6 +274,9 @@
      */
     void findClassesDerivingFrom(String super_name, Map<String, ClassReader> zipClasses,
             Map<String, ClassReader> inOutFound) throws LogAbortException {
+        if (mExcludedClasses.contains(getOuterClassName(super_name))) {
+            return;
+        }
         findClass(super_name, zipClasses, inOutFound);
 
         for (Entry<String, ClassReader> entry : zipClasses.entrySet()) {
@@ -352,7 +356,13 @@
         return deps;
     }
 
-
+    private String getOuterClassName(String className) {
+        int pos = className.indexOf('$');
+        if (pos > 0) {
+            return className.substring(0, pos);
+        }
+        return className;
+    }
 
     // ----------------------------------
 
@@ -417,7 +427,7 @@
                     mOutKeep.containsKey(className) ||
                     mInDeps.containsKey(className) ||
                     mOutDeps.containsKey(className) ||
-                    mExcludedClasses.contains(getBaseName(className))) {
+                    mExcludedClasses.contains(getOuterClassName(className))) {
                 return;
             }
 
@@ -501,14 +511,6 @@
             }
         }
 
-        private String getBaseName(String className) {
-            int pos = className.indexOf('$');
-            if (pos > 0) {
-                return className.substring(0, pos);
-            }
-            return className;
-        }
-
         // ---------------------------------------------------
         // --- ClassVisitor, FieldVisitor
         // ---------------------------------------------------
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index 89cbaeb..f20b890 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -23,6 +23,10 @@
 import com.android.tools.layoutlib.java.Objects;
 import com.android.tools.layoutlib.java.UnsafeByteSequence;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 /**
  * Describes the work to be done by {@link AsmGenerator}.
  */
@@ -98,6 +102,17 @@
     public String[] getJavaPkgClasses() {
       return JAVA_PKG_CLASSES;
     }
+
+    public Set<String> getExcludedClasses() {
+        String[] refactoredClasses = getJavaPkgClasses();
+        int count = refactoredClasses.length / 2 + EXCLUDED_CLASSES.length;
+        Set<String> excludedClasses = new HashSet<String>(count);
+        for (int i = 0; i < refactoredClasses.length; i+=2) {
+            excludedClasses.add(refactoredClasses[i]);
+        }
+        excludedClasses.addAll(Arrays.asList(EXCLUDED_CLASSES));
+        return excludedClasses;
+    }
     //-----
 
     /**
@@ -243,6 +258,11 @@
             "java.lang.UnsafeByteSequence",                    "com.android.tools.layoutlib.java.UnsafeByteSequence",
         };
 
+    private final static String[] EXCLUDED_CLASSES =
+        new String[] {
+            "org.kxml2.io.KXmlParser"
+        };
+
     /**
      * List of classes for which the methods returning them should be deleted.
      * The array contains a list of null terminated section starting with the name of the class
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
index 9387814..e49a668 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/ICreateInfo.java
@@ -16,6 +16,8 @@
 
 package com.android.tools.layoutlib.create;
 
+import java.util.Set;
+
 /**
  * Interface describing the work to be done by {@link AsmGenerator}.
  */
@@ -69,4 +71,6 @@
      * The list can be empty but must not be null.
      */
     public abstract String[] getJavaPkgClasses();
+
+    public abstract Set<String> getExcludedClasses();
 }
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java
index 02f2c02..cd3c39e 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -87,7 +88,7 @@
 
         try {
             CreateInfo info = new CreateInfo();
-            Set<String> excludeClasses = getExcludedClasses(info);
+            Set<String> excludeClasses = info.getExcludedClasses();
             AsmGenerator agen = new AsmGenerator(log, osDestJar, info);
 
             AsmAnalyzer aa = new AsmAnalyzer(log, osJarPath, agen,
@@ -156,16 +157,6 @@
         return 1;
     }
 
-    private static Set<String> getExcludedClasses(CreateInfo info) {
-        String[] refactoredClasses = info.getJavaPkgClasses();
-        Set<String> excludedClasses = new HashSet<String>(refactoredClasses.length);
-        for (int i = 0; i < refactoredClasses.length; i+=2) {
-            excludedClasses.add(refactoredClasses[i]);
-        }
-        return excludedClasses;
-
-    }
-
     private static int listDeps(ArrayList<String> osJarPath, Log log) {
         DependencyFinder df = new DependencyFinder(log);
         try {
diff --git a/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
index 0dbc238..cf91386 100644
--- a/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
+++ b/tools/layoutlib/create/tests/com/android/tools/layoutlib/create/AsmGeneratorTest.java
@@ -19,6 +19,7 @@
 
 
 import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import org.junit.After;
@@ -36,6 +37,7 @@
 import java.io.InputStream;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Map;
@@ -119,6 +121,11 @@
             }
 
             @Override
+            public Set<String> getExcludedClasses() {
+                return null;
+            }
+
+            @Override
             public String[] getDeleteReturns() {
                  // methods deleted from their return type.
                 return new String[0];
@@ -184,6 +191,11 @@
             }
 
             @Override
+            public Set<String> getExcludedClasses() {
+                return Collections.singleton("java.lang.JavaClass");
+            }
+
+            @Override
             public String[] getDeleteReturns() {
                  // methods deleted from their return type.
                 return new String[0];
@@ -217,6 +229,80 @@
                 filesFound.keySet().toArray());
     }
 
+    @Test
+    public void testClassExclusion() throws IOException, LogAbortException {
+        ICreateInfo ci = new ICreateInfo() {
+            @Override
+            public Class<?>[] getInjectedClasses() {
+                return new Class<?>[0];
+            }
+
+            @Override
+            public String[] getDelegateMethods() {
+                return new String[0];
+            }
+
+            @Override
+            public String[] getDelegateClassNatives() {
+                return new String[0];
+            }
+
+            @Override
+            public String[] getOverriddenMethods() {
+                // methods to force override
+                return new String[0];
+            }
+
+            @Override
+            public String[] getRenamedClasses() {
+                // classes to rename (so that we can replace them)
+                return new String[0];
+            }
+
+            @Override
+            public String[] getJavaPkgClasses() {
+                // classes to refactor (so that we can replace them)
+                return new String[0];
+            }
+
+            @Override
+            public Set<String> getExcludedClasses() {
+                Set<String> set = new HashSet<String>(2);
+                set.add("mock_android.dummy.InnerTest");
+                set.add("java.lang.JavaClass");
+                return set;
+            }
+
+            @Override
+            public String[] getDeleteReturns() {
+                // methods deleted from their return type.
+                return new String[0];
+            }
+        };
+
+        AsmGenerator agen = new AsmGenerator(mLog, mOsDestJar, ci);
+        Set<String> excludedClasses = ci.getExcludedClasses();
+        AsmAnalyzer aa = new AsmAnalyzer(mLog, mOsJarPath, agen,
+                null,                 // derived from
+                new String[] {        // include classes
+                        "**"
+                },
+                excludedClasses,
+                new String[] {        /* include files */
+                        "mock_android/data/data*"
+                });
+        aa.analyze();
+        agen.generate();
+        Map<String, ClassReader> output = new TreeMap<String, ClassReader>();
+        Map<String, InputStream> filesFound = new TreeMap<String, InputStream>();
+        parseZip(mOsDestJar, output, filesFound);
+        for (String s : output.keySet()) {
+            assertFalse(excludedClasses.contains(s));
+        }
+        assertArrayEquals(new String[] {"mock_android/data/dataFile"},
+                filesFound.keySet().toArray());
+    }
+
     private void parseZip(String jarPath,
             Map<String, ClassReader> classes,
             Map<String, InputStream> filesFound) throws IOException {