Loading telephony/java/android/telephony/data/ApnSetting.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -1206,7 +1206,7 @@ public class ApnSetting implements Parcelable { && !other.canHandleType(TYPE_DUN) && !other.canHandleType(TYPE_DUN) && Objects.equals(this.mApnName, other.mApnName) && Objects.equals(this.mApnName, other.mApnName) && !typeSameAny(this, other) && !typeSameAny(this, other) && xorEquals(this.mProxyAddress, other.mProxyAddress) && xorEqualsString(this.mProxyAddress, other.mProxyAddress) && xorEqualsInt(this.mProxyPort, other.mProxyPort) && xorEqualsInt(this.mProxyPort, other.mProxyPort) && xorEquals(this.mProtocol, other.mProtocol) && xorEquals(this.mProtocol, other.mProtocol) && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol) && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol) Loading @@ -1215,7 +1215,7 @@ public class ApnSetting implements Parcelable { && Objects.equals(this.mMvnoType, other.mMvnoType) && Objects.equals(this.mMvnoType, other.mMvnoType) && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData) && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData) && xorEquals(this.mMmsc, other.mMmsc) && xorEquals(this.mMmsc, other.mMmsc) && xorEquals(this.mMmsProxyAddress, other.mMmsProxyAddress) && xorEqualsString(this.mMmsProxyAddress, other.mMmsProxyAddress) && xorEqualsInt(this.mMmsProxyPort, other.mMmsProxyPort)) && xorEqualsInt(this.mMmsProxyPort, other.mMmsProxyPort)) && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask) && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask) && Objects.equals(mApnSetId, other.mApnSetId) && Objects.equals(mApnSetId, other.mApnSetId) Loading @@ -1228,6 +1228,11 @@ public class ApnSetting implements Parcelable { return first == null || second == null || first.equals(second); return first == null || second == null || first.equals(second); } } // Equal or one is null. private boolean xorEqualsString(String first, String second) { return TextUtils.isEmpty(first) || TextUtils.isEmpty(second) || first.equals(second); } // Equal or one is not specified. // Equal or one is not specified. private boolean xorEqualsInt(int first, int second) { private boolean xorEqualsInt(int first, int second) { return first == UNSPECIFIED_INT || second == UNSPECIFIED_INT return first == UNSPECIFIED_INT || second == UNSPECIFIED_INT Loading Loading
telephony/java/android/telephony/data/ApnSetting.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -1206,7 +1206,7 @@ public class ApnSetting implements Parcelable { && !other.canHandleType(TYPE_DUN) && !other.canHandleType(TYPE_DUN) && Objects.equals(this.mApnName, other.mApnName) && Objects.equals(this.mApnName, other.mApnName) && !typeSameAny(this, other) && !typeSameAny(this, other) && xorEquals(this.mProxyAddress, other.mProxyAddress) && xorEqualsString(this.mProxyAddress, other.mProxyAddress) && xorEqualsInt(this.mProxyPort, other.mProxyPort) && xorEqualsInt(this.mProxyPort, other.mProxyPort) && xorEquals(this.mProtocol, other.mProtocol) && xorEquals(this.mProtocol, other.mProtocol) && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol) && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol) Loading @@ -1215,7 +1215,7 @@ public class ApnSetting implements Parcelable { && Objects.equals(this.mMvnoType, other.mMvnoType) && Objects.equals(this.mMvnoType, other.mMvnoType) && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData) && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData) && xorEquals(this.mMmsc, other.mMmsc) && xorEquals(this.mMmsc, other.mMmsc) && xorEquals(this.mMmsProxyAddress, other.mMmsProxyAddress) && xorEqualsString(this.mMmsProxyAddress, other.mMmsProxyAddress) && xorEqualsInt(this.mMmsProxyPort, other.mMmsProxyPort)) && xorEqualsInt(this.mMmsProxyPort, other.mMmsProxyPort)) && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask) && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask) && Objects.equals(mApnSetId, other.mApnSetId) && Objects.equals(mApnSetId, other.mApnSetId) Loading @@ -1228,6 +1228,11 @@ public class ApnSetting implements Parcelable { return first == null || second == null || first.equals(second); return first == null || second == null || first.equals(second); } } // Equal or one is null. private boolean xorEqualsString(String first, String second) { return TextUtils.isEmpty(first) || TextUtils.isEmpty(second) || first.equals(second); } // Equal or one is not specified. // Equal or one is not specified. private boolean xorEqualsInt(int first, int second) { private boolean xorEqualsInt(int first, int second) { return first == UNSPECIFIED_INT || second == UNSPECIFIED_INT return first == UNSPECIFIED_INT || second == UNSPECIFIED_INT Loading