Updated for 4.0 SDK changes.