diff options
author | Jay Shrauner <shrauner@google.com> | 2015-07-06 15:07:54 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-07-06 15:07:54 -0700 |
commit | 4d6b0d46545b98b5e22d8d0da2b7adf2137724be (patch) | |
tree | 268f783ea2a280d953b3438429c5d39858999df7 /src | |
parent | 0356bca6a6a84663f8d4a7075c3c2780ccdb9ca7 (diff) |
Fix NPE in setSpeakerphoneOn
Null check mActivity
Bug:22301343
Change-Id: Ia020f2a8c74cf16786af9ab7132da4eb9b9d0401
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 22a3a45a0..f2621059b 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -679,7 +679,9 @@ public class VoicemailPlaybackPresenter } } else { enableProximitySensor(); - mActivity.getWindow().clearFlags(LayoutParams.FLAG_KEEP_SCREEN_ON); + if (mActivity != null) { + mActivity.getWindow().clearFlags(LayoutParams.FLAG_KEEP_SCREEN_ON); + } } } |