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

Commit 286573af authored by Andalam Parthasarathi's avatar Andalam Parthasarathi
Browse files

IMS-VT: Auto fullscreen issues during UI rotation.

- Sometimes auto enter full screen runnable scheduled before
InCallActivity re creation can fire and force full screen
mode when voice call is ongoing. This can happen during VT to
Voice transition during call modify or SRVCC.
Clear pending runnable in onUiUnready to prevent this.
- Consider case where VT call UI is in fullscreen mode and the
UI orientation is changed. When InCall activity is re created
due to rotation, the fullscreen flag is still true, but actual
UI will be created in normal mode. Due to wrong fullscreen flag
value, auto enter fullscreen thread is not scheduled.
To fix this clear fullscreen flag in InCallActivity.onCreate().

Change-Id: Ic3f35aeec95e662d2fab5b3dc7bb41d813fb39b6
CRs-Fixed: 1012878 979860
parent 5c84ef57
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -214,6 +214,10 @@ public class InCallActivity extends TransactionSafeActivity implements FragmentD
        // TODO(klp): Do we need to add this back when prox sensor is not available?
        // lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;

        // Since activity is created newly, clear full screen flag. This will ensure that
        // the flag is in sync with actual UI when UI is recreated due to orientation change.
        InCallPresenter.getInstance().clearFullscreen();

        setContentView(R.layout.incall_screen);

        internalResolveIntent(getIntent());
+4 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
            CallList.getInstance().removeCallUpdateListener(mPrimaryCall.getId(), this);
        }
        mPictureModeHelper.tearDown(this);
        cancelAutoFullScreen();
    }

    /**
@@ -1290,6 +1291,9 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
        }
        Log.v(this, "cancelAutoFullScreen : cancelling pending");
        mAutoFullScreenPending = false;
        if (mHandler != null) {
            mHandler.removeCallbacks(mAutoFullscreenRunnable);
        }
    }

    private static boolean isAudioRouteEnabled(int audioRoute, int audioRouteMask) {