Android 12.0 默认相机前摄和后摄照片大小为4:3比例
近来收到客户的反馈,想要在相机设置里把前摄和后摄的照片比例全部默认设置为4:3,因为相机前摄和后摄的4:3照片比例都是所有选项中的最高像素选项,所以我们只需通过将最高像素选项设为默认选项即可实现功能需求,具体修改点如下:
在/vendor/mediatek/proprietary/packages/apps/Camera2/feature/setting/picturesize/src/com/mediatek/camera/feature/setting/picturesize/PictureSize.java中做如下修改:
if (valueInStore == null) {
// Default picture size is the max full-ratio size.
List<String> entryValues = getEntryValues();
for (String value : entryValues) {
if (PictureSizeHelper.getStandardAspectRatio(value) == fullRatio) {
/*/start
valueInStore = value;
//*/
valueInStore =PictureSizeHelper.getMaxPictureSize(getEntryValues());
//*/end
break;
}
}
}
在/vendor/mediatek/proprietary/p