Added hashcode for ApnSetting class
Without hashCode, ApnSetting can't be used as a key in the map. Fix: 162663245 Test: Manual Change-Id: I9445ec854709996c80830e4c8c498e664f1e4f9c
This commit is contained in:
@@ -1214,12 +1214,16 @@ public class ApnSetting implements Parcelable {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO - if we have this function we should also have hashCode.
|
@Override
|
||||||
// Also should handle changes in type order and perhaps case-insensitivity.
|
public int hashCode() {
|
||||||
|
return Objects.hash(mApnName, mProxyAddress, mProxyPort, mMmsc, mMmsProxyAddress,
|
||||||
|
mMmsProxyPort, mUser, mPassword, mAuthType, mApnTypeBitmask, mId, mOperatorNumeric,
|
||||||
|
mProtocol, mRoamingProtocol, mMtu, mCarrierEnabled, mNetworkTypeBitmask, mProfileId,
|
||||||
|
mPersistent, mMaxConns, mWaitTime, mMaxConnsTime, mMvnoType, mMvnoMatchData,
|
||||||
|
mApnSetId, mCarrierId, mSkip464Xlat);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (o instanceof ApnSetting == false) {
|
if (o instanceof ApnSetting == false) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user