ANDROID: ion_dummy_driver: Rework ion_dummy_driver to avoid direct indexing into the heaps

The dummy_heaps structure currently is setup so that each
entry's id value, matches its index in the array. This is
convenient in some spots, but limits how we can change things.

This patch reworks the logic so that we avoid directly indexing
into dummy_heaps using an id value. Instead we iterate over the
list and then compare the type.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: If1083da5b8a403101c23946a3bbfbe53063fccb8
1 file changed