Use reflection to figure out a readable string from install error code.

Instead of a switch that needs to be maintained, the code now
look for public static final int fields in PackageManager
whose names start with INSTALL_FAILED or INSTALL_PARSE_FAILED.

If their int value match the error code, the name of the field
is used as a human readable error string.

Change-Id: If58ddc4d9ccc40a9a8aaec9de4cc7e4931db0292
1 file changed