Added an SDK version check to a line that calls a function only
supported from API 14 onwards.
Some tidying up.