Fix IndexOutOfBoundsException in HubEndpointInfo

new ArrayList<>(int) only sets the capacity, and add() is needed when
adding new elements initially to prevent out of bounds exception.

Bug: 378487799
Flag: android.chre.flags.offload_api
Test: Run default Context Hub HAL, verify no service crash

Change-Id: I650e4dba20e74faf5aed3e7a433b6737f536ab3e
1 file changed