summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-23 17:19:53 -0700
committerAndrew Lee <anwlee@google.com>2015-06-23 17:24:11 -0700
commitd9c8b90cf4e2772a5d1d19a95eb11e596bf24f37 (patch)
treede71d6bffaafe9b86a92324e7cccc4d0826199d4 /src
parent8f25a4d230989a184aa64c80330503d3fabe8490 (diff)
Protect against null context.
Bug: 22031896 Change-Id: I2da646a30a119c5be07dba8ad71c8e902969454e
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
index 5e75ca7e2..4cd8c4d13 100644
--- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
+++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
@@ -272,8 +272,8 @@ public class VoicemailPlaybackPresenter
* Must be invoked when the parent activity is paused.
*/
public void onPause() {
- int orientation = mContext.getResources().getConfiguration().orientation;
- if (mInitialOrientation != orientation && mIsPrepared) {
+ if (mContext != null && mIsPrepared
+ && mInitialOrientation != mContext.getResources().getConfiguration().orientation) {
// If an orientation change triggers the pause, retain the MediaPlayer.
Log.d(TAG, "onPause: Orientation changed.");
return;