Camera2 API: Rename package to android.hardware.camera2

Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index eeee57d..ab11903 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -50,7 +50,7 @@
 import android.hardware.ISerialManager;
 import android.hardware.SerialManager;
 import android.hardware.SystemSensorManager;
-import android.hardware.photography.CameraManager;
+import android.hardware.camera2.CameraManager;
 import android.hardware.display.DisplayManager;
 import android.hardware.input.InputManager;
 import android.hardware.usb.IUsbManager;
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index aa326ad..0b1127c 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2292,7 +2292,7 @@
 
     /**
      * Use with {@link #getSystemService} to retrieve a
-     * {@link android.hardware.photography.CameraManager} for interacting with
+     * {@link android.hardware.camera2.CameraManager} for interacting with
      * camera devices.
      *
      * @see #getSystemService
diff --git a/core/java/android/hardware/ICameraService.aidl b/core/java/android/hardware/ICameraService.aidl
index 2d0c099..81e564e 100644
--- a/core/java/android/hardware/ICameraService.aidl
+++ b/core/java/android/hardware/ICameraService.aidl
@@ -20,8 +20,8 @@
 import android.hardware.ICameraClient;
 import android.hardware.IProCameraUser;
 import android.hardware.IProCameraCallbacks;
-import android.hardware.photography.ICameraDeviceUser;
-import android.hardware.photography.ICameraDeviceCallbacks;
+import android.hardware.camera2.ICameraDeviceUser;
+import android.hardware.camera2.ICameraDeviceCallbacks;
 import android.hardware.ICameraServiceListener;
 import android.hardware.CameraInfo;
 
diff --git a/core/java/android/hardware/photography/CameraAccessException.java b/core/java/android/hardware/camera2/CameraAccessException.java
similarity index 98%
rename from core/java/android/hardware/photography/CameraAccessException.java
rename to core/java/android/hardware/camera2/CameraAccessException.java
index fac5086..0089f26 100644
--- a/core/java/android/hardware/photography/CameraAccessException.java
+++ b/core/java/android/hardware/camera2/CameraAccessException.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.util.AndroidException;
 
diff --git a/core/java/android/hardware/photography/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
similarity index 99%
rename from core/java/android/hardware/photography/CameraDevice.java
rename to core/java/android/hardware/camera2/CameraDevice.java
index 0852025..422d827 100644
--- a/core/java/android/hardware/photography/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.view.Surface;
 
diff --git a/core/java/android/hardware/photography/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
similarity index 97%
rename from core/java/android/hardware/photography/CameraManager.java
rename to core/java/android/hardware/camera2/CameraManager.java
index c1c9435..0f7c930 100644
--- a/core/java/android/hardware/photography/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.content.Context;
 import android.hardware.ICameraService;
 import android.hardware.ICameraServiceListener;
 import android.hardware.IProCameraUser;
-import android.hardware.photography.utils.CameraBinderDecorator;
-import android.hardware.photography.utils.CameraRuntimeException;
+import android.hardware.camera2.utils.CameraBinderDecorator;
+import android.hardware.camera2.utils.CameraRuntimeException;
 import android.os.Binder;
 import android.os.IBinder;
 import android.os.RemoteException;
@@ -42,7 +42,7 @@
  * <pre>CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);</pre>
  *
  * <p>For more details about communicating with camera devices, read the Camera
- * developer guide or the {@link android.hardware.photography photography}
+ * developer guide or the {@link android.hardware.camera2 camera2}
  * package documentation.</p>
  */
 public final class CameraManager {
@@ -190,8 +190,8 @@
 
                 ICameraDeviceUser cameraUser;
 
-                android.hardware.photography.impl.CameraDevice device =
-                        new android.hardware.photography.impl.CameraDevice(cameraId);
+                android.hardware.camera2.impl.CameraDevice device =
+                        new android.hardware.camera2.impl.CameraDevice(cameraId);
 
                 cameraUser = mCameraService.connectDevice(device.getCallbacks(),
                         Integer.parseInt(cameraId),
diff --git a/core/java/android/hardware/photography/CameraMetadata.aidl b/core/java/android/hardware/camera2/CameraMetadata.aidl
similarity index 94%
rename from core/java/android/hardware/photography/CameraMetadata.aidl
rename to core/java/android/hardware/camera2/CameraMetadata.aidl
index b4dc9ac..71dd471 100644
--- a/core/java/android/hardware/photography/CameraMetadata.aidl
+++ b/core/java/android/hardware/camera2/CameraMetadata.aidl
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 /** @hide */
 parcelable CameraMetadata;
diff --git a/core/java/android/hardware/photography/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
similarity index 98%
rename from core/java/android/hardware/photography/CameraMetadata.java
rename to core/java/android/hardware/camera2/CameraMetadata.java
index c024c05..e7f34d8 100644
--- a/core/java/android/hardware/photography/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
-import android.hardware.photography.impl.MetadataMarshalClass;
-import android.hardware.photography.impl.MetadataMarshalRect;
-import android.hardware.photography.impl.MetadataMarshalSize;
-import android.hardware.photography.impl.MetadataMarshalString;
+import android.hardware.camera2.impl.MetadataMarshalClass;
+import android.hardware.camera2.impl.MetadataMarshalRect;
+import android.hardware.camera2.impl.MetadataMarshalSize;
+import android.hardware.camera2.impl.MetadataMarshalString;
 import android.os.Parcelable;
 import android.os.Parcel;
 import android.util.Log;
diff --git a/core/java/android/hardware/photography/CameraProperties.java b/core/java/android/hardware/camera2/CameraProperties.java
similarity index 99%
rename from core/java/android/hardware/photography/CameraProperties.java
rename to core/java/android/hardware/camera2/CameraProperties.java
index 2ed4e3a..89e1f2a 100644
--- a/core/java/android/hardware/photography/CameraProperties.java
+++ b/core/java/android/hardware/camera2/CameraProperties.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.graphics.Rect;
 
diff --git a/core/java/android/hardware/photography/CameraPropertiesKeys.java b/core/java/android/hardware/camera2/CameraPropertiesKeys.java
similarity index 88%
rename from core/java/android/hardware/photography/CameraPropertiesKeys.java
rename to core/java/android/hardware/camera2/CameraPropertiesKeys.java
index db8ab44..41b31ff 100644
--- a/core/java/android/hardware/photography/CameraPropertiesKeys.java
+++ b/core/java/android/hardware/camera2/CameraPropertiesKeys.java
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
 
 /**
  * ! Do not edit this file directly !
@@ -71,8 +71,8 @@
     }
 
     public static final class Jpeg {
-        public static final Key<android.hardware.photography.Size[]> AVAILABLE_THUMBNAIL_SIZES =
-                new Key<android.hardware.photography.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.photography.Size[].class);
+        public static final Key<android.hardware.camera2.Size[]> AVAILABLE_THUMBNAIL_SIZES =
+                new Key<android.hardware.camera2.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.camera2.Size[].class);
 
     }
 
@@ -90,8 +90,8 @@
                     new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
             public static final Key<Float> MINIMUM_FOCUS_DISTANCE =
                     new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
-            public static final Key<android.hardware.photography.Size> SHADING_MAP_SIZE =
-                    new Key<android.hardware.photography.Size>("android.lens.info.shadingMapSize", android.hardware.photography.Size.class);
+            public static final Key<android.hardware.camera2.Size> SHADING_MAP_SIZE =
+                    new Key<android.hardware.camera2.Size>("android.lens.info.shadingMapSize", android.hardware.camera2.Size.class);
         }
 
             public static final class FacingKey extends Key<Lens.FacingKey.Enum> {
@@ -161,14 +161,14 @@
                 new AvailableFormatsKey("android.scaler.availableFormats");
         public static final Key<long[]> AVAILABLE_JPEG_MIN_DURATIONS =
                 new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
-        public static final Key<android.hardware.photography.Size[]> AVAILABLE_JPEG_SIZES =
-                new Key<android.hardware.photography.Size[]>("android.scaler.availableJpegSizes", android.hardware.photography.Size[].class);
+        public static final Key<android.hardware.camera2.Size[]> AVAILABLE_JPEG_SIZES =
+                new Key<android.hardware.camera2.Size[]>("android.scaler.availableJpegSizes", android.hardware.camera2.Size[].class);
         public static final Key<Float> AVAILABLE_MAX_DIGITAL_ZOOM =
                 new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
         public static final Key<long[]> AVAILABLE_PROCESSED_MIN_DURATIONS =
                 new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
-        public static final Key<android.hardware.photography.Size[]> AVAILABLE_PROCESSED_SIZES =
-                new Key<android.hardware.photography.Size[]>("android.scaler.availableProcessedSizes", android.hardware.photography.Size[].class);
+        public static final Key<android.hardware.camera2.Size[]> AVAILABLE_PROCESSED_SIZES =
+                new Key<android.hardware.camera2.Size[]>("android.scaler.availableProcessedSizes", android.hardware.camera2.Size[].class);
 
     }
 
@@ -182,8 +182,8 @@
                     new Key<long[]>("android.sensor.info.exposureTimeRange", long[].class);
             public static final Key<Long> MAX_FRAME_DURATION =
                     new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
-            public static final Key<android.hardware.photography.Size> PHYSICAL_SIZE =
-                    new Key<android.hardware.photography.Size>("android.sensor.info.physicalSize", android.hardware.photography.Size.class);
+            public static final Key<android.hardware.camera2.Size> PHYSICAL_SIZE =
+                    new Key<android.hardware.camera2.Size>("android.sensor.info.physicalSize", android.hardware.camera2.Size.class);
         }
         public static final Key<Rational> BASE_GAIN_FACTOR =
                 new Key<Rational>("android.sensor.baseGainFactor", Rational.class);
diff --git a/core/java/android/hardware/photography/CaptureRequest.aidl b/core/java/android/hardware/camera2/CaptureRequest.aidl
similarity index 94%
rename from core/java/android/hardware/photography/CaptureRequest.aidl
rename to core/java/android/hardware/camera2/CaptureRequest.aidl
index 64fb6f2..0b7d5ba 100644
--- a/core/java/android/hardware/photography/CaptureRequest.aidl
+++ b/core/java/android/hardware/camera2/CaptureRequest.aidl
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 /** @hide */
 parcelable CaptureRequest;
diff --git a/core/java/android/hardware/photography/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
similarity index 98%
rename from core/java/android/hardware/photography/CaptureRequest.java
rename to core/java/android/hardware/camera2/CaptureRequest.java
index d4a7a3c..15ba12c 100644
--- a/core/java/android/hardware/photography/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.os.Parcel;
 import android.os.Parcelable;
diff --git a/core/java/android/hardware/photography/CaptureRequestKeys.java b/core/java/android/hardware/camera2/CaptureRequestKeys.java
similarity index 98%
rename from core/java/android/hardware/photography/CaptureRequestKeys.java
rename to core/java/android/hardware/camera2/CaptureRequestKeys.java
index ca6d487..17de8f0 100644
--- a/core/java/android/hardware/photography/CaptureRequestKeys.java
+++ b/core/java/android/hardware/camera2/CaptureRequestKeys.java
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
 
 /**
  * ! Do not edit this file directly !
@@ -449,8 +449,8 @@
                 new Key<Byte>("android.jpeg.quality", byte.class);
         public static final Key<Byte> THUMBNAIL_QUALITY =
                 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
-        public static final Key<android.hardware.photography.Size> THUMBNAIL_SIZE =
-                new Key<android.hardware.photography.Size>("android.jpeg.thumbnailSize", android.hardware.photography.Size.class);
+        public static final Key<android.hardware.camera2.Size> THUMBNAIL_SIZE =
+                new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
 
     }
 
diff --git a/core/java/android/hardware/photography/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
similarity index 99%
rename from core/java/android/hardware/photography/CaptureResult.java
rename to core/java/android/hardware/camera2/CaptureResult.java
index 2fdd466..11c991a 100644
--- a/core/java/android/hardware/photography/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.graphics.Point;
 import android.graphics.Rect;
diff --git a/core/java/android/hardware/photography/CaptureResultKeys.java b/core/java/android/hardware/camera2/CaptureResultKeys.java
similarity index 98%
rename from core/java/android/hardware/photography/CaptureResultKeys.java
rename to core/java/android/hardware/camera2/CaptureResultKeys.java
index 4931564..dd3ed83 100644
--- a/core/java/android/hardware/photography/CaptureResultKeys.java
+++ b/core/java/android/hardware/camera2/CaptureResultKeys.java
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
 
 /**
  * ! Do not edit this file directly !
@@ -310,8 +310,8 @@
                 new Key<Byte>("android.jpeg.quality", byte.class);
         public static final Key<Byte> THUMBNAIL_QUALITY =
                 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
-        public static final Key<android.hardware.photography.Size> THUMBNAIL_SIZE =
-                new Key<android.hardware.photography.Size>("android.jpeg.thumbnailSize", android.hardware.photography.Size.class);
+        public static final Key<android.hardware.camera2.Size> THUMBNAIL_SIZE =
+                new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
 
     }
 
diff --git a/core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
similarity index 81%
rename from core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl
rename to core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
index c506800..9f569cb 100644
--- a/core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
 
 /** @hide */
 interface ICameraDeviceCallbacks
 {
     /**
-     * Keep up-to-date with frameworks/av/include/camera/photography/ICameraDeviceCallbacks.h
+     * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceCallbacks.h
      */
 
     void notifyCallback(int msgType, int ext1, int ext2);
diff --git a/core/java/android/hardware/photography/ICameraDeviceUser.aidl b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
similarity index 84%
rename from core/java/android/hardware/photography/ICameraDeviceUser.aidl
rename to core/java/android/hardware/camera2/ICameraDeviceUser.aidl
index 571f50a..5a9b72f 100644
--- a/core/java/android/hardware/photography/ICameraDeviceUser.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
@@ -14,17 +14,17 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 import android.view.Surface;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.CaptureRequest;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CaptureRequest;
 
 /** @hide */
 interface ICameraDeviceUser
 {
     /**
-     * Keep up-to-date with frameworks/av/include/camera/photography/ICameraDeviceUser.h
+     * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceUser.h
      */
     void disconnect();
 
diff --git a/core/java/android/hardware/photography/Rational.java b/core/java/android/hardware/camera2/Rational.java
similarity index 98%
rename from core/java/android/hardware/photography/Rational.java
rename to core/java/android/hardware/camera2/Rational.java
index 66e533e..7ccc555 100644
--- a/core/java/android/hardware/photography/Rational.java
+++ b/core/java/android/hardware/camera2/Rational.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.photography;
+package android.hardware.camera2;
 
 /**
  * The rational data type used by CameraMetadata keys. Contains a pair of ints representing the
diff --git a/core/java/android/hardware/photography/Size.java b/core/java/android/hardware/camera2/Size.java
similarity index 97%
rename from core/java/android/hardware/photography/Size.java
rename to core/java/android/hardware/camera2/Size.java
index 499fd56..45aaeae 100644
--- a/core/java/android/hardware/photography/Size.java
+++ b/core/java/android/hardware/camera2/Size.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography;
+package android.hardware.camera2;
 
 /**
  * A simple immutable class for describing the dimensions of camera image
diff --git a/core/java/android/hardware/photography/impl/CameraDevice.java b/core/java/android/hardware/camera2/impl/CameraDevice.java
similarity index 94%
rename from core/java/android/hardware/photography/impl/CameraDevice.java
rename to core/java/android/hardware/camera2/impl/CameraDevice.java
index 5cb7525..9587680 100644
--- a/core/java/android/hardware/photography/impl/CameraDevice.java
+++ b/core/java/android/hardware/camera2/impl/CameraDevice.java
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
 
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.CaptureResult;
-import android.hardware.photography.ICameraDeviceUser;
-import android.hardware.photography.ICameraDeviceCallbacks;
-import android.hardware.photography.CameraAccessException;
-import android.hardware.photography.CameraProperties;
-import android.hardware.photography.CaptureRequest;
-import android.hardware.photography.utils.CameraRuntimeException;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CaptureResult;
+import android.hardware.camera2.ICameraDeviceUser;
+import android.hardware.camera2.ICameraDeviceCallbacks;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.CameraProperties;
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.utils.CameraRuntimeException;
 import android.os.Binder;
 import android.os.IBinder;
 import android.os.RemoteException;
@@ -37,7 +37,7 @@
 /**
  * HAL2.1+ implementation of CameraDevice Use CameraManager#open to instantiate
  */
-public class CameraDevice implements android.hardware.photography.CameraDevice {
+public class CameraDevice implements android.hardware.camera2.CameraDevice {
 
     private final String TAG;
 
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalClass.java b/core/java/android/hardware/camera2/impl/MetadataMarshalClass.java
similarity index 85%
rename from core/java/android/hardware/photography/impl/MetadataMarshalClass.java
rename to core/java/android/hardware/camera2/impl/MetadataMarshalClass.java
index a70784d..a934d75 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalClass.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalClass.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
 
 import java.nio.ByteBuffer;
 
@@ -26,7 +26,7 @@
      * @param value the value of type T that we wish to write into the byte buffer
      * @param buffer the byte buffer into which the marshalled object will be written
      * @param nativeType the native type, e.g.
-     *        {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
+     *        {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
      *        Guaranteed to be one for which isNativeTypeSupported returns true.
      * @param sizeOnly if this is true, don't write to the byte buffer. calculate the size only.
      * @return the size that needs to be written to the byte buffer
@@ -37,7 +37,7 @@
      * Unmarshal a new object instance from the byte buffer.
      * @param buffer the byte buffer, from which we will read the object
      * @param nativeType the native type, e.g.
-     *        {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
+     *        {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
      *        Guaranteed to be one for which isNativeTypeSupported returns true.
      * @return a new instance of type T read from the byte buffer
      */
@@ -50,7 +50,7 @@
      * will are likely to only support one type.
      *
      * @param nativeType the native type, e.g.
-     *        {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}
+     *        {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}
      * @return true if it supports, false otherwise
      */
     boolean isNativeTypeSupported(int nativeType);
@@ -60,7 +60,7 @@
     /**
      * How many bytes T will take up if marshalled to/from nativeType
      * @param nativeType the native type, e.g.
-     *        {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}
+     *        {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}
      * @return a size in bytes, or NATIVE_SIZE_DYNAMIC if the size is dynamic
      */
     int getNativeSize(int nativeType);
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalRect.java b/core/java/android/hardware/camera2/impl/MetadataMarshalRect.java
similarity index 94%
rename from core/java/android/hardware/photography/impl/MetadataMarshalRect.java
rename to core/java/android/hardware/camera2/impl/MetadataMarshalRect.java
index d6636ac..384223c 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalRect.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalRect.java
@@ -13,10 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
 
 import android.graphics.Rect;
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
 
 import java.nio.ByteBuffer;
 
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalSize.java b/core/java/android/hardware/camera2/impl/MetadataMarshalSize.java
similarity index 91%
rename from core/java/android/hardware/photography/impl/MetadataMarshalSize.java
rename to core/java/android/hardware/camera2/impl/MetadataMarshalSize.java
index 430219c..793bba7 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalSize.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalSize.java
@@ -13,10 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
 
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.Size;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.Size;
 
 import java.nio.ByteBuffer;
 
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalString.java b/core/java/android/hardware/camera2/impl/MetadataMarshalString.java
similarity index 95%
rename from core/java/android/hardware/photography/impl/MetadataMarshalString.java
rename to core/java/android/hardware/camera2/impl/MetadataMarshalString.java
index 81123ee..50b3347 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalString.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalString.java
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
 
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
 
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
diff --git a/core/java/android/hardware/photography/impl/package.html b/core/java/android/hardware/camera2/impl/package.html
similarity index 100%
rename from core/java/android/hardware/photography/impl/package.html
rename to core/java/android/hardware/camera2/impl/package.html
diff --git a/core/java/android/hardware/photography/package.html b/core/java/android/hardware/camera2/package.html
similarity index 83%
rename from core/java/android/hardware/photography/package.html
rename to core/java/android/hardware/camera2/package.html
index 578bdf5..e9d9cea 100644
--- a/core/java/android/hardware/photography/package.html
+++ b/core/java/android/hardware/camera2/package.html
@@ -14,7 +14,7 @@
 -->
 <HTML>
 <BODY>
-<p>The android.hardware.photography package provides an interface to
+<p>The android.hardware.camera2 package provides an interface to
 individual camera devices connected to an Android device. It replaces
 the deprecated {@link android.hardware.Camera} class.</p>
 
@@ -28,18 +28,18 @@
 framerate on most Android devices.</p>
 
 <p>To enumerate, query, and open available camera devices, obtain a
-{@link android.hardware.photography.CameraManager} instance.</p>
+{@link android.hardware.camera2.CameraManager} instance.</p>
 
-<p>Individual {@link android.hardware.photography.CameraDevice
+<p>Individual {@link android.hardware.camera2.CameraDevice
 CameraDevices} provide a set of static property information that
 describes the hardware device and the available settings and output
 parameters for the device. This information is provided through the
-{@link android.hardware.photography.CameraProperties} object.</p>
+{@link android.hardware.camera2.CameraProperties} object.</p>
 
 <p>To capture or stream images from a camera device, the application
 must first configure a set of output Surfaces for use with the camera
 device, with {@link
-android.hardware.photography.CameraDevice#configureOutputs}. Each
+android.hardware.camera2.CameraDevice#configureOutputs}. Each
 Surface has to be pre-configured with an appropriate size and format
 (if applicable) to match the sizes and formats available from the
 camera device. A target Surface can be obtained from a variety of
@@ -50,19 +50,19 @@
 </p>
 
 <p>The application then needs to construct a {@link
-android.hardware.photography.CaptureRequest}, which defines all the
+android.hardware.camera2.CaptureRequest}, which defines all the
 capture parameters needed by a camera device to capture a single
 image. The request also lists which of the configured output Surfaces
 should be used as targets for this capture. The CameraDevice has a
-{@link android.hardware.photography.CameraDevice#createCaptureRequest
+{@link android.hardware.camera2.CameraDevice#createCaptureRequest
 convenience factory method} for creating a request for a given use
 case which is optimized for the Android device the application is
 running on.</p>
 
 <p>Once the request has been set up, it can be handed to the
 CameraDevice either for a one-shot {@link
-android.hardware.photography.CameraDevice#capture} or for an endlessly
-{@link android.hardware.photography.CameraDevice#setRepeatingRequest
+android.hardware.camera2.CameraDevice#capture} or for an endlessly
+{@link android.hardware.camera2.CameraDevice#setRepeatingRequest
 repeating} use. Both methods also accept a list of requests to use as
 a burst capture / repeating burst. Repeating requests have a lower
 priority than captures, so a request submitted
@@ -71,7 +71,7 @@
 capture completes.</p>
 
 <p>After processing a request, the camera device will produce a {@link
-android.hardware.photography.CaptureResult} object, which contains
+android.hardware.camera2.CaptureResult} object, which contains
 information about the state of the camera device at time of capture,
 and the final settings used. These may vary somewhat from the request,
 if rounding or resolving contradictory parameters was necessary. The
diff --git a/core/java/android/hardware/photography/utils/CameraBinderDecorator.java b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
similarity index 93%
rename from core/java/android/hardware/photography/utils/CameraBinderDecorator.java
rename to core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
index 1a44b97f..586c759 100644
--- a/core/java/android/hardware/photography/utils/CameraBinderDecorator.java
+++ b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
 
-import static android.hardware.photography.CameraAccessException.CAMERA_DISABLED;
-import static android.hardware.photography.CameraAccessException.CAMERA_DISCONNECTED;
-import static android.hardware.photography.CameraAccessException.CAMERA_IN_USE;
+import static android.hardware.camera2.CameraAccessException.CAMERA_DISABLED;
+import static android.hardware.camera2.CameraAccessException.CAMERA_DISCONNECTED;
+import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
 
 import android.os.DeadObjectException;
 import android.os.RemoteException;
@@ -28,7 +28,7 @@
 /**
  * Translate camera service status_t return values into exceptions.
  *
- * @see android.hardware.photography.utils.CameraBinderDecorator#newInstance
+ * @see android.hardware.camera2.utils.CameraBinderDecorator#newInstance
  * @hide
  */
 public class CameraBinderDecorator {
diff --git a/core/java/android/hardware/photography/utils/CameraRuntimeException.java b/core/java/android/hardware/camera2/utils/CameraRuntimeException.java
similarity index 93%
rename from core/java/android/hardware/photography/utils/CameraRuntimeException.java
rename to core/java/android/hardware/camera2/utils/CameraRuntimeException.java
index 25dfc62..9ed88a9 100644
--- a/core/java/android/hardware/photography/utils/CameraRuntimeException.java
+++ b/core/java/android/hardware/camera2/utils/CameraRuntimeException.java
@@ -1,6 +1,6 @@
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
 
-import android.hardware.photography.CameraAccessException;
+import android.hardware.camera2.CameraAccessException;
 
 /**
  * @hide
diff --git a/core/java/android/hardware/photography/utils/Decorator.java b/core/java/android/hardware/camera2/utils/Decorator.java
similarity index 96%
rename from core/java/android/hardware/photography/utils/Decorator.java
rename to core/java/android/hardware/camera2/utils/Decorator.java
index ed05dd2..5826497 100644
--- a/core/java/android/hardware/photography/utils/Decorator.java
+++ b/core/java/android/hardware/camera2/utils/Decorator.java
@@ -1,12 +1,12 @@
 
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
 
 import java.lang.reflect.*;
 
 /**
  * This is an implementation of the 'decorator' design pattern using Java's proxy mechanism.
  *
- * @see android.hardware.photography.utils.Decorator#newInstance
+ * @see android.hardware.camera2.utils.Decorator#newInstance
  *
  * @hide
  */
diff --git a/core/java/android/hardware/photography/utils/UncheckedThrow.java b/core/java/android/hardware/camera2/utils/UncheckedThrow.java
similarity index 96%
rename from core/java/android/hardware/photography/utils/UncheckedThrow.java
rename to core/java/android/hardware/camera2/utils/UncheckedThrow.java
index 8eed6b1..8224fed 100644
--- a/core/java/android/hardware/photography/utils/UncheckedThrow.java
+++ b/core/java/android/hardware/camera2/utils/UncheckedThrow.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
 
 /**
  * @hide
diff --git a/core/java/android/hardware/photography/utils/package.html b/core/java/android/hardware/camera2/utils/package.html
similarity index 100%
rename from core/java/android/hardware/photography/utils/package.html
rename to core/java/android/hardware/camera2/utils/package.html
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 84c28e6..4fc885c 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -130,7 +130,7 @@
 	android_media_RemoteDisplay.cpp \
 	android_media_ToneGenerator.cpp \
 	android_hardware_Camera.cpp \
-	android_hardware_photography_CameraMetadata.cpp \
+	android_hardware_camera2_CameraMetadata.cpp \
 	android_hardware_SensorManager.cpp \
 	android_hardware_SerialPort.cpp \
 	android_hardware_UsbDevice.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 71395c7..91fdcc2 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -76,7 +76,7 @@
 extern int register_android_opengl_jni_GLES30(JNIEnv* env);
 
 extern int register_android_hardware_Camera(JNIEnv *env);
-extern int register_android_hardware_photography_CameraMetadata(JNIEnv *env);
+extern int register_android_hardware_camera2_CameraMetadata(JNIEnv *env);
 extern int register_android_hardware_SensorManager(JNIEnv *env);
 extern int register_android_hardware_SerialPort(JNIEnv *env);
 extern int register_android_hardware_UsbDevice(JNIEnv *env);
@@ -1190,7 +1190,7 @@
     REG_JNI(register_android_os_MemoryFile),
     REG_JNI(register_com_android_internal_os_ZygoteInit),
     REG_JNI(register_android_hardware_Camera),
-    REG_JNI(register_android_hardware_photography_CameraMetadata),
+    REG_JNI(register_android_hardware_camera2_CameraMetadata),
     REG_JNI(register_android_hardware_SensorManager),
     REG_JNI(register_android_hardware_SerialPort),
     REG_JNI(register_android_hardware_UsbDevice),
diff --git a/core/jni/android_hardware_photography_CameraMetadata.cpp b/core/jni/android_hardware_camera2_CameraMetadata.cpp
similarity index 98%
rename from core/jni/android_hardware_photography_CameraMetadata.cpp
rename to core/jni/android_hardware_camera2_CameraMetadata.cpp
index 5190a37..852c4d4 100644
--- a/core/jni/android_hardware_photography_CameraMetadata.cpp
+++ b/core/jni/android_hardware_camera2_CameraMetadata.cpp
@@ -38,7 +38,7 @@
 #endif
 
 // fully-qualified class name
-#define CAMERA_METADATA_CLASS_NAME "android/hardware/photography/CameraMetadata"
+#define CAMERA_METADATA_CLASS_NAME "android/hardware/camera2/CameraMetadata"
 
 using namespace android;
 
@@ -418,7 +418,7 @@
 }
 
 // Get all the required offsets in java class and register native functions
-int register_android_hardware_photography_CameraMetadata(JNIEnv *env)
+int register_android_hardware_camera2_CameraMetadata(JNIEnv *env)
 {
     // Register native functions
     return AndroidRuntime::registerNativeMethods(env,