LinkProperties: use ordered comparison for P-CSCFs.
P-CSCF list is ordered list. Two lists with same servers but in different order are not equal. Use proper comparison. The P-CSCF address is a kind of entry point (proxy) of Server for IMS transaction between device and IMS Server. It can have multiple addresses as a list. Even if the same addresses have different orders, it is assumed that the server order has changed. Bug: 268479036 Test: TreeHugger (cherry picked from https://android-review.googlesource.com/q/commit:b0fc6627a6f76c02f3e420bbdd0a86581c955234) Merged-In: Ia1884f37739a20d871dd0024cc72cb18c083dc8e Change-Id: Ia1884f37739a20d871dd0024cc72cb18c083dc8e
This commit is contained in:
committed by
Cherrypicker Worker
parent
2ccf315f7f
commit
78b8ff8493
@@ -1456,9 +1456,8 @@ public final class LinkProperties implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public boolean isIdenticalPcscfs(@NonNull LinkProperties target) {
|
public boolean isIdenticalPcscfs(@NonNull LinkProperties target) {
|
||||||
Collection<InetAddress> targetPcscfs = target.getPcscfServers();
|
// list order is important, compare one by one
|
||||||
return (mPcscfs.size() == targetPcscfs.size()) ?
|
return target.getPcscfServers().equals(mPcscfs);
|
||||||
mPcscfs.containsAll(targetPcscfs) : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user