Loading src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1044,7 +1044,7 @@ public class SubscriptionDatabaseManager extends Handler { throw new IllegalArgumentException("updateSubscription: subscription does not " + "exist. subId=" + subId); } if (oldSubInfo.equals(newSubInfo)) return; if (oldSubInfo.equalsDbItemsOnly(newSubInfo)) return; if (updateDatabase(subId, createDeltaContentValues(oldSubInfo, newSubInfo)) > 0) { mAllSubscriptionInfoInternalCache.put(subId, newSubInfo); Loading src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java +19 −7 Original line number Diff line number Diff line Loading @@ -454,12 +454,13 @@ public class SubscriptionInfoInternal { */ private final int mIsOnlyNonTerrestrialNetwork; // Below are the fields that do not exist in the SimInfo table. // This field does not exist in the SimInfo table. /** * The card ID of the SIM card. This maps uniquely to {@link #mCardString}. */ private final int mCardId; // This field does not exist in the SimInfo table. /** * Whether group of the subscription is disabled. This is only useful if it's a grouped * opportunistic subscription. In this case, if all primary (non-opportunistic) subscriptions Loading Loading @@ -1370,11 +1371,14 @@ public class SubscriptionInfoInternal { + "]"; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubscriptionInfoInternal that = (SubscriptionInfoInternal) o; /** * Campare only the columns existing in the SimInfo table and the mapped variables to see if * they are equal. * * @param that SubscriptionInfoInternal to be compared * @return {@code true} if equals. */ public boolean equalsDbItemsOnly(@NonNull SubscriptionInfoInternal that) { return mId == that.mId && mSimSlotIndex == that.mSimSlotIndex && mDisplayNameSource == that.mDisplayNameSource && mIconTint == that.mIconTint && mDataRoaming == that.mDataRoaming && mIsEmbedded == that.mIsEmbedded Loading Loading @@ -1407,7 +1411,6 @@ public class SubscriptionInfoInternal { && mPortIndex == that.mPortIndex && mUsageSetting == that.mUsageSetting && mLastUsedTPMessageReference == that.mLastUsedTPMessageReference && mUserId == that.mUserId && mIsSatelliteEnabled == that.mIsSatelliteEnabled && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled && mIccId.equals(that.mIccId) && mDisplayName.equals(that.mDisplayName) && mCarrierName.equals(that.mCarrierName) && mNumber.equals(that.mNumber) && mMcc.equals(that.mMcc) && mMnc.equals(that.mMnc) && mEhplmns.equals( Loading @@ -1430,6 +1433,15 @@ public class SubscriptionInfoInternal { && mSatelliteEntitlementPlmns == that.mSatelliteEntitlementPlmns; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubscriptionInfoInternal that = (SubscriptionInfoInternal) o; return equalsDbItemsOnly(that) && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled; } @Override public int hashCode() { int result = Objects.hash(mId, mIccId, mSimSlotIndex, mDisplayName, mCarrierName, Loading Loading
src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1044,7 +1044,7 @@ public class SubscriptionDatabaseManager extends Handler { throw new IllegalArgumentException("updateSubscription: subscription does not " + "exist. subId=" + subId); } if (oldSubInfo.equals(newSubInfo)) return; if (oldSubInfo.equalsDbItemsOnly(newSubInfo)) return; if (updateDatabase(subId, createDeltaContentValues(oldSubInfo, newSubInfo)) > 0) { mAllSubscriptionInfoInternalCache.put(subId, newSubInfo); Loading
src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java +19 −7 Original line number Diff line number Diff line Loading @@ -454,12 +454,13 @@ public class SubscriptionInfoInternal { */ private final int mIsOnlyNonTerrestrialNetwork; // Below are the fields that do not exist in the SimInfo table. // This field does not exist in the SimInfo table. /** * The card ID of the SIM card. This maps uniquely to {@link #mCardString}. */ private final int mCardId; // This field does not exist in the SimInfo table. /** * Whether group of the subscription is disabled. This is only useful if it's a grouped * opportunistic subscription. In this case, if all primary (non-opportunistic) subscriptions Loading Loading @@ -1370,11 +1371,14 @@ public class SubscriptionInfoInternal { + "]"; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubscriptionInfoInternal that = (SubscriptionInfoInternal) o; /** * Campare only the columns existing in the SimInfo table and the mapped variables to see if * they are equal. * * @param that SubscriptionInfoInternal to be compared * @return {@code true} if equals. */ public boolean equalsDbItemsOnly(@NonNull SubscriptionInfoInternal that) { return mId == that.mId && mSimSlotIndex == that.mSimSlotIndex && mDisplayNameSource == that.mDisplayNameSource && mIconTint == that.mIconTint && mDataRoaming == that.mDataRoaming && mIsEmbedded == that.mIsEmbedded Loading Loading @@ -1407,7 +1411,6 @@ public class SubscriptionInfoInternal { && mPortIndex == that.mPortIndex && mUsageSetting == that.mUsageSetting && mLastUsedTPMessageReference == that.mLastUsedTPMessageReference && mUserId == that.mUserId && mIsSatelliteEnabled == that.mIsSatelliteEnabled && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled && mIccId.equals(that.mIccId) && mDisplayName.equals(that.mDisplayName) && mCarrierName.equals(that.mCarrierName) && mNumber.equals(that.mNumber) && mMcc.equals(that.mMcc) && mMnc.equals(that.mMnc) && mEhplmns.equals( Loading @@ -1430,6 +1433,15 @@ public class SubscriptionInfoInternal { && mSatelliteEntitlementPlmns == that.mSatelliteEntitlementPlmns; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubscriptionInfoInternal that = (SubscriptionInfoInternal) o; return equalsDbItemsOnly(that) && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled; } @Override public int hashCode() { int result = Objects.hash(mId, mIccId, mSimSlotIndex, mDisplayName, mCarrierName, Loading