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

Commit 0fbf7de5 authored by Devci Telephony's avatar Devci Telephony Committed by Gerrit - the friendly Code Review server
Browse files

Merge "IMS-VT: Fix orientation change not working after back key press" into atel.lnx.2.0-dev

parents 830054b2 24bab4e7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1811,16 +1811,18 @@ public class InCallPresenter implements CallList.Listener,
     * orientation event listener if allowOrientationChange is true, disables it if false.
     *
     * @param orientation {@link ActivityInfo#screenOrientation} Actual orientation value to set
     * @return returns whether the new orientation mode was set successfully or not.
     */
    public void setInCallAllowsOrientationChange(int orientation) {
    public boolean setInCallAllowsOrientationChange(int orientation) {
        if (mInCallActivity == null) {
            Log.e(this, "InCallActivity is null. Can't set requested orientation.");
            return;
            return false;
        }

        mInCallActivity.setRequestedOrientation(orientation);
        mInCallActivity.enableInCallOrientationEventListener(
                orientation == InCallOrientationEventListener.FULL_SENSOR_SCREEN_ORIENTATION);
        return true;
    }

    /* returns TRUE if screen is turned ON else false */
+2 −2
Original line number Diff line number Diff line
@@ -670,11 +670,11 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi

    private void checkForOrientationAllowedChange(Call call) {
        final int newMode = OrientationModeHandler.getInstance().getOrientation(call);
        if (newMode != mActivityOrientationMode) {
        if (newMode != mActivityOrientationMode && InCallPresenter.
                getInstance().setInCallAllowsOrientationChange(newMode)) {
            Log.d(this, "checkForOrientationAllowedChange: currMode = " +
                    mActivityOrientationMode + " newMode = " + newMode);
            mActivityOrientationMode = newMode;
            InCallPresenter.getInstance().setInCallAllowsOrientationChange(newMode);
        }
    }