Hello,
Ill start with telling you that my front camera is broken (hardware problem). Since I almost never use it, I dont miss it and I dont want to go have it fixed yet if I dont need to.
Due to what seems a very strange implementation of the stock camera app, it doesnt work at all (Im getting a force-close on launch with error message Unfortunately, Gallery has stopped). Gallery itself works. My suspicion is that when I launch the Camera app, it tries to get both cameras properties in advance, regardless of the fact that I only want to use the rear one (which is the default on app startup!) and it fails, because its broken.
Some other apps, like OpenCamera, only try to fetch the front cameras data when I actually try to switch to it and therefore work nicely when using the rear camera (whats more, the OpenCamera doesnt CRASH, it handles the error gracefully by just displaying a nice message that the front camera might be in use by another app).
So, I didnt bother at first. But then Ive decided to become ninja and installed Cyanogen10 (10.2.1 maguro, stable version, then cm-11-20150209 nightly) and it turned out that the call ui is not working!!! I attached to adb and saw at logcat the following stack trace:
02-13 14:25:21.061 2209-2233/com.android.camera2 E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-200
Process: com.android.camera2, PID: 2209
java.lang.RuntimeException: Fail to get camera info
at android.hardware.Camera._getCameraInfo(Native Method)
at android.hardware.Camera.getCameraInfo(Camera.java: 221)
at com.android.camera.CameraHolder.<init>(CameraHolde r.java:169)
at com.android.camera.CameraHolder.instance(CameraHol der.java:123)
at com.android.camera.util.CameraUtil.openCamera(Came raUtil.java:468)
at com.android.camera.PhotoModule.openCamera(PhotoMod ule.java:1869)
at com.android.camera.PhotoModule.access0(PhotoMod ule.java:96)
at com.android.camera.PhotoModule$OpenCameraThread.ru n(PhotoModule.java:234)
Even though I never ever use video calls, the call ui seems to need the camera info no matter what (Ive tried to find something in the settings, but havent noticed anything related to disabling video calls). The effect: the logic is working (the call is initiated), but I do not have any UI to handle it, only force closes over and over again. The same with incoming calls - logic working, ringing, but no ui.
The camera bug was acceptable, but this is not. So, now, lets think of possible solutions:
1) revert to stock Android (I dont want to do that!)
2) get the sources of Cyanogen, change the system call app behaviour for my needs, build my own ROM and flash it (not really a good solution, since I would have to repeat the same fix with every update)
3) MAYBE there is a way to dig into system files and change some value that indicates whether front camera is available? MAYBE its possible without modifying some .so libs or other binaries or the kernel? Do you think it would help? (I would still have to do it after every update, but perhaps less problematic)
4) other ideas?
Ive found only one similar topic, where the fix is hardware-related: http://forum.xda-developers.com/show....php?t=1745208
Anyway, I don't think that these errors (in stock camera and CM's call ui) HAVE to be there. Front-facing camera is not absolutely necessary for these apps, it's a feature, so why is its lacking practically disabling them? This should be implemented better. But that's my opinion.
Please help who can. I dont have the necessary knowledge of Android system (yet :) ) to handle it all by myself.
Ill start with telling you that my front camera is broken (hardware problem). Since I almost never use it, I dont miss it and I dont want to go have it fixed yet if I dont need to.
Due to what seems a very strange implementation of the stock camera app, it doesnt work at all (Im getting a force-close on launch with error message Unfortunately, Gallery has stopped). Gallery itself works. My suspicion is that when I launch the Camera app, it tries to get both cameras properties in advance, regardless of the fact that I only want to use the rear one (which is the default on app startup!) and it fails, because its broken.
Some other apps, like OpenCamera, only try to fetch the front cameras data when I actually try to switch to it and therefore work nicely when using the rear camera (whats more, the OpenCamera doesnt CRASH, it handles the error gracefully by just displaying a nice message that the front camera might be in use by another app).
So, I didnt bother at first. But then Ive decided to become ninja and installed Cyanogen10 (10.2.1 maguro, stable version, then cm-11-20150209 nightly) and it turned out that the call ui is not working!!! I attached to adb and saw at logcat the following stack trace:
02-13 14:25:21.061 2209-2233/com.android.camera2 E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-200
Process: com.android.camera2, PID: 2209
java.lang.RuntimeException: Fail to get camera info
at android.hardware.Camera._getCameraInfo(Native Method)
at android.hardware.Camera.getCameraInfo(Camera.java: 221)
at com.android.camera.CameraHolder.<init>(CameraHolde r.java:169)
at com.android.camera.CameraHolder.instance(CameraHol der.java:123)
at com.android.camera.util.CameraUtil.openCamera(Came raUtil.java:468)
at com.android.camera.PhotoModule.openCamera(PhotoMod ule.java:1869)
at com.android.camera.PhotoModule.access0(PhotoMod ule.java:96)
at com.android.camera.PhotoModule$OpenCameraThread.ru n(PhotoModule.java:234)
Even though I never ever use video calls, the call ui seems to need the camera info no matter what (Ive tried to find something in the settings, but havent noticed anything related to disabling video calls). The effect: the logic is working (the call is initiated), but I do not have any UI to handle it, only force closes over and over again. The same with incoming calls - logic working, ringing, but no ui.
The camera bug was acceptable, but this is not. So, now, lets think of possible solutions:
1) revert to stock Android (I dont want to do that!)
2) get the sources of Cyanogen, change the system call app behaviour for my needs, build my own ROM and flash it (not really a good solution, since I would have to repeat the same fix with every update)
3) MAYBE there is a way to dig into system files and change some value that indicates whether front camera is available? MAYBE its possible without modifying some .so libs or other binaries or the kernel? Do you think it would help? (I would still have to do it after every update, but perhaps less problematic)
4) other ideas?
Ive found only one similar topic, where the fix is hardware-related: http://forum.xda-developers.com/show....php?t=1745208
Anyway, I don't think that these errors (in stock camera and CM's call ui) HAVE to be there. Front-facing camera is not absolutely necessary for these apps, it's a feature, so why is its lacking practically disabling them? This should be implemented better. But that's my opinion.
Please help who can. I dont have the necessary knowledge of Android system (yet :) ) to handle it all by myself.
Aucun commentaire:
Enregistrer un commentaire