summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2014-11-25 13:52:50 -0800
committerJay Shrauner <shrauner@google.com>2014-11-25 14:02:52 -0800
commit2f3fd5f7b5ee3ef74362509ef596063cea122f89 (patch)
treed53a9cc671400ffdc62c08a99f742d1add512402 /src
parentb0b0a23bfb21c4a52003784b179932fb775885e4 (diff)
downloadandroid_packages_apps_ContactsCommon-2f3fd5f7b5ee3ef74362509ef596063cea122f89.tar.gz
android_packages_apps_ContactsCommon-2f3fd5f7b5ee3ef74362509ef596063cea122f89.tar.bz2
android_packages_apps_ContactsCommon-2f3fd5f7b5ee3ef74362509ef596063cea122f89.zip
Fix int/long mismatch for import from SIM
Make subscription id an int everywhere. Bug:18524128 Change-Id: I33e443603acb4fbf6d67697b289d99b57ff0bbcd
Diffstat (limited to 'src')
-rw-r--r--src/com/android/contacts/common/interactions/ImportExportDialogFragment.java6
-rw-r--r--src/com/android/contacts/common/util/AccountSelectionUtil.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
index fc6e4602..a9bd6847 100644
--- a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
+++ b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
@@ -231,7 +231,7 @@ public class ImportExportDialogFragment extends DialogFragment
*
* @return {@code true} if the dialog show be closed. {@code false} otherwise.
*/
- private boolean handleImportRequest(int resId, long subscriptionId) {
+ private boolean handleImportRequest(int resId, int subscriptionId) {
// There are three possibilities:
// - more than one accounts -> ask the user
// - just one account -> use the account without asking the user
@@ -243,7 +243,7 @@ public class ImportExportDialogFragment extends DialogFragment
// Send over to the account selector
final Bundle args = new Bundle();
args.putInt(KEY_RES_ID, resId);
- args.putLong(KEY_SUBSCRIPTION_ID, subscriptionId);
+ args.putInt(KEY_SUBSCRIPTION_ID, subscriptionId);
SelectAccountDialogFragment.show(
getFragmentManager(), this,
R.string.dialog_new_contact_account,
@@ -266,7 +266,7 @@ public class ImportExportDialogFragment extends DialogFragment
@Override
public void onAccountChosen(AccountWithDataSet account, Bundle extraArgs) {
AccountSelectionUtil.doImport(getActivity(), extraArgs.getInt(KEY_RES_ID),
- account, extraArgs.getLong(KEY_SUBSCRIPTION_ID));
+ account, extraArgs.getInt(KEY_SUBSCRIPTION_ID));
// At this point the dialog is still showing (which is why we can use getActivity() above)
// So close it.
diff --git a/src/com/android/contacts/common/util/AccountSelectionUtil.java b/src/com/android/contacts/common/util/AccountSelectionUtil.java
index c3780410..78cc2d5d 100644
--- a/src/com/android/contacts/common/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/common/util/AccountSelectionUtil.java
@@ -161,7 +161,7 @@ public class AccountSelectionUtil {
}
public static void doImport(Context context, int resId, AccountWithDataSet account,
- long subscriptionId) {
+ int subscriptionId) {
switch (resId) {
case R.string.import_from_sim: {
doImportFromSim(context, account, subscriptionId);
@@ -175,7 +175,7 @@ public class AccountSelectionUtil {
}
public static void doImportFromSim(Context context, AccountWithDataSet account,
- long subscriptionId) {
+ int subscriptionId) {
Intent importIntent = new Intent(Intent.ACTION_VIEW);
importIntent.setType("vnd.android.cursor.item/sim-contact");
if (account != null) {
@@ -183,7 +183,7 @@ public class AccountSelectionUtil {
importIntent.putExtra("account_type", account.type);
importIntent.putExtra("data_set", account.dataSet);
}
- importIntent.putExtra("subscription_id", subscriptionId);
+ importIntent.putExtra("subscription_id", (Integer) subscriptionId);
importIntent.setClassName("com.android.phone", "com.android.phone.SimContacts");
context.startActivity(importIntent);
}