Merge "Use the layout frame to decide whether to do a server sync" into tm-qpr-dev