diff options
author | Jostein Kjønigsen <jostein@kjonigsen.net> | 2013-04-03 09:12:52 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-04-13 05:41:25 -0700 |
commit | 99e2985ebcc8ed8f1cf7e2a11b25e849d28df12a (patch) | |
tree | 9ebb0dd05ff86a6370fa5bee2d1f73938e227b3c /core/java/android/hardware | |
parent | b8a5fe7b9b3226bf73fe1227a4d9641c79b19826 (diff) | |
download | frameworks_base-99e2985ebcc8ed8f1cf7e2a11b25e849d28df12a.zip frameworks_base-99e2985ebcc8ed8f1cf7e2a11b25e849d28df12a.tar.gz frameworks_base-99e2985ebcc8ed8f1cf7e2a11b25e849d28df12a.tar.bz2 |
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
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r-- | core/java/android/hardware/Camera.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 5c074ed..1d95714 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -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); } |