setPreviewTexture failed in MTK device
问题 Recently I am learning android Camera and OpenglES by grafika (Thanks fadden).It's good on most device, but I encounter bugs in some device, espacially MTK device(such as MT6580,MT8163...). For example, when "CameraCaptureActivity" run in MTK. I am getting this error: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setPreviewTexture(android.graphics.SurfaceTexture)' on a null object reference so I changed "handleSetSurfaceTexture" function to