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

Commit 6e66ce3c authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

RTT bugfixes and logging am: 27fc8424

am: 0dfbcc73

Change-Id: I9197f7ce42e3af6b4059ee24d9db3b70e2949ec9
parents 45cc8cc8 0dfbcc73
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1652,6 +1652,7 @@ public class ImsCall implements ICall {
            // Make a copy of the current ImsCallProfile and modify it to enable RTT
            Parcel p = Parcel.obtain();
            mCallProfile.writeToParcel(p, 0);
            p.setDataPosition(0);
            ImsCallProfile requestedProfile = new ImsCallProfile(p);
            requestedProfile.mMediaProfile.setRttMode(ImsStreamMediaProfile.RTT_MODE_FULL);

@@ -3101,6 +3102,7 @@ public class ImsCall implements ICall {
        public void callSessionRttModifyRequestReceived(ImsCallSession session,
                ImsCallProfile callProfile) {
            ImsCall.Listener listener;
            logi("callSessionRttModifyRequestReceived");

            synchronized(ImsCall.this) {
                listener = mListener;
@@ -3125,6 +3127,7 @@ public class ImsCall implements ICall {
        public void callSessionRttModifyResponseReceived(int status) {
            ImsCall.Listener listener;

            logi("callSessionRttModifyResponseReceived");
            synchronized(ImsCall.this) {
                listener = mListener;
            }
+22 −0
Original line number Diff line number Diff line
@@ -1635,6 +1635,28 @@ public class ImsManager {
        }
    }

    public void setRttEnabled(boolean enabled) {
        try {
            setAdvanced4GMode(enabled || isEnhanced4gLteModeSettingEnabledByUser());
            final int value = enabled ? ImsConfig.FeatureValueConstants.ON :
                    ImsConfig.FeatureValueConstants.OFF;
            Thread thread = new Thread(() -> {
                try {
                    Log.i(ImsManager.class.getSimpleName(), "Setting RTT enabled to " + enabled);
                    getConfigInterface().setProvisionedValue(
                            ImsConfig.ConfigConstants.RTT_SETTING_ENABLED, value);
                } catch (ImsException e) {
                    Log.e(ImsManager.class.getSimpleName(), "Unable to set RTT enabled to "
                            + enabled + ": " + e);
                }
            });
            thread.start();
        } catch (ImsException e) {
            Log.e(ImsManager.class.getSimpleName(), "Unable to set RTT enabled to " + enabled
                    + ": " + e);
        }
    }

    /**
     * Set the TTY mode. This is the actual tty mode (varies depending on peripheral status)
     */