summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblong <blong@codeaurora.org>2015-09-14 17:31:45 +0800
committerblong <blong@codeaurora.org>2015-09-14 17:31:45 +0800
commitd406b4e193957d00b9e71860f953021284c44e9e (patch)
tree024a089bfaa5e57f565332506bf6b4272a830130
parent52e99103f8166abdfe7231f3b3c6a0dc9e965d14 (diff)
downloadpackages_apps_ContactsCommon-d406b4e193957d00b9e71860f953021284c44e9e.tar.gz
packages_apps_ContactsCommon-d406b4e193957d00b9e71860f953021284c44e9e.tar.bz2
packages_apps_ContactsCommon-d406b4e193957d00b9e71860f953021284c44e9e.zip
Correct the interface to get and and email
- Add the correct interface to get anr and email count Change-Id: Ib85646be16a4cfc50b8b7b54937524ffe3babe57
-rw-r--r--src/com/android/contacts/common/MoreContactUtils.java28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/com/android/contacts/common/MoreContactUtils.java b/src/com/android/contacts/common/MoreContactUtils.java
index 9d7965f0..8f465ad4 100644
--- a/src/com/android/contacts/common/MoreContactUtils.java
+++ b/src/com/android/contacts/common/MoreContactUtils.java
@@ -357,7 +357,7 @@ public class MoreContactUtils {
public static int getAnrCount(int slot) {
int anrCount = 0;
- /*int[] subId = SubscriptionManager.getSubId(slot);
+ int[] subId = SubscriptionManager.getSubId(slot);
try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(
ServiceManager.getService("simphonebook"));
@@ -372,18 +372,17 @@ public class MoreContactUtils {
}
} catch (RemoteException ex) {
// ignore it
- }*/
+ }
return anrCount;
}
public static int getAdnCount(int slot) {
- int adnCount = 250;
- /*int[] subId = SubscriptionManager.getSubId(slot);
+ int adnCount = 0;
+ int[] subId = SubscriptionManager.getSubId(slot);
try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(
ServiceManager.getService("simphonebook"));
-
if (iccIpb != null) {
if (subId != null
&& TelephonyManager.getDefault().isMultiSimEnabled()) {
@@ -394,14 +393,13 @@ public class MoreContactUtils {
}
} catch (RemoteException ex) {
// ignore it
- }*/
-
+ }
return adnCount;
}
public static int getEmailCount(int slot) {
int emailCount = 0;
- /*int[] subId = SubscriptionManager.getSubId(slot);
+ int[] subId = SubscriptionManager.getSubId(slot);
try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(
ServiceManager.getService("simphonebook"));
@@ -416,7 +414,7 @@ public class MoreContactUtils {
}
} catch (RemoteException ex) {
// ignore it
- }*/
+ }
return emailCount;
}
@@ -665,16 +663,16 @@ public class MoreContactUtils {
public static int getSpareAnrCount(int sub) {
int anrCount = 0;
- /*int[] subId=SubscriptionManager.getSubId(sub);
+ int[] subId=SubscriptionManager.getSubId(sub);
try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(ServiceManager
.getService(PHONEBOOK));
if (iccIpb != null) {
if (subId != null
&& TelephonyManager.getDefault().isMultiSimEnabled()) {
- anrCount = iccIpb.getSpareEmailCountUsingSubId(subId[0]);
+ anrCount = iccIpb.getSpareAnrCountUsingSubId(subId[0]);
} else {
- anrCount = iccIpb.getSpareEmailCount();
+ anrCount = iccIpb.getSpareAnrCount();
}
}
} catch (RemoteException ex) {
@@ -685,13 +683,13 @@ public class MoreContactUtils {
}
if (DBG) {
Log.d(TAG, "getSpareAnrCount(" + sub + ") = " + anrCount);
- }*/
+ }
return anrCount;
}
public static int getSpareEmailCount(int sub) {
int emailCount = 0;
- /*int[] subId=SubscriptionManager.getSubId(sub);
+ int[] subId=SubscriptionManager.getSubId(sub);
try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(ServiceManager
.getService(PHONEBOOK));
@@ -711,7 +709,7 @@ public class MoreContactUtils {
}
if (DBG) {
Log.d(TAG, "getSpareEmailCount(" + sub + ") = " + emailCount);
- }*/
+ }
return emailCount;
}