Refactor to remove multiple in-loop Object[]->String[] castings

(This replaces Iaa0f3b25eaadb094a4c3fb4cecbd09e0322aae33)

This change removes the need to convert Object[]->String[] for each iteration
of each of available,tethered,errored states in updateStatus()
by converting these as soon as possible.

This fix (and the code before) is strange because each of available,tethered,
errored are defined as type ArrayList<String> but
intent.getStringArrayListExtra() returns type Object[] dispite its name.
Because other calls to updateState() use String[] it seems best to do the
conversion outside this method in the Object[] case and thus avoid the
per-iteration casting in the Object[] case and the downright wasteful
per-iteration String[]->Object[]->String[] casting in the String[] input cases.

I've also removed some unused imports and an unused variable.

Change-Id: I805ef19aa9ceff7e4fc491623cdcb413ce170798
1 file changed