Loading src/com/android/contacts/ContactSaveService.java +21 −32 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ import java.util.HashSet; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.codeaurora.wrapper.UiccPhoneBookController_Wrapper; /** * A service responsible for saving changes to the content provider. */ Loading Loading @@ -707,8 +709,6 @@ public class ContactSaveService extends IntentService { if (entity.isContactInsert()) { int count = 0; Cursor c = null; Uri iccUri; SubscriptionInfo subInfoRecord = null; try { subInfoRecord = mSubscriptionManager Loading @@ -717,24 +717,13 @@ public class ContactSaveService extends IntentService { Log.w(TAG, "SecurityException thrown, lack permission for" + " getActiveSubscriptionInfoList", e); } if (subInfoRecord == null) { iccUri = Uri.parse(SimContactsConstants.SIM_URI); } else { iccUri = Uri.parse(SimContactsConstants.SIM_SUB_URI + subInfoRecord.getSubscriptionId()); if (subInfoRecord != null) { int[] adnCount = UiccPhoneBookController_Wrapper .getAdnRecordsCapacityForSubscriber(subInfoRecord.getSubscriptionId()); if(adnCount!=null) count= adnCount[MoreContactUtils.ADN_USED_POS]; } try { c = resolver.query(iccUri, null, null, null, null); if (c != null) { count = c.getCount(); } } finally { if (c != null) { c.close(); } } if (count == MoreContactUtils.getAdnCount(this, subscription)) { if (count >0 && count == MoreContactUtils.getAdnCount(this, subscription)) { return RESULT_SIM_FULL_FAILURE; } } Loading Loading
src/com/android/contacts/ContactSaveService.java +21 −32 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ import java.util.HashSet; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.codeaurora.wrapper.UiccPhoneBookController_Wrapper; /** * A service responsible for saving changes to the content provider. */ Loading Loading @@ -707,8 +709,6 @@ public class ContactSaveService extends IntentService { if (entity.isContactInsert()) { int count = 0; Cursor c = null; Uri iccUri; SubscriptionInfo subInfoRecord = null; try { subInfoRecord = mSubscriptionManager Loading @@ -717,24 +717,13 @@ public class ContactSaveService extends IntentService { Log.w(TAG, "SecurityException thrown, lack permission for" + " getActiveSubscriptionInfoList", e); } if (subInfoRecord == null) { iccUri = Uri.parse(SimContactsConstants.SIM_URI); } else { iccUri = Uri.parse(SimContactsConstants.SIM_SUB_URI + subInfoRecord.getSubscriptionId()); if (subInfoRecord != null) { int[] adnCount = UiccPhoneBookController_Wrapper .getAdnRecordsCapacityForSubscriber(subInfoRecord.getSubscriptionId()); if(adnCount!=null) count= adnCount[MoreContactUtils.ADN_USED_POS]; } try { c = resolver.query(iccUri, null, null, null, null); if (c != null) { count = c.getCount(); } } finally { if (c != null) { c.close(); } } if (count == MoreContactUtils.getAdnCount(this, subscription)) { if (count >0 && count == MoreContactUtils.getAdnCount(this, subscription)) { return RESULT_SIM_FULL_FAILURE; } } Loading