Fix out of bounds exception

It looks like the cached index had become invalid at some
point.  It's unclear why, but the logs suggest that a
bunch of Home services crashed.

Rather than cache the index within the Activity, I have
changed the code to send the index along with the
dialog activity launch.  This way when the dialog returns,
the index will be saved within the callback.

The index should be enough because the permission set
should not change for the app between screens and the
permission set is alphabetized.

BUG: 25334674
Change-Id: I8f9189960aa7fc9b09cc25f594397523550ac626
2 files changed