Camera修改参数

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_25815655/article/details/78988961

1,修改相机预览大小

alps/vendor/mediatek/proprietary/packages/apps/Camera/src/com/android/camera/bridge/CameraDeviceExt.java

 // TODO
    @Override
    public void setPreviewSize() {
        String pictureRatio = mPreferences.getString(SettingConstants.KEY_PICTURE_RATIO, null);
        if (pictureRatio == null) {
            List<String> supportedRatios = SettingUtils.buildPreviewRatios(mActivity,
                    mParametersExt);
            if (supportedRatios != null && supportedRatios.size() > 0) {
                SharedPreferences.Editor editor = mPreferences.edit();
				//wdh_del
                //String ratioString = supportedRatios.get(supportedRatios.size() - 1);
				//wdh_add
				String ratioString = supportedRatios.get(0); 
				
				editor.putString(SettingConstants.KEY_PICTURE_RATIO, ratioString);
                editor.apply();
                pictureRatio = ratioString;
            }
        }
        SettingUtils.setPreviewSize(mActivity, mParametersExt, pictureRatio);


阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页