Revert "Camera2: create new streams if surface size has changed"

This change is redundant after the following change is merged:

Camera2: Handle surface size change

When comparing if two OutputConfigurations are equal, also check
the width, height, format, dataspace when the output configurations
were created. With this, CameraDeviceImpl knows that the surface has
changed sizes and will reconfigure the stream.

Bug: 12250682
Change-Id: I4216260a0a08ad87b835ed97e9eaddf1df317fcc
This reverts commit f49f8b0bad0c6cd5db1b603233ad008c5bac4a60.
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index 8bfcc70..6e02df1 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -95,8 +95,6 @@
             new SimpleEntry<>(REQUEST_ID_NONE, null);
     private final SparseArray<OutputConfiguration> mConfiguredOutputs =
             new SparseArray<>();
-    private final SparseArray<Size> mConfiguredOutputSizes =
-            new SparseArray<>();
 
     private final String mCameraId;
     private final CameraCharacteristics mCharacteristics;
@@ -390,14 +388,7 @@
                 if (!outputs.contains(outConfig)) {
                     deleteList.add(streamId);
                 } else {
-                    // Even if same surface and rotation, the surface can have re-sized.
-                    // If so, we must create a new stream to ensure HAL is configured correctly.
-                    Size outSize = SurfaceUtils.getSurfaceSize(outConfig.getSurface());
-                    if (!outSize.equals(mConfiguredOutputSizes.valueAt(i))) {
-                        deleteList.add(streamId);
-                    } else {
-                        addSet.remove(outConfig);  // Don't create a stream previously created
-                    }
+                    addSet.remove(outConfig);  // Don't create a stream previously created
                 }
             }
 
@@ -430,16 +421,13 @@
                 for (Integer streamId : deleteList) {
                     mRemoteDevice.deleteStream(streamId);
                     mConfiguredOutputs.delete(streamId);
-                    mConfiguredOutputSizes.delete(streamId);
                 }
 
                 // Add all new streams
                 for (OutputConfiguration outConfig : outputs) {
                     if (addSet.contains(outConfig)) {
                         int streamId = mRemoteDevice.createStream(outConfig);
-                        Size outSize = SurfaceUtils.getSurfaceSize(outConfig.getSurface());
                         mConfiguredOutputs.put(streamId, outConfig);
-                        mConfiguredOutputSizes.put(streamId, outSize);
                     }
                 }