Change the condition strictly for comparing address
If the number of original connection contains the number of
handover connection, connection is replaced to handover connection.
But It is a loose condition.
If there's two calls and numbers are similar(ex, 10086, 1008611),
the connections could not be replaced properly.
Test: atest CtsTelephonyTestCases
Change-Id: I304ff29cb9e26fc3b7cf82c02e08e7f87a389adb
Signed-off-by: Sungjae <sung_jae.kim@samsung.com>
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index c1d2995..3e9cab9 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -133,7 +133,7 @@
if (connection != null &&
((connection.getAddress() != null &&
mOriginalConnection.getAddress() != null &&
- mOriginalConnection.getAddress().contains(connection.getAddress())) ||
+ mOriginalConnection.getAddress().equals(connection.getAddress())) ||
connection.getState() == mOriginalConnection.getStateBeforeHandover())) {
Log.d(TelephonyConnection.this,
"SettingOriginalConnection " + mOriginalConnection.toString()