diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-21 17:57:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-21 17:57:15 +0000 |
commit | 7a7189738adca650dfb8d6c3f4bbce1bb02dc0a2 (patch) | |
tree | bd9c68e9fe5c11090f6be7a16ac93704cb008c6d | |
parent | 80f76dd2540ce4d6c9998995893cae01afe4febb (diff) | |
parent | 9d1d797be52a41ed9a83790d231fa2e659666aa1 (diff) |
am 9d1d797b: Prevent NPE in VoicemailPlaybackPresenter.
* commit '9d1d797be52a41ed9a83790d231fa2e659666aa1':
Prevent NPE in VoicemailPlaybackPresenter.
-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); + } } /** |