Merge "camera2: rename getConcurrentStreamingCameraIds() -> getConcurrentCameraIds()" into rvc-dev am: 6241aceae8

Change-Id: I8af5b2697d1f0d1080fedf7a26bbb05c1e06e003
This commit is contained in:
Automerger Merge Worker
2020-03-14 01:48:14 +00:00
6 changed files with 19 additions and 19 deletions

View File

@@ -17356,7 +17356,7 @@ package android.hardware.camera2 {
public final class CameraManager {
method @NonNull public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(@NonNull String) throws android.hardware.camera2.CameraAccessException;
method @NonNull public String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException;
method @NonNull public java.util.Set<java.util.Set<java.lang.String>> getConcurrentStreamingCameraIds() throws android.hardware.camera2.CameraAccessException;
method @NonNull public java.util.Set<java.util.Set<java.lang.String>> getConcurrentCameraIds() throws android.hardware.camera2.CameraAccessException;
method @RequiresPermission(android.Manifest.permission.CAMERA) public boolean isConcurrentSessionConfigurationSupported(@NonNull java.util.Map<java.lang.String,android.hardware.camera2.params.SessionConfiguration>) throws android.hardware.camera2.CameraAccessException;
method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, @NonNull android.hardware.camera2.CameraDevice.StateCallback, @Nullable android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException;

View File

@@ -1978,7 +1978,7 @@ public abstract class PackageManager {
* Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device's main front and back cameras can stream
* concurrently as described in {@link
* android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds()}
* android.hardware.camera2.CameraManager#getConcurrentCameraIds()}
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_CAMERA_CONCURRENT = "android.hardware.camera.concurrent";

View File

@@ -2884,12 +2884,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* generated according to the documented
* {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each device
* which has its Id present in the set returned by
* {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds}.
* {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}.
* Clients can use the array as a quick reference to find an appropriate camera stream
* combination.
* The mandatory stream combination array will be {@code null} in case the device is not a part
* of at least one set of combinations returned by
* {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds}.</p>
* {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}.</p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
*/
@PublicKey

View File

@@ -681,7 +681,7 @@ public abstract class CameraDevice implements AutoCloseable {
* </p>
*
*<p>Devices capable of streaming concurrently with other devices as described by
* {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds} have the
* {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds} have the
* following guaranteed streams (when streaming concurrently with other devices)</p>
*
* <table>

View File

@@ -160,8 +160,8 @@ public final class CameraManager {
* @throws CameraAccessException if the camera device has been disconnected.
*/
@NonNull
public Set<Set<String>> getConcurrentStreamingCameraIds() throws CameraAccessException {
return CameraManagerGlobal.get().getConcurrentStreamingCameraIds();
public Set<Set<String>> getConcurrentCameraIds() throws CameraAccessException {
return CameraManagerGlobal.get().getConcurrentCameraIds();
}
/**
@@ -189,11 +189,11 @@ public final class CameraManager {
*
* @return {@code true} if the given combination of session configurations and corresponding
* camera ids are concurrently supported by the camera sub-system,
* {@code false} otherwise.
* {@code false} otherwise OR if the set of camera devices provided is not a subset of
* those returned by {@link #getConcurrentCameraIds}.
*
* @throws IllegalArgumentException if the set of camera devices provided is not a subset of
* those returned by getConcurrentStreamingCameraIds()
* @throws CameraAccessException if one of the camera devices queried is no longer connected.
*
*/
@RequiresPermission(android.Manifest.permission.CAMERA)
public boolean isConcurrentSessionConfigurationSupported(
@@ -1183,7 +1183,7 @@ public final class CameraManager {
try {
ConcurrentCameraIdCombination[] cameraIdCombinations =
cameraService.getConcurrentStreamingCameraIds();
cameraService.getConcurrentCameraIds();
for (ConcurrentCameraIdCombination comb : cameraIdCombinations) {
mConcurrentCameraIdCombinations.add(comb.getConcurrentCameraIdCombination());
}
@@ -1372,7 +1372,7 @@ public final class CameraManager {
return cameraIds;
}
public @NonNull Set<Set<String>> getConcurrentStreamingCameraIds() {
public @NonNull Set<Set<String>> getConcurrentCameraIds() {
Set<Set<String>> concurrentStreamingCameraIds = null;
synchronized (mLock) {
// Try to make sure we have an up-to-date list of concurrent camera devices.
@@ -1398,7 +1398,7 @@ public final class CameraManager {
synchronized (mLock) {
// Go through all the elements and check if the camera ids are valid at least /
// belong to one of the combinations returned by getConcurrentStreamingCameraIds()
// belong to one of the combinations returned by getConcurrentCameraIds()
boolean subsetFound = false;
for (Set<String> combination : mConcurrentCameraIdCombinations) {
if (combination.containsAll(cameraIdsAndSessionConfigurations.keySet())) {
@@ -1406,9 +1406,9 @@ public final class CameraManager {
}
}
if (!subsetFound) {
throw new IllegalArgumentException(
"The set of camera ids provided is not a subset of"
+ "getConcurrentStreamingCameraIds");
Log.v(TAG, "isConcurrentSessionConfigurationSupported called with a subset of"
+ "camera ids not returned by getConcurrentCameraIds");
return false;
}
CameraIdAndSessionConfiguration [] cameraIdsAndConfigs =
new CameraIdAndSessionConfiguration[size];
@@ -1436,10 +1436,10 @@ public final class CameraManager {
/**
* Helper function to find out if a camera id is in the set of combinations returned by
* getConcurrentStreamingCameraIds()
* getConcurrentCameraIds()
* @param cameraId the unique identifier of the camera device to query
* @return Whether the camera device was found in the set of combinations returned by
* getConcurrentStreamingCameraIds
* getConcurrentCameraIds
*/
public boolean cameraIdHasConcurrentStreamsLocked(String cameraId) {
if (!mDeviceStatus.containsKey(cameraId)) {

View File

@@ -721,7 +721,7 @@ public final class MandatoryStreamCombination {
/**
* Retrieve a list of all available mandatory concurrent stream combinations.
* This method should only be called for devices which are listed in combinations returned
* by CameraManager.getConcurrentStreamingCameraIds.
* by CameraManager.getConcurrentCameraIds.
*
* @return a non-modifiable list of supported mandatory concurrent stream combinations.
*/