Use toArray(T[]) instead of toArray().

toArray() always creates Object array, which can't be cast to array type
of specific types.

Bug: None
Test: Package can be installed and uninstalled correctly with a package
list.

Change-Id: I9d6c8c2b1c3de767b87643f4c3aaff1044e33fbc
Merged-In: I9d6c8c2b1c3de767b87643f4c3aaff1044e33fbc
1 file changed