I'm handling an Android ANR issue. The root cause is the onDraw method in ViewfinderView calls synchronized method in CameraManager. it's means the main thread will be blocked is the lock is hold by another thread. And I found the lock is hold by the openDriver method which is pending on Camera.open. According to the notes of API "Caution: On some devices, this method may take a long time to complete"
So I want to remove synchronized from the openDriver methold. Beacuase I found too many synchronized method in CameraManager are called from main thread. Can you give me some suggestion?