.. | .. |
---|
28 | 28 | import com.android.camera.util.GservicesHelper; |
---|
29 | 29 | import com.google.common.base.Function; |
---|
30 | 30 | import com.google.common.base.Optional; |
---|
| 31 | +import android.os.SystemProperties; |
---|
31 | 32 | |
---|
32 | 33 | /** |
---|
33 | 34 | * Creates the OneCamera feature configurations for the GoogleCamera app. |
---|
.. | .. |
---|
35 | 36 | public class OneCameraFeatureConfigCreator { |
---|
36 | 37 | private static final Log.Tag TAG = new Log.Tag("OneCamFtrCnfgCrtr"); |
---|
37 | 38 | |
---|
| 39 | + private static final String ANDROID_UVC_PROPERTY = "ro.camera.uvcfacing"; |
---|
38 | 40 | /** |
---|
39 | 41 | * Create the default camera feature config. |
---|
40 | 42 | */ |
---|
.. | .. |
---|
119 | 121 | // On LIMITED devices starting with L-MR1 we run a simple YUV |
---|
120 | 122 | // capture mode. |
---|
121 | 123 | if (supportedLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED) { |
---|
122 | | - return CaptureSupportLevel.LIMITED_JPEG; |
---|
| 124 | + // return CaptureSupportLevel.LIMITED_JPEG; |
---|
| 125 | + String uvcProperty = SystemProperties.get(ANDROID_UVC_PROPERTY, ""); |
---|
| 126 | + if(uvcProperty.equals("")){ |
---|
| 127 | + return CaptureSupportLevel.LIMITED_JPEG; |
---|
| 128 | + } |
---|
| 129 | + else{ |
---|
| 130 | + return CaptureSupportLevel.LIMITED_YUV; |
---|
| 131 | + } |
---|
123 | 132 | } |
---|
124 | 133 | |
---|
125 | 134 | // We should never get here. If we do, let's fall back to a mode |
---|