当前位置: 首页>>代码示例>>Java>>正文


Java CameraUtil.isFocusAreaSupported方法代码示例

本文整理汇总了Java中com.android.camera.util.CameraUtil.isFocusAreaSupported方法的典型用法代码示例。如果您正苦于以下问题:Java CameraUtil.isFocusAreaSupported方法的具体用法?Java CameraUtil.isFocusAreaSupported怎么用?Java CameraUtil.isFocusAreaSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.camera.util.CameraUtil的用法示例。


在下文中一共展示了CameraUtil.isFocusAreaSupported方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeCapabilities

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
private void initializeCapabilities() {
    mInitialParams = mCameraDevice.getParameters();
    mFocusAreaSupported = CameraUtil.isFocusAreaSupported(mInitialParams);
    mMeteringAreaSupported = CameraUtil.isMeteringAreaSupported(mInitialParams);
    mAeLockSupported = CameraUtil.isAutoExposureLockSupported(mInitialParams);
    mAwbLockSupported = CameraUtil.isAutoWhiteBalanceLockSupported(mInitialParams);
    mContinuousFocusSupported = mInitialParams.getSupportedFocusModes().contains(
            CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE);
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:10,代码来源:PhotoModule.java

示例2: setParameters

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
public void setParameters(Parameters parameters) {
    // parameters can only be null when onConfigurationChanged is called
    // before camera is open. We will just return in this case, because
    // parameters will be set again later with the right parameters after
    // camera is open.
    if (parameters == null) return;
    mParameters = parameters;
    mFocusAreaSupported = CameraUtil.isFocusAreaSupported(parameters);
    mMeteringAreaSupported = CameraUtil.isMeteringAreaSupported(parameters);
    mLockAeAwbNeeded = (CameraUtil.isAutoExposureLockSupported(mParameters) ||
            CameraUtil.isAutoWhiteBalanceLockSupported(mParameters));
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:13,代码来源:FocusOverlayManager.java

示例3: initPreference

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
private void initPreference(PreferenceGroup group) {
        ListPreference videoQuality = group.findPreference(KEY_VIDEO_QUALITY);
        ListPreference timeLapseInterval = group.findPreference(KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL);
        ListPreference pictureSize = group.findPreference(KEY_PICTURE_SIZE);
        ListPreference whiteBalance =  group.findPreference(KEY_WHITE_BALANCE);
        ListPreference sceneMode = group.findPreference(KEY_SCENE_MODE);
        ListPreference flashMode = group.findPreference(KEY_FLASH_MODE);
        ListPreference focusMode = group.findPreference(KEY_FOCUS_MODE);
        IconListPreference exposure =
                (IconListPreference) group.findPreference(KEY_EXPOSURE);
        IconListPreference cameraIdPref =
                (IconListPreference) group.findPreference(KEY_CAMERA_ID);
        ListPreference videoFlashMode =
                group.findPreference(KEY_VIDEOCAMERA_FLASH_MODE);
        ListPreference videoEffect = group.findPreference(KEY_VIDEO_EFFECT);
        ListPreference cameraHdr = group.findPreference(KEY_CAMERA_HDR);
        ListPreference cameraHdrPlus = group.findPreference(KEY_CAMERA_HDR_PLUS);

        // Since the screen could be loaded from different resources, we need
        // to check if the preference is available here
        if (videoQuality != null) {
            filterUnsupportedOptions(group, videoQuality, getSupportedVideoQuality(mCameraId));
        }

        if (pictureSize != null) {
            filterUnsupportedOptions(group, pictureSize, sizeListToStringList(
                    mParameters.getSupportedPictureSizes()));
            filterSimilarPictureSize(group, pictureSize);
        }
        if (whiteBalance != null) {
            filterUnsupportedOptions(group,
                    whiteBalance, mParameters.getSupportedWhiteBalance());
        }
        if (sceneMode != null) {
            filterUnsupportedOptions(group,
                    sceneMode, mParameters.getSupportedSceneModes());
        }
        if (flashMode != null) {
            filterUnsupportedOptions(group,
                    flashMode, mParameters.getSupportedFlashModes());
        }
        if (focusMode != null) {
            if (!CameraUtil.isFocusAreaSupported(mParameters)) {
                filterUnsupportedOptions(group,
                        focusMode, mParameters.getSupportedFocusModes());
            } else {
                // Remove the focus mode if we can use tap-to-focus.
                removePreference(group, focusMode.getKey());
            }
        }
        if (videoFlashMode != null) {
            filterUnsupportedOptions(group,
                    videoFlashMode, mParameters.getSupportedFlashModes());
        }
        if (exposure != null) buildExposureCompensation(group, exposure);
        if (cameraIdPref != null) buildCameraId(group, cameraIdPref);

        if (timeLapseInterval != null) {
            resetIfInvalid(timeLapseInterval);
        }
        if (videoEffect != null) {
            filterUnsupportedOptions(group, videoEffect, null);
        }
//        if (videoEffect != null) {
//                initVideoEffect(group, videoEffect);
//                resetIfInvalid(videoEffect);
//        }
        if (cameraHdr != null && (!ApiHelper.HAS_CAMERA_HDR
                || !CameraUtil.isCameraHdrSupported(mParameters))) {
            removePreference(group, cameraHdr.getKey());
        }

        int frontCameraId = CameraHolder.instance().getFrontCameraId();
        boolean isFrontCamera = (frontCameraId == mCameraId);
        if (cameraHdrPlus != null && (!ApiHelper.HAS_CAMERA_HDR_PLUS ||
                !GcamHelper.hasGcamCapture() || isFrontCamera)) {
            removePreference(group, cameraHdrPlus.getKey());
        }
    }
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:80,代码来源:CameraSettings.java


注:本文中的com.android.camera.util.CameraUtil.isFocusAreaSupported方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。