Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99e2985e authored by Jostein Kjønigsen's avatar Jostein Kjønigsen Committed by Gerrit Code Review
Browse files

Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
parent b8a5fe7b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2925,6 +2925,7 @@ public class Camera {
         * @see #getSceneMode()
         */
        public void setSceneMode(String value) {
            if(getSupportedSceneModes() == null) return;
            set(KEY_SCENE_MODE, value);
        }

@@ -2962,6 +2963,7 @@ public class Camera {
         * @see #getFlashMode()
         */
        public void setFlashMode(String value) {
	    if(getSupportedFlashModes() == null) return;
            set(KEY_FLASH_MODE, value);
        }