summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-24 00:51:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-24 00:51:27 +0000
commit8a8f68fc75c7b92fd32e8e6ff0a43ee024e3ac69 (patch)
treef1b97aa1e922ad3e4963118b3d5a18a263a85736 /src
parent65ea6334c0a9ad6324f2b81849ec09f9e97d6934 (diff)
parentd9c8b90cf4e2772a5d1d19a95eb11e596bf24f37 (diff)
Merge "Protect against null context." into mnc-dev
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;