Merge changes Ib2def344,Ifd15736b

* changes:
  Permit layout when stopped if reporting draw
  Refactor computeScreenConfigurationLocked and more.