using lock to synchronize access to ED-SDK during viewfinder operations; fixes lockup when changing photo modes during viewfinder operation