diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-21 17:56:29 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-21 17:56:29 +0000 |
commit | 93f905e4cdbc53aac4d001dce6fe81548e3372da (patch) | |
tree | 75b2d55bcf0a90f3e8df0fcdfe0d12a22b526c1b | |
parent | dd6bd7e046fbff887d127bbf3ea3404ccfe64858 (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); + } } /** |