Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9c8b90c authored by Andrew Lee's avatar Andrew Lee
Browse files

Protect against null context.

Bug: 22031896
Change-Id: I2da646a30a119c5be07dba8ad71c8e902969454e
parent 8f25a4d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;