diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 871c87e31983b95c030a00a4cb528a06959256bd..8225c430d7524b18c08ae568b81b8610c4535070 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -369,8 +369,8 @@ public class CaptureModule implements CameraModule, PhotoController, new CameraCharacteristics.Key<>("org.quic.camera.MaxPreviewSize.MaxPreviewSize", int[].class); public static CameraCharacteristics.Key<Byte> is_burstshot_supported = new CameraCharacteristics.Key<>("org.quic.camera.BurstFPS.isBurstShotSupported", Byte.class); - public static CameraCharacteristics.Key<Integer> max_burstshot_fps = - new CameraCharacteristics.Key<>("org.quic.camera.BurstFPS.MaxBurstShotFPS", int.class); + public static CameraCharacteristics.Key<Float> max_burstshot_fps = + new CameraCharacteristics.Key<>("org.quic.camera.BurstFPS.MaxBurstShotFPS", Float.class); public static CameraCharacteristics.Key<Byte> is_liveshot_size_same_as_video = new CameraCharacteristics.Key<>("org.quic.camera.LiveshotSize.isLiveshotSizeSameAsVideoSize", Byte.class); public static CameraCharacteristics.Key<Byte> is_FD_Rendering_In_Video_UI_Supported = @@ -3155,12 +3155,12 @@ public class CaptureModule implements CameraModule, PhotoController, } }; - private int calculateMaxFps(){ - int maxFps = mSettingsManager.getmaxBurstShotFPS(); + private float calculateMaxFps(){ + float maxFps = mSettingsManager.getmaxBurstShotFPS(); if(maxFps > 0) { double size = mPictureSize.getWidth() * mPictureSize.getHeight(); double maxsizefloat = mSupportedMaxPictureSize.getWidth() * mSupportedMaxPictureSize.getHeight(); - maxFps = (int)Math.round((maxsizefloat * maxFps) / size); + maxFps = (float)((maxsizefloat * maxFps) / size); if (DEBUG) { Log.i(TAG, "maxsize:" + mSupportedMaxPictureSize.getWidth() + ",height:" + mSupportedMaxPictureSize.getHeight() + "maxsize:" + maxsizefloat); Log.i(TAG, "size:" + mPictureSize.getWidth() + ",height:" + mPictureSize.getHeight() + ",size:" + size); diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java index bb27b464aa57df654634255a54efd5b75b2755ae..d1247b0f0321c0e76f392eab476605bdc12a7ebb 100755 --- a/src/com/android/camera/SettingsManager.java +++ b/src/com/android/camera/SettingsManager.java @@ -582,8 +582,8 @@ public class SettingsManager implements ListMenu.SettingsListener { return isCameraFDSupported; } - public int getmaxBurstShotFPS(){ - int maxBurstShotFPS = 0; + public float getmaxBurstShotFPS(){ + float maxBurstShotFPS = 0; try { maxBurstShotFPS = mCharacteristics.get(mCameraId).get(CaptureModule.max_burstshot_fps); } catch (IllegalArgumentException e) {