Merge "Move call to captureDisplay outside of the synchronized block." into tm-dev