Generic fix for hooking to getTopLevelResources. Tested on HTC One X.

As per title above. Code however isn't cleaned up. Meant for wide testing and perhaps some optimizations.