Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java +12 −12 Original line number Diff line number Diff line Loading @@ -16,16 +16,6 @@ package com.android.mediaframeworktest.helpers; import com.android.ex.camera2.blocking.BlockingCameraManager; import com.android.ex.camera2.blocking.BlockingCameraManager.BlockingOpenException; import com.android.ex.camera2.blocking.BlockingSessionCallback; import com.android.ex.camera2.blocking.BlockingStateCallback; import com.android.ex.camera2.exceptions.TimeoutRuntimeException; import junit.framework.Assert; import org.mockito.Mockito; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.ImageFormat; Loading Loading @@ -64,6 +54,16 @@ import android.view.WindowManager; import androidx.test.InstrumentationRegistry; import com.android.ex.camera2.blocking.BlockingCameraManager; import com.android.ex.camera2.blocking.BlockingCameraManager.BlockingOpenException; import com.android.ex.camera2.blocking.BlockingSessionCallback; import com.android.ex.camera2.blocking.BlockingStateCallback; import com.android.ex.camera2.exceptions.TimeoutRuntimeException; import junit.framework.Assert; import org.mockito.Mockito; import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.Array; Loading @@ -77,8 +77,8 @@ import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; Loading Loading @@ -225,7 +225,7 @@ public class CameraTestUtils extends Assert { } /** * Dummy listener that release the image immediately once it is available. * Mock listener that release the image immediately once it is available. * * <p> * It can be used for the case where we don't care the image data at all. Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/Preconditions.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import java.util.Objects; /** * Helper set of methods to perform precondition checks before starting method execution. * * <p>Typically used to sanity check arguments or the current object state.</p> * <p>Typically used to check arguments or the current object state.</p> */ /** * (non-Javadoc) Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/StaticMetadata.java +24 −24 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.mediaframeworktest.helpers; import junit.framework.Assert; import static com.android.mediaframeworktest.helpers.AssertHelpers.assertArrayContainsAnyOf; import android.graphics.ImageFormat; import android.graphics.Rect; Loading @@ -31,6 +31,8 @@ import android.util.Range; import android.util.Rational; import android.util.Size; import junit.framework.Assert; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; Loading @@ -40,8 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import static com.android.mediaframeworktest.helpers.AssertHelpers.assertArrayContainsAnyOf; /** * Helpers to get common static info out of the camera. * Loading Loading @@ -435,7 +435,7 @@ public class StaticMetadata { } /** * Get max AE regions and do sanity check. * Get max AE regions and do validation check. * * @return AE max regions supported by the camera device */ Loading @@ -448,7 +448,7 @@ public class StaticMetadata { } /** * Get max AWB regions and do sanity check. * Get max AWB regions and do validation check. * * @return AWB max regions supported by the camera device */ Loading @@ -461,7 +461,7 @@ public class StaticMetadata { } /** * Get max AF regions and do sanity check. * Get max AF regions and do validation check. * * @return AF max regions supported by the camera device */ Loading Loading @@ -545,7 +545,7 @@ public class StaticMetadata { } /** * Get available thumbnail sizes and do the sanity check. * Get available thumbnail sizes and do the validation check. * * @return The array of available thumbnail sizes */ Loading Loading @@ -573,7 +573,7 @@ public class StaticMetadata { } /** * Get available focal lengths and do the sanity check. * Get available focal lengths and do the validation check. * * @return The array of available focal lengths */ Loading @@ -594,7 +594,7 @@ public class StaticMetadata { } /** * Get available apertures and do the sanity check. * Get available apertures and do the validation check. * * @return The non-null array of available apertures */ Loading Loading @@ -909,7 +909,7 @@ public class StaticMetadata { } /** * Get hyperfocalDistance and do the sanity check. * Get hyperfocalDistance and do the validation check. * <p> * Note that, this tag is optional, will return -1 if this tag is not * available. Loading Loading @@ -1068,7 +1068,7 @@ public class StaticMetadata { } /** * get android.control.availableModes and do the sanity check. * get android.control.availableModes and do the validation check. * * @return available control modes. */ Loading Loading @@ -1124,7 +1124,7 @@ public class StaticMetadata { } /** * Get aeAvailableModes and do the sanity check. * Get aeAvailableModes and do the validation check. * * <p>Depending on the check level this class has, for WAR or COLLECT levels, * If the aeMode list is invalid, return an empty mode array. The the caller doesn't Loading Loading @@ -1196,7 +1196,7 @@ public class StaticMetadata { } /** * Get available AWB modes and do the sanity check. * Get available AWB modes and do the validation check. * * @return array that contains available AWB modes, empty array if awbAvailableModes is * unavailable. Loading @@ -1222,7 +1222,7 @@ public class StaticMetadata { } /** * Get available AF modes and do the sanity check. * Get available AF modes and do the validation check. * * @return array that contains available AF modes, empty array if afAvailableModes is * unavailable. Loading Loading @@ -1580,7 +1580,7 @@ public class StaticMetadata { } /** * Get value of key android.control.aeCompensationStep and do the sanity check. * Get value of key android.control.aeCompensationStep and do the validation check. * * @return default value if the value is null. */ Loading @@ -1605,7 +1605,7 @@ public class StaticMetadata { } /** * Get value of key android.control.aeCompensationRange and do the sanity check. * Get value of key android.control.aeCompensationRange and do the validation check. * * @return default value if the value is null or malformed. */ Loading Loading @@ -1635,7 +1635,7 @@ public class StaticMetadata { } /** * Get availableVideoStabilizationModes and do the sanity check. * Get availableVideoStabilizationModes and do the validation check. * * @return available video stabilization modes, empty array if it is unavailable. */ Loading Loading @@ -1666,7 +1666,7 @@ public class StaticMetadata { } /** * Get availableOpticalStabilization and do the sanity check. * Get availableOpticalStabilization and do the validation check. * * @return available optical stabilization modes, empty array if it is unavailable. */ Loading Loading @@ -1780,7 +1780,7 @@ public class StaticMetadata { } /** * Get max pipeline depth and do the sanity check. * Get max pipeline depth and do the validation check. * * @return max pipeline depth, default value if it is not available. */ Loading Loading @@ -1846,7 +1846,7 @@ public class StaticMetadata { /** * Get available capabilities and do the sanity check. * Get available capabilities and do the validation check. * * @return reported available capabilities list, empty list if the value is unavailable. */ Loading Loading @@ -2070,7 +2070,7 @@ public class StaticMetadata { } /** * Get max number of output raw streams and do the basic sanity check. * Get max number of output raw streams and do the basic validation check. * * @return reported max number of raw output stream */ Loading @@ -2083,7 +2083,7 @@ public class StaticMetadata { } /** * Get max number of output processed streams and do the basic sanity check. * Get max number of output processed streams and do the basic validation check. * * @return reported max number of processed output stream */ Loading @@ -2096,7 +2096,7 @@ public class StaticMetadata { } /** * Get max number of output stalling processed streams and do the basic sanity check. * Get max number of output stalling processed streams and do the basic validation check. * * @return reported max number of stalling processed output stream */ Loading @@ -2109,7 +2109,7 @@ public class StaticMetadata { } /** * Get lens facing and do the sanity check * Get lens facing and do the validation check * @return lens facing, return default value (BACK) if value is unavailable. */ public int getLensFacingChecked() { Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/Camera2CaptureRequestTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class Camera2CaptureRequestTest extends Camera2SurfaceViewTestCase { private void changeExposure(CaptureRequest.Builder requestBuilder, long expTime, int sensitivity) { // Check if the max analog sensitivity is available and no larger than max sensitivity. // The max analog sensitivity is not actually used here. This is only an extra sanity check. // The max analog sensitivity is not actually used here. This is only an extra check. mStaticInfo.getMaxAnalogSensitivityChecked(); expTime = mStaticInfo.getExposureClampToRange(expTime); Loading media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/Camera2RecordingTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -985,7 +985,7 @@ public class Camera2RecordingTest extends Camera2SurfaceViewTestCase { } /** * Validate video snapshot capture image object sanity and test. * Validate video snapshot capture image object soundness and test. * * <p> Check for size, format and jpeg decoding</p> * Loading Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java +12 −12 Original line number Diff line number Diff line Loading @@ -16,16 +16,6 @@ package com.android.mediaframeworktest.helpers; import com.android.ex.camera2.blocking.BlockingCameraManager; import com.android.ex.camera2.blocking.BlockingCameraManager.BlockingOpenException; import com.android.ex.camera2.blocking.BlockingSessionCallback; import com.android.ex.camera2.blocking.BlockingStateCallback; import com.android.ex.camera2.exceptions.TimeoutRuntimeException; import junit.framework.Assert; import org.mockito.Mockito; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.ImageFormat; Loading Loading @@ -64,6 +54,16 @@ import android.view.WindowManager; import androidx.test.InstrumentationRegistry; import com.android.ex.camera2.blocking.BlockingCameraManager; import com.android.ex.camera2.blocking.BlockingCameraManager.BlockingOpenException; import com.android.ex.camera2.blocking.BlockingSessionCallback; import com.android.ex.camera2.blocking.BlockingStateCallback; import com.android.ex.camera2.exceptions.TimeoutRuntimeException; import junit.framework.Assert; import org.mockito.Mockito; import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.Array; Loading @@ -77,8 +77,8 @@ import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; Loading Loading @@ -225,7 +225,7 @@ public class CameraTestUtils extends Assert { } /** * Dummy listener that release the image immediately once it is available. * Mock listener that release the image immediately once it is available. * * <p> * It can be used for the case where we don't care the image data at all. Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/Preconditions.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import java.util.Objects; /** * Helper set of methods to perform precondition checks before starting method execution. * * <p>Typically used to sanity check arguments or the current object state.</p> * <p>Typically used to check arguments or the current object state.</p> */ /** * (non-Javadoc) Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/StaticMetadata.java +24 −24 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.mediaframeworktest.helpers; import junit.framework.Assert; import static com.android.mediaframeworktest.helpers.AssertHelpers.assertArrayContainsAnyOf; import android.graphics.ImageFormat; import android.graphics.Rect; Loading @@ -31,6 +31,8 @@ import android.util.Range; import android.util.Rational; import android.util.Size; import junit.framework.Assert; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; Loading @@ -40,8 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import static com.android.mediaframeworktest.helpers.AssertHelpers.assertArrayContainsAnyOf; /** * Helpers to get common static info out of the camera. * Loading Loading @@ -435,7 +435,7 @@ public class StaticMetadata { } /** * Get max AE regions and do sanity check. * Get max AE regions and do validation check. * * @return AE max regions supported by the camera device */ Loading @@ -448,7 +448,7 @@ public class StaticMetadata { } /** * Get max AWB regions and do sanity check. * Get max AWB regions and do validation check. * * @return AWB max regions supported by the camera device */ Loading @@ -461,7 +461,7 @@ public class StaticMetadata { } /** * Get max AF regions and do sanity check. * Get max AF regions and do validation check. * * @return AF max regions supported by the camera device */ Loading Loading @@ -545,7 +545,7 @@ public class StaticMetadata { } /** * Get available thumbnail sizes and do the sanity check. * Get available thumbnail sizes and do the validation check. * * @return The array of available thumbnail sizes */ Loading Loading @@ -573,7 +573,7 @@ public class StaticMetadata { } /** * Get available focal lengths and do the sanity check. * Get available focal lengths and do the validation check. * * @return The array of available focal lengths */ Loading @@ -594,7 +594,7 @@ public class StaticMetadata { } /** * Get available apertures and do the sanity check. * Get available apertures and do the validation check. * * @return The non-null array of available apertures */ Loading Loading @@ -909,7 +909,7 @@ public class StaticMetadata { } /** * Get hyperfocalDistance and do the sanity check. * Get hyperfocalDistance and do the validation check. * <p> * Note that, this tag is optional, will return -1 if this tag is not * available. Loading Loading @@ -1068,7 +1068,7 @@ public class StaticMetadata { } /** * get android.control.availableModes and do the sanity check. * get android.control.availableModes and do the validation check. * * @return available control modes. */ Loading Loading @@ -1124,7 +1124,7 @@ public class StaticMetadata { } /** * Get aeAvailableModes and do the sanity check. * Get aeAvailableModes and do the validation check. * * <p>Depending on the check level this class has, for WAR or COLLECT levels, * If the aeMode list is invalid, return an empty mode array. The the caller doesn't Loading Loading @@ -1196,7 +1196,7 @@ public class StaticMetadata { } /** * Get available AWB modes and do the sanity check. * Get available AWB modes and do the validation check. * * @return array that contains available AWB modes, empty array if awbAvailableModes is * unavailable. Loading @@ -1222,7 +1222,7 @@ public class StaticMetadata { } /** * Get available AF modes and do the sanity check. * Get available AF modes and do the validation check. * * @return array that contains available AF modes, empty array if afAvailableModes is * unavailable. Loading Loading @@ -1580,7 +1580,7 @@ public class StaticMetadata { } /** * Get value of key android.control.aeCompensationStep and do the sanity check. * Get value of key android.control.aeCompensationStep and do the validation check. * * @return default value if the value is null. */ Loading @@ -1605,7 +1605,7 @@ public class StaticMetadata { } /** * Get value of key android.control.aeCompensationRange and do the sanity check. * Get value of key android.control.aeCompensationRange and do the validation check. * * @return default value if the value is null or malformed. */ Loading Loading @@ -1635,7 +1635,7 @@ public class StaticMetadata { } /** * Get availableVideoStabilizationModes and do the sanity check. * Get availableVideoStabilizationModes and do the validation check. * * @return available video stabilization modes, empty array if it is unavailable. */ Loading Loading @@ -1666,7 +1666,7 @@ public class StaticMetadata { } /** * Get availableOpticalStabilization and do the sanity check. * Get availableOpticalStabilization and do the validation check. * * @return available optical stabilization modes, empty array if it is unavailable. */ Loading Loading @@ -1780,7 +1780,7 @@ public class StaticMetadata { } /** * Get max pipeline depth and do the sanity check. * Get max pipeline depth and do the validation check. * * @return max pipeline depth, default value if it is not available. */ Loading Loading @@ -1846,7 +1846,7 @@ public class StaticMetadata { /** * Get available capabilities and do the sanity check. * Get available capabilities and do the validation check. * * @return reported available capabilities list, empty list if the value is unavailable. */ Loading Loading @@ -2070,7 +2070,7 @@ public class StaticMetadata { } /** * Get max number of output raw streams and do the basic sanity check. * Get max number of output raw streams and do the basic validation check. * * @return reported max number of raw output stream */ Loading @@ -2083,7 +2083,7 @@ public class StaticMetadata { } /** * Get max number of output processed streams and do the basic sanity check. * Get max number of output processed streams and do the basic validation check. * * @return reported max number of processed output stream */ Loading @@ -2096,7 +2096,7 @@ public class StaticMetadata { } /** * Get max number of output stalling processed streams and do the basic sanity check. * Get max number of output stalling processed streams and do the basic validation check. * * @return reported max number of stalling processed output stream */ Loading @@ -2109,7 +2109,7 @@ public class StaticMetadata { } /** * Get lens facing and do the sanity check * Get lens facing and do the validation check * @return lens facing, return default value (BACK) if value is unavailable. */ public int getLensFacingChecked() { Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/Camera2CaptureRequestTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class Camera2CaptureRequestTest extends Camera2SurfaceViewTestCase { private void changeExposure(CaptureRequest.Builder requestBuilder, long expTime, int sensitivity) { // Check if the max analog sensitivity is available and no larger than max sensitivity. // The max analog sensitivity is not actually used here. This is only an extra sanity check. // The max analog sensitivity is not actually used here. This is only an extra check. mStaticInfo.getMaxAnalogSensitivityChecked(); expTime = mStaticInfo.getExposureClampToRange(expTime); Loading
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/Camera2RecordingTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -985,7 +985,7 @@ public class Camera2RecordingTest extends Camera2SurfaceViewTestCase { } /** * Validate video snapshot capture image object sanity and test. * Validate video snapshot capture image object soundness and test. * * <p> Check for size, format and jpeg decoding</p> * Loading