Fix 3106858, where some CTS tests fail in BitmapFactory's decode
operations.

When BitmapFactory.Options is not set, e.g.: in the case of BitmapFactory.decodeFile(String pathName),
we generate the options settings in the native codes based on the device configuration and image
format. This resulting options may be different from the options we set to get the testing bitmap.
That's why we failed in these testing cases. Also, the failures happen in Gingerbread
because we modified the default value of BitmapFactory.Options in 288471d8a,
specifically the values of inDither and inPreferredConfig.

To fix it, we set Options for the testing bitmap based on the config of the bitmap we get from
ImageView.setImageURI() and the like.

Bug: 3106858

Change-Id: I24a04c6ee3f93e01605c48b174a7e90b91169c2d
6 files changed