summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2015-02-03 10:28:11 -0800
committerBrian Attwell <brianattwell@google.com>2015-02-03 10:28:11 -0800
commit90b8b6dfa7ee6ab6f2e473ea3cfa7d80e526bf9a (patch)
tree4017253362c950311408a9bd3f2ead2a9f6af71a /src/com/android/contacts
parentbfbc3d46a198c746baeb04fb2d2e275460ca2788 (diff)
downloadandroid_packages_apps_ContactsCommon-90b8b6dfa7ee6ab6f2e473ea3cfa7d80e526bf9a.tar.gz
android_packages_apps_ContactsCommon-90b8b6dfa7ee6ab6f2e473ea3cfa7d80e526bf9a.tar.bz2
android_packages_apps_ContactsCommon-90b8b6dfa7ee6ab6f2e473ea3cfa7d80e526bf9a.zip
Don't use hidden INVALID_SUBSCRIPTION_ID
Alternatively, I could unhide INVALID_SUBSCRIPTION_ID. However, the affected code doesn't actually need to know the value of SubscriptionManager#INVALID_SUBSCRIPTION_ID. ContactsCommon simply uses INVALID_SUB_ID when the value for subscription ID doesn't matter, because we know the mSubscriptionId value won't be read later. Bug: 18777272 Change-Id: I473ef361ae6cfa3a1484c38ca3aed88cc0b5d6d1
Diffstat (limited to 'src/com/android/contacts')
-rw-r--r--src/com/android/contacts/common/interactions/ImportExportDialogFragment.java4
-rw-r--r--src/com/android/contacts/common/util/AccountSelectionUtil.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
index 6f002e45..28fdf408 100644
--- a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
+++ b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
@@ -304,7 +304,9 @@ public class ImportExportDialogFragment extends DialogFragment
}
public AdapterEntry(String label, int resId) {
- this(label, resId, SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+ // Store a nonsense value for mSubscriptionId. If this constructor is used,
+ // the mSubscriptionId value should not be read later.
+ this(label, resId, /* subId = */ -1);
}
}
}
diff --git a/src/com/android/contacts/common/util/AccountSelectionUtil.java b/src/com/android/contacts/common/util/AccountSelectionUtil.java
index 78cc2d5d..cc3184d4 100644
--- a/src/com/android/contacts/common/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/common/util/AccountSelectionUtil.java
@@ -40,7 +40,7 @@ import com.android.contacts.common.vcard.ImportVCardActivity;
import java.util.List;
/**
- * Utility class for selectiong an Account for importing contact(s)
+ * Utility class for selecting an Account for importing contact(s)
*/
public class AccountSelectionUtil {
// TODO: maybe useful for EditContactActivity.java...
@@ -74,7 +74,7 @@ public class AccountSelectionUtil {
int resId) {
// Subscription id is only needed for importing from SIM card. We can safely ignore
// its value for SD card importing.
- this(context, accountList, resId, SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+ this(context, accountList, resId, /* subscriptionId = */ -1);
}
public void onClick(DialogInterface dialog, int which) {