Revert "Merge pull request #1272 from bastiaanve/master"

This reverts commit cb6e4d3d83880dca12b27620e773b90704c11533, reversing
changes made to 0de7da47d40945772b49008a3908e47f83d5b79b.

This is causing some tests to fail at Google, I think we want to reapply this patch and address the failures offline (including test cases in Robolectric that cover the failures) but as it stands it blocking us upgrading to the latest snapshot.