Update ShadowMatrix.java

Add the Implementation mapRect method
Fix NPE in ActivityController.

Using ActivityController.withApplication(Application) results in an NPE
because the base context is null.

Ensure that the Application object has a base context and is bound to
the proper resources.
Merge pull request #1386 from noelmansour/with-application

Fix NPE in ActivityController.
Merge pull request #1383 from dotchere1/patch-1

Update ShadowMatrix.java.