Merge "Improvement for takeScreenshot() API"