summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-22 00:16:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-22 00:16:01 +0000
commitbc891fe69efcb31748441cd04bc317c1eca7edb9 (patch)
treef92617a80ddee647b54e572158b7b3ad04896475
parent11a953c6abdb816a8c2e35e29028e6efe6a24341 (diff)
parent93f905e4cdbc53aac4d001dce6fe81548e3372da (diff)
am 93f905e4: am 9d1d797b: Prevent NPE in VoicemailPlaybackPresenter.
* commit '93f905e4cdbc53aac4d001dce6fe81548e3372da': 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);
+ }
}
/**