[Galaxy S Plus I9001 Android Development] mirred:
I checked yesterday logs.

The first crash:

I/CameraHAL( 133): camera_set_parameters--- rv -22
W/dalvikvm( 1571): threadid=11: thread exiting with uncaught exception (group=0x40a411f8)
E/AndroidRuntime( 1571): FATAL EXCEPTION: Thread-130
E/AndroidRuntime( 1571): java.lang.RuntimeException: setParameters failed
E/AndroidRuntime( 1571):	at android.hardware.Camera.native_setParameters(Native Method)
E/AndroidRuntime( 1571):	at android.hardware.Camera.setParameters(Camera.java:1423)
E/AndroidRuntime( 1571):	at com.android.camera.Camera.setCameraParameters(Camera.java:2278)
E/AndroidRuntime( 1571):	at com.android.camera.Camera.startPreview(Camera.java:2045)
E/AndroidRuntime( 1571):	at com.android.camera.Camera.access$3400(Camera.java:86)
E/AndroidRuntime( 1571):	at com.android.camera.Camera$5.run(Camera.java:1162)
E/AndroidRuntime( 1571):	at java.lang.Thread.run(Thread.java:856)

setParameters function is failed.

Plan to fix this problem:

1. Fix build, patch is almost ready.

2. Collect default camera settings from stock i9001 and from oisis build with correct libs and camerahal_v3 patch.

3. Update HAL to have correct camera settings.

---------- Post added at 07:41 AM ---------- Previous post was at 07:05 AM ----------

STEP 1

We should not use prebuilded libcamera_client.so from stock HW. Instead of that we can take libcamera_client.so from build. It will fix the build and prevent some unexpected problems.

Oisis tried libcamera_client.so from build and it does not work because of missed symbols.

Using stock binary and binary from Oisis I've found the difference.

The following definitions are missed:

android::CameraParameters::FOCUS_MODE_FACEDETECT	facedetect
android::CameraParameters::FOCUS_MODE_TOUCHAF	touchaf
android::CameraParameters::ISO_50	ISO50
android::CameraParameters::KEY_ANTI_SHAKE_MODE	anti-shake-mode
android::CameraParameters::KEY_AUTO_CONTRAST	auto-contrast
android::CameraParameters::KEY_BEAUTY_MODE	beauty-mode
android::CameraParameters::KEY_BLUR_MODE	blur-mode
android::CameraParameters::KEY_VINTAGE_MODE	vintage-mode
android::CameraParameters::KEY_WDR_MODE	wdr-mode
android::CameraParameters::SCENE_MODE_DAWN	dawn
android::CameraParameters::SCENE_MODE_FALL_COLOR	fall-color
android::CameraParameters::SCENE_MODE_TEXT	text
android::CameraParameters::VINTAGE_MODE_BNW	bnw
android::CameraParameters::VINTAGE_MODE_COOL	cool
android::CameraParameters::VINTAGE_MODE_NORMAL	normal
android::CameraParameters::VINTAGE_MODE_OFF	off
android::CameraParameters::VINTAGE_MODE_WARM warm

They are implemented is source code, but they aunder define "SAMSUNG_CAMERA_QCOM".

I don't know hot to add it globaly and correctly, so I've updated makefile. If you know better way, you're welcome. :)

File ./libs/camera/Android.mk should be updated like that, diff is red:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

[COLOR="Red"]LOCAL_CFLAGS += -DSAMSUNG_CAMERA_QCOM[/COLOR]

LOCAL_SRC_FILES:= \
Camera.cpp \
CameraParameters.cpp \
ICamera.cpp \
ICameraClient.cpp \
ICameraService.cpp \
ICameraRecordingProxy.cpp \
ICameraRecordingProxyListener.cpp

LOCAL_SHARED_LIBRARIES := \
libcutils \
libutils \
libbinder \
libhardware \
libui \
libgui

LOCAL_MODULE:= libcamera_client

include $(BUILD_SHARED_LIBRARY)