summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-22 00:25:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-22 00:25:48 +0000
commit50297150b8568284ec85ff94fa11336f11d9d8c0 (patch)
tree386138e5c79b265783b1cc3f83bfcb2af9a42d04
parent5a1e70b3fc3c09070c5ec80d4dfa47fca46b1f91 (diff)
parentbc891fe69efcb31748441cd04bc317c1eca7edb9 (diff)
am bc891fe6: am 93f905e4: am 9d1d797b: Prevent NPE in VoicemailPlaybackPresenter.
* commit 'bc891fe69efcb31748441cd04bc317c1eca7edb9': Prevent NPE in VoicemailPlaybackPresenter.
-rw-r--r--src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java8
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);
+ }
}
/**