From 31e25767918193217c884db72aaa98e50a4957d3 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 17 Jan 2011 12:30:51 -0800 Subject: [PATCH] Follow API changes. Change-Id: I1ca0fe365b953fa98a462912309a1c9647277ba7 --- src/com/android/email/activity/MailboxListFragment.java | 2 +- src/com/android/email/activity/MessageListFragment.java | 3 +-- .../email/activity/setup/AccountCheckSettingsFragment.java | 6 +++--- .../email/activity/setup/AccountSettingsFragment.java | 2 +- .../android/email/activity/setup/AccountSetupBasics.java | 2 +- .../android/email/activity/setup/AccountSetupExchange.java | 2 +- .../android/email/activity/setup/AccountSetupIncoming.java | 2 +- .../android/email/activity/setup/AccountSetupOutgoing.java | 2 +- src/com/android/email/data/ThrottlingCursorLoader.java | 4 ++-- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/com/android/email/activity/MailboxListFragment.java b/src/com/android/email/activity/MailboxListFragment.java index 4d99ae720..797486820 100644 --- a/src/com/android/email/activity/MailboxListFragment.java +++ b/src/com/android/email/activity/MailboxListFragment.java @@ -617,7 +617,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList // Extract the messageId's to move from the ClipData (set up in MessageListItem) final long[] messageIds = new long[count]; for (int i = 0; i < count; i++) { - Uri uri = clipData.getItem(i).getUri(); + Uri uri = clipData.getItemAt(i).getUri(); String msgNum = uri.getPathSegments().get(1); long id = Long.parseLong(msgNum); messageIds[i] = id; diff --git a/src/com/android/email/activity/MessageListFragment.java b/src/com/android/email/activity/MessageListFragment.java index aaa78ad85..40ad92b47 100644 --- a/src/com/android/email/activity/MessageListFragment.java +++ b/src/com/android/email/activity/MessageListFragment.java @@ -591,8 +591,7 @@ public class MessageListFragment extends ListFragment } // Create ClipData with the Uri of the message we're long clicking ClipData data = ClipData.newUri(mActivity.getContentResolver(), - MessageListItem.MESSAGE_LIST_ITEMS_CLIP_LABEL, null, - Message.CONTENT_URI.buildUpon() + MessageListItem.MESSAGE_LIST_ITEMS_CLIP_LABEL, Message.CONTENT_URI.buildUpon() .appendPath(Long.toString(listItem.mMessageId)) .appendQueryParameter( EmailProvider.MESSAGE_URI_PARAMETER_MAILBOX_ID, diff --git a/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java b/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java index 4b8bb7dce..42af19094 100644 --- a/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java +++ b/src/com/android/email/activity/setup/AccountCheckSettingsFragment.java @@ -231,7 +231,7 @@ public class AccountCheckSettingsFragment extends Fragment { if (fm.findFragmentByTag(SecurityRequiredDialog.TAG) == null) { SecurityRequiredDialog securityRequiredDialog = SecurityRequiredDialog.newInstance(this, mErrorMessage); - fm.openTransaction() + fm.beginTransaction() .add(securityRequiredDialog, SecurityRequiredDialog.TAG) .commit(); } @@ -244,7 +244,7 @@ public class AccountCheckSettingsFragment extends Fragment { if (fm.findFragmentByTag(ErrorDialog.TAG) == null) { ErrorDialog errorDialog = ErrorDialog.newInstance(this, mErrorStringId, mErrorMessage); - fm.openTransaction() + fm.beginTransaction() .add(errorDialog, ErrorDialog.TAG) .commit(); } @@ -265,7 +265,7 @@ public class AccountCheckSettingsFragment extends Fragment { if (mCheckingDialog == null) { mCheckingDialog = CheckingDialog.newInstance(this, mState); - fm.openTransaction() + fm.beginTransaction() .add(mCheckingDialog, CheckingDialog.TAG) .commit(); } else { diff --git a/src/com/android/email/activity/setup/AccountSettingsFragment.java b/src/com/android/email/activity/setup/AccountSettingsFragment.java index 7a9e39c26..72d31edf9 100644 --- a/src/com/android/email/activity/setup/AccountSettingsFragment.java +++ b/src/com/android/email/activity/setup/AccountSettingsFragment.java @@ -546,7 +546,7 @@ public class AccountSettingsFragment extends PreferenceFragment { public boolean onPreferenceClick(Preference preference) { DeleteAccountFragment dialogFragment = DeleteAccountFragment.newInstance( mAccount, AccountSettingsFragment.this); - FragmentTransaction ft = getFragmentManager().openTransaction(); + FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.addToBackStack(null); dialogFragment.show(ft, DeleteAccountFragment.TAG); return true; diff --git a/src/com/android/email/activity/setup/AccountSetupBasics.java b/src/com/android/email/activity/setup/AccountSetupBasics.java index 01aaedff9..72053697a 100644 --- a/src/com/android/email/activity/setup/AccountSetupBasics.java +++ b/src/com/android/email/activity/setup/AccountSetupBasics.java @@ -484,7 +484,7 @@ public class AccountSetupBasics extends AccountSetupActivity AccountCheckSettingsFragment checkerFragment = AccountCheckSettingsFragment.newInstance( SetupData.CHECK_INCOMING | SetupData.CHECK_OUTGOING, null); - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.add(checkerFragment, AccountCheckSettingsFragment.TAG); transaction.addToBackStack("back"); transaction.commit(); diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index 367c18eb9..b398ba21e 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -182,7 +182,7 @@ public class AccountSetupExchange extends AccountSetupActivity public void onProceedNext(int checkMode, AccountServerBaseFragment target) { AccountCheckSettingsFragment checkerFragment = AccountCheckSettingsFragment.newInstance(checkMode, target); - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.add(checkerFragment, AccountCheckSettingsFragment.TAG); transaction.addToBackStack("back"); transaction.commit(); diff --git a/src/com/android/email/activity/setup/AccountSetupIncoming.java b/src/com/android/email/activity/setup/AccountSetupIncoming.java index 84a6a654d..3b0fe91d9 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncoming.java +++ b/src/com/android/email/activity/setup/AccountSetupIncoming.java @@ -87,7 +87,7 @@ public class AccountSetupIncoming extends AccountSetupActivity public void onProceedNext(int checkMode, AccountServerBaseFragment target) { AccountCheckSettingsFragment checkerFragment = AccountCheckSettingsFragment.newInstance(checkMode, target); - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.add(checkerFragment, AccountCheckSettingsFragment.TAG); transaction.addToBackStack("back"); transaction.commit(); diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoing.java b/src/com/android/email/activity/setup/AccountSetupOutgoing.java index 5c26727b1..8f87befea 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoing.java +++ b/src/com/android/email/activity/setup/AccountSetupOutgoing.java @@ -87,7 +87,7 @@ public class AccountSetupOutgoing extends Activity public void onProceedNext(int checkMode, AccountServerBaseFragment target) { AccountCheckSettingsFragment checkerFragment = AccountCheckSettingsFragment.newInstance(checkMode, target); - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.add(checkerFragment, AccountCheckSettingsFragment.TAG); transaction.addToBackStack("back"); transaction.commit(); diff --git a/src/com/android/email/data/ThrottlingCursorLoader.java b/src/com/android/email/data/ThrottlingCursorLoader.java index ca6e5dba4..d17ba7e5d 100644 --- a/src/com/android/email/data/ThrottlingCursorLoader.java +++ b/src/com/android/email/data/ThrottlingCursorLoader.java @@ -81,10 +81,10 @@ public class ThrottlingCursorLoader extends CursorLoader { } @Override - public void onCancelled(Cursor cursor) { + public void onCanceled(Cursor cursor) { if (Throttle.DEBUG) debugLog("onCancelled"); mThrottle.cancelScheduledCallback(); - super.onCancelled(cursor); + super.onCanceled(cursor); } @Override