Merge "Do not call checkReadyForSleep recursively." into pi-dev