Loading core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java +17 −4 Original line number Diff line number Diff line Loading @@ -85,7 +85,9 @@ public class LegacyMetadataMapper { * being set to true. */ static final boolean LIE_ABOUT_AE_STATE = true; static final boolean LIE_ABOUT_AE_MAX_REGIONS = true; static final boolean LIE_ABOUT_AF = true; static final boolean LIE_ABOUT_AF_MAX_REGIONS = true; static final boolean LIE_ABOUT_AWB = true; /** Loading Loading @@ -365,12 +367,23 @@ public class LegacyMetadataMapper { /* * android.control.maxRegions */ final int AE = 0, AWB = 1, AF = 2; int[] maxRegions = new int[3]; maxRegions[0] = p.getMaxNumMeteringAreas(); maxRegions[1] = 0; // AWB regions not supported in API1 maxRegions[2] = p.getMaxNumFocusAreas(); maxRegions[AE] = p.getMaxNumMeteringAreas(); maxRegions[AWB] = 0; // AWB regions not supported in API1 maxRegions[AF] = p.getMaxNumFocusAreas(); if (LIE_ABOUT_AE_MAX_REGIONS) { maxRegions[AE] = 0; } if (LIE_ABOUT_AF_MAX_REGIONS) { maxRegions[AF] = 0; } m.set(CONTROL_MAX_REGIONS, maxRegions); // TODO // TODO rest of control fields } private static void mapLens(CameraMetadataNative m, Camera.Parameters p) { Loading core/java/android/hardware/camera2/legacy/LegacyResultMapper.java +11 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,17 @@ public class LegacyResultMapper { // TODO: Implement precapture trigger, after which we can report CONVERGED ourselves m.set(CONTROL_AE_STATE, CONTROL_AE_STATE_CONVERGED); } // control.aeRegions /* * TODO: Use the *resulting* crop region to calculate intersection with * metering region * * Report the sensor-relative metering region in the result even * if that's not actually the real thing (similar to how we do it * for zooming) */ } Loading Loading
core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java +17 −4 Original line number Diff line number Diff line Loading @@ -85,7 +85,9 @@ public class LegacyMetadataMapper { * being set to true. */ static final boolean LIE_ABOUT_AE_STATE = true; static final boolean LIE_ABOUT_AE_MAX_REGIONS = true; static final boolean LIE_ABOUT_AF = true; static final boolean LIE_ABOUT_AF_MAX_REGIONS = true; static final boolean LIE_ABOUT_AWB = true; /** Loading Loading @@ -365,12 +367,23 @@ public class LegacyMetadataMapper { /* * android.control.maxRegions */ final int AE = 0, AWB = 1, AF = 2; int[] maxRegions = new int[3]; maxRegions[0] = p.getMaxNumMeteringAreas(); maxRegions[1] = 0; // AWB regions not supported in API1 maxRegions[2] = p.getMaxNumFocusAreas(); maxRegions[AE] = p.getMaxNumMeteringAreas(); maxRegions[AWB] = 0; // AWB regions not supported in API1 maxRegions[AF] = p.getMaxNumFocusAreas(); if (LIE_ABOUT_AE_MAX_REGIONS) { maxRegions[AE] = 0; } if (LIE_ABOUT_AF_MAX_REGIONS) { maxRegions[AF] = 0; } m.set(CONTROL_MAX_REGIONS, maxRegions); // TODO // TODO rest of control fields } private static void mapLens(CameraMetadataNative m, Camera.Parameters p) { Loading
core/java/android/hardware/camera2/legacy/LegacyResultMapper.java +11 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,17 @@ public class LegacyResultMapper { // TODO: Implement precapture trigger, after which we can report CONVERGED ourselves m.set(CONTROL_AE_STATE, CONTROL_AE_STATE_CONVERGED); } // control.aeRegions /* * TODO: Use the *resulting* crop region to calculate intersection with * metering region * * Report the sensor-relative metering region in the result even * if that's not actually the real thing (similar to how we do it * for zooming) */ } Loading