NsdService: simple cleanups

This patch replace some SparseArray<Integer> with SparseIntArray, and
simplify a value lookup function by using indexOfValue().

Test: TODO
Bug: 37013369, 33298084
Bug: 38503832

(cherry picked from commit 0f86b4480c8956b5c754b8e8ac0d83468af7065b)

Change-Id: Ifbe4f01bad8964e6f3a6e9633415959ab5feb0af
1 file changed