Fix crash in PendingIntentRecord debug output.

Add null checks to a few places to avoid crashes when dumping
debug data.

Also add some sanity checks for accessing content providers in
the activity manager.
4 files changed