diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-20 14:44:56 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-08-21 10:23:17 -0700 |
commit | 9d1d797be52a41ed9a83790d231fa2e659666aa1 (patch) | |
tree | acbb5ccea224bee4fccfa60ae2a6fe2c26c78ecb /src/com/android | |
parent | 6b9d9a0b7f7e9e2e5e4d7c03a63581bff84346a6 (diff) |
Prevent NPE in VoicemailPlaybackPresenter.
Bug: 23386856
Change-Id: Ib87184199e8578a1fe3b0a6457b26069673f56ca
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 7270af787..9319b6ed9 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -417,9 +417,11 @@ public class VoicemailPlaybackPresenter super(handler); mFetchResultHandler = handler; - mContext.getContentResolver().registerContentObserver( - voicemailUri, false, this); - mFetchResultHandler.postDelayed(this, FETCH_CONTENT_TIMEOUT_MS); + if (mContext != null) { + mContext.getContentResolver().registerContentObserver( + voicemailUri, false, this); + mFetchResultHandler.postDelayed(this, FETCH_CONTENT_TIMEOUT_MS); + } } /** |