Merge "Add stubs needed to enable javac to compile lambdas"
diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
index b8d6960..e7b7bee 100644
--- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
+++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
@@ -1268,6 +1268,11 @@
private Size[] getInternalFormatSizes(int format, int dataspace,
boolean output, boolean highRes) {
+ // All depth formats are non-high-res.
+ if (dataspace == HAL_DATASPACE_DEPTH && highRes) {
+ return new Size[0];
+ }
+
SparseIntArray formatsMap =
!output ? mInputFormats :
dataspace == HAL_DATASPACE_DEPTH ? mDepthOutputFormats :
@@ -1286,6 +1291,8 @@
StreamConfiguration[] configurations =
(dataspace == HAL_DATASPACE_DEPTH) ? mDepthConfigurations : mConfigurations;
+ StreamConfigurationDuration[] minFrameDurations =
+ (dataspace == HAL_DATASPACE_DEPTH) ? mDepthMinFrameDurations : mMinFrameDurations;
for (StreamConfiguration config : configurations) {
int fmt = config.getFormat();
@@ -1294,8 +1301,8 @@
// Filter slow high-res output formats; include for
// highRes, remove for !highRes
long duration = 0;
- for (int i = 0; i < mMinFrameDurations.length; i++) {
- StreamConfigurationDuration d = mMinFrameDurations[i];
+ for (int i = 0; i < minFrameDurations.length; i++) {
+ StreamConfigurationDuration d = minFrameDurations[i];
if (d.getFormat() == fmt &&
d.getWidth() == config.getSize().getWidth() &&
d.getHeight() == config.getSize().getHeight()) {
@@ -1303,7 +1310,8 @@
break;
}
}
- if (highRes != (duration > DURATION_20FPS_NS)) {
+ if (dataspace != HAL_DATASPACE_DEPTH &&
+ highRes != (duration > DURATION_20FPS_NS)) {
continue;
}
}
diff --git a/tools/preload2/src/com/android/preload/DeviceUtils.java b/tools/preload2/src/com/android/preload/DeviceUtils.java
index 72de7b5..803a7f1 100644
--- a/tools/preload2/src/com/android/preload/DeviceUtils.java
+++ b/tools/preload2/src/com/android/preload/DeviceUtils.java
@@ -285,7 +285,7 @@
if (device == null) {
try {
- wait(timeout);
+ wfdl.wait(timeout);
} catch (InterruptedException e) {
// Ignore spurious wakeups.
}
@@ -304,7 +304,7 @@
if (!device.hasClients()) {
try {
- wait(timeout);
+ wfcl.wait(timeout);
} catch (InterruptedException e) {
// Ignore spurious wakeups.
}