Use min when comparing AM and PM text lengths

Also cleans up code a little to prevent unnecessary re-computation
of lower-cased strings and use final where possible.

BUG: 18874813
Change-Id: I852eb7a281aed64ac36e95f32f5fa410f50abfa4
1 file changed