*/
public boolean enablePanoOrientation;
+ /**
+ * Set true if manual exposure compensation should be visible.
+ *
+ * This option is not constrained by hardware limitations.
+ * For example, this is false in HDR+ mode.
+ */
public boolean enableExposureCompensation;
+ /**
+ * Set true if the device and module support exposure compensation.
+ * Used only to show exposure button in disabled (greyed out) state.
+ */
+ public boolean isExposureCompensationSupported;
+
/** Intent UI */
/**
mModuleUI = (FrameLayout) mCameraRootView.findViewById(R.id.module_layout);
mTextureView = (TextureView) mCameraRootView.findViewById(R.id.preview_content);
mTextureViewHelper = new TextureViewHelper(mTextureView, mCaptureLayoutHelper,
- mController.getCameraProvider());
+ mController.getCameraProvider(), mController);
mTextureViewHelper.setSurfaceTextureListener(this);
mTextureViewHelper.setOnLayoutChangeListener(mPreviewLayoutChangeListener);
buttonManager.initializePanoOrientationButtons(bottomBarSpec.panoOrientationCallback);
}
- // If manual exposure is enabled and HDR is not enabled, then show the
- // exposure button.
- // If manual exposure is enabled and HDR is enabled, then disable the
- // exposure button.
- // If manual exposure is not enabled, then hide the exposure button.
+
+
+ // If manual exposure is enabled both in SettingsManager and
+ // BottomBarSpec,then show the exposure button.
+ // If manual exposure is disabled in the BottomBarSpec (eg. HDR+
+ // enabled), but the device/module has the feature, then disable the exposure
+ // button.
+ // Otherwise, hide the button.
if (bottomBarSpec.enableExposureCompensation
&& !(bottomBarSpec.minExposureCompensation == 0 && bottomBarSpec.maxExposureCompensation == 0)
&& mController.getSettingsManager().getBoolean(SettingsManager.SCOPE_GLOBAL,
}
});
buttonManager.setExposureCompensationParameters(
- bottomBarSpec.minExposureCompensation,
- bottomBarSpec.maxExposureCompensation,
- bottomBarSpec.exposureCompensationStep);
+ bottomBarSpec.minExposureCompensation,
+ bottomBarSpec.maxExposureCompensation,
+ bottomBarSpec.exposureCompensationStep);
buttonManager.setExposureCompensationCallback(
bottomBarSpec.exposureCompensationSetCallback);
buttonManager.updateExposureButtons();
} else if (mController.getSettingsManager().getBoolean(SettingsManager.SCOPE_GLOBAL,
- Keys.KEY_EXPOSURE_COMPENSATION_ENABLED)) {
+ Keys.KEY_EXPOSURE_COMPENSATION_ENABLED)
+ && bottomBarSpec.isExposureCompensationSupported) {
buttonManager.disableButton(ButtonManager.BUTTON_EXPOSURE_COMPENSATION);
} else {
buttonManager.hideButton(ButtonManager.BUTTON_EXPOSURE_COMPENSATION);