Fix NPE's due to ContentProvider unavailability

Bug: 5039272
Bug: 5039228

Change-Id: I13abe01642d7165c324b6838a0f0c9d6ed8114cf
2 files changed