Prevent the leaking of an IntentReceiver

Only cache resources (and setup the related IntentReceiver) upon
request, so we don't leak it if the first call to the method is from
a Service.

Bug: 8029270
Change-Id: I5a4d8825cbbc53c2b8c6cd68a4fe5cd3e5215d0c
4 files changed