Fix bounds check.
Bug: 4413945

Also remove dead code from header file.

Change-Id: I4e9fc9d7f8612fedb436e62649d308bd737ed138
2 files changed