// We don't care about locales here. if (amOrPm == AM) { return KeyEvent.KEYCODE_A; } else if (amOrPm == PM) { return KeyEvent.KEYCODE_P; } else { assert false : "amOrPm value in TimePickerSpinnerDelegate can only be 0 or 1"; return -1; }