Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +0 −6 Original line number Diff line number Diff line Loading @@ -2170,16 +2170,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mPhone.notifyForVideoCapabilityChanged(isVideoCallEnabled()); } // TODO: Use the ImsCallSession or ImsCallProfile to tell the initial Wifi state and // {@link ImsCallSession.Listener#callSessionHandover} to listen for changes to // wifi capability caused by a handover. if (DBG) log("onFeatureCapabilityChanged: isVolteEnabled=" + isVolteEnabled() + ", isVideoCallEnabled=" + isVideoCallEnabled() + ", isVowifiEnabled=" + isVowifiEnabled() + ", isUtEnabled=" + isUtEnabled()); for (ImsPhoneConnection connection : mConnections) { connection.updateWifiState(); } mPhone.onFeatureCapabilityChanged(); Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +1 −41 Original line number Diff line number Diff line Loading @@ -100,16 +100,6 @@ public class ImsPhoneConnection extends Connection implements */ private boolean mShouldIgnoreVideoStateChanges = false; /** * Used to indicate whether the wifi state is based on * {@link com.android.ims.ImsConnectionStateListener# * onFeatureCapabilityChanged(int, int[], int[])} callbacks, or values received via the * {@link ImsCallProfile#EXTRA_CALL_RAT_TYPE} extra. Util we receive a value via the extras, * we will use the wifi state based on the {@code onFeatureCapabilityChanged}. Once a value * is received via the extras, we will prefer those values going forward. */ private boolean mIsWifiStateFromExtras = false; //***** Event Constants private static final int EVENT_DTMF_DONE = 1; private static final int EVENT_PAUSE_DONE = 2; Loading Loading @@ -179,8 +169,6 @@ public class ImsPhoneConnection extends Connection implements mCreateTime = System.currentTimeMillis(); mUusInfo = null; updateWifiState(); // Ensure any extras set on the ImsCallProfile at the start of the call are cached locally // in the ImsPhoneConnection. This isn't going to inform any listeners (since the original // connection is not likely to be associated with a TelephonyConnection yet). Loading Loading @@ -674,13 +662,11 @@ public class ImsPhoneConnection extends Connection implements } boolean updateParent = mParent.update(this, imsCall, state); boolean updateWifiState = updateWifiState(); boolean updateAddressDisplay = updateAddressDisplay(imsCall); boolean updateMediaCapabilities = updateMediaCapabilities(imsCall); boolean updateExtras = updateExtras(imsCall); return updateParent || updateWifiState || updateAddressDisplay || updateMediaCapabilities || updateExtras; return updateParent || updateAddressDisplay || updateMediaCapabilities || updateExtras; } @Override Loading Loading @@ -878,28 +864,6 @@ public class ImsPhoneConnection extends Connection implements return changed; } /** * Check for a change in the wifi state of the ImsPhoneCallTracker and update the * {@link ImsPhoneConnection} with this information. * * @return Whether the ImsPhoneCallTracker's usage of wifi has been changed. */ public boolean updateWifiState() { // If we've received the wifi state via the ImsCallProfile.EXTRA_CALL_RAT_TYPE extra, we // will no longer use state updates which are based on the onFeatureCapabilityChanged // callback. if (mIsWifiStateFromExtras) { return false; } Rlog.d(LOG_TAG, "updateWifiState: " + mOwner.isVowifiEnabled()); if (isWifi() != mOwner.isVowifiEnabled()) { setWifi(mOwner.isVowifiEnabled()); return true; } return false; } /** * Updates the wifi state based on the {@link ImsCallProfile#EXTRA_CALL_RAT_TYPE}. * The call is considered to be a WIFI call if the extra value is Loading @@ -911,10 +875,6 @@ public class ImsPhoneConnection extends Connection implements if (extras.containsKey(ImsCallProfile.EXTRA_CALL_RAT_TYPE) || extras.containsKey(ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT)) { // We've received the extra indicating the radio technology, so we will continue to // prefer the radio technology received via this extra going forward. mIsWifiStateFromExtras = true; ImsCall call = getImsCall(); boolean isWifi = false; if (call != null) { Loading tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneConnectionTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -248,8 +248,6 @@ public class ImsPhoneConnectionTest extends TelephonyTest { ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); assertTrue(mConnectionUT.isWifi()); //keep using the wifi state from extra, not update assertFalse(mConnectionUT.updateWifiState()); } @Test Loading @@ -265,7 +263,5 @@ public class ImsPhoneConnectionTest extends TelephonyTest { ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); assertTrue(mConnectionUT.isWifi()); //keep using the wifi state from extra, not update assertFalse(mConnectionUT.updateWifiState()); } } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +0 −6 Original line number Diff line number Diff line Loading @@ -2170,16 +2170,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mPhone.notifyForVideoCapabilityChanged(isVideoCallEnabled()); } // TODO: Use the ImsCallSession or ImsCallProfile to tell the initial Wifi state and // {@link ImsCallSession.Listener#callSessionHandover} to listen for changes to // wifi capability caused by a handover. if (DBG) log("onFeatureCapabilityChanged: isVolteEnabled=" + isVolteEnabled() + ", isVideoCallEnabled=" + isVideoCallEnabled() + ", isVowifiEnabled=" + isVowifiEnabled() + ", isUtEnabled=" + isUtEnabled()); for (ImsPhoneConnection connection : mConnections) { connection.updateWifiState(); } mPhone.onFeatureCapabilityChanged(); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +1 −41 Original line number Diff line number Diff line Loading @@ -100,16 +100,6 @@ public class ImsPhoneConnection extends Connection implements */ private boolean mShouldIgnoreVideoStateChanges = false; /** * Used to indicate whether the wifi state is based on * {@link com.android.ims.ImsConnectionStateListener# * onFeatureCapabilityChanged(int, int[], int[])} callbacks, or values received via the * {@link ImsCallProfile#EXTRA_CALL_RAT_TYPE} extra. Util we receive a value via the extras, * we will use the wifi state based on the {@code onFeatureCapabilityChanged}. Once a value * is received via the extras, we will prefer those values going forward. */ private boolean mIsWifiStateFromExtras = false; //***** Event Constants private static final int EVENT_DTMF_DONE = 1; private static final int EVENT_PAUSE_DONE = 2; Loading Loading @@ -179,8 +169,6 @@ public class ImsPhoneConnection extends Connection implements mCreateTime = System.currentTimeMillis(); mUusInfo = null; updateWifiState(); // Ensure any extras set on the ImsCallProfile at the start of the call are cached locally // in the ImsPhoneConnection. This isn't going to inform any listeners (since the original // connection is not likely to be associated with a TelephonyConnection yet). Loading Loading @@ -674,13 +662,11 @@ public class ImsPhoneConnection extends Connection implements } boolean updateParent = mParent.update(this, imsCall, state); boolean updateWifiState = updateWifiState(); boolean updateAddressDisplay = updateAddressDisplay(imsCall); boolean updateMediaCapabilities = updateMediaCapabilities(imsCall); boolean updateExtras = updateExtras(imsCall); return updateParent || updateWifiState || updateAddressDisplay || updateMediaCapabilities || updateExtras; return updateParent || updateAddressDisplay || updateMediaCapabilities || updateExtras; } @Override Loading Loading @@ -878,28 +864,6 @@ public class ImsPhoneConnection extends Connection implements return changed; } /** * Check for a change in the wifi state of the ImsPhoneCallTracker and update the * {@link ImsPhoneConnection} with this information. * * @return Whether the ImsPhoneCallTracker's usage of wifi has been changed. */ public boolean updateWifiState() { // If we've received the wifi state via the ImsCallProfile.EXTRA_CALL_RAT_TYPE extra, we // will no longer use state updates which are based on the onFeatureCapabilityChanged // callback. if (mIsWifiStateFromExtras) { return false; } Rlog.d(LOG_TAG, "updateWifiState: " + mOwner.isVowifiEnabled()); if (isWifi() != mOwner.isVowifiEnabled()) { setWifi(mOwner.isVowifiEnabled()); return true; } return false; } /** * Updates the wifi state based on the {@link ImsCallProfile#EXTRA_CALL_RAT_TYPE}. * The call is considered to be a WIFI call if the extra value is Loading @@ -911,10 +875,6 @@ public class ImsPhoneConnection extends Connection implements if (extras.containsKey(ImsCallProfile.EXTRA_CALL_RAT_TYPE) || extras.containsKey(ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT)) { // We've received the extra indicating the radio technology, so we will continue to // prefer the radio technology received via this extra going forward. mIsWifiStateFromExtras = true; ImsCall call = getImsCall(); boolean isWifi = false; if (call != null) { Loading
tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneConnectionTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -248,8 +248,6 @@ public class ImsPhoneConnectionTest extends TelephonyTest { ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); assertTrue(mConnectionUT.isWifi()); //keep using the wifi state from extra, not update assertFalse(mConnectionUT.updateWifiState()); } @Test Loading @@ -265,7 +263,5 @@ public class ImsPhoneConnectionTest extends TelephonyTest { ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN + ""); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); assertTrue(mConnectionUT.isWifi()); //keep using the wifi state from extra, not update assertFalse(mConnectionUT.updateWifiState()); } }