diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-01-17 12:28:35 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-01-17 12:28:35 -0800 |
commit | 48e7b458694acdf3a4fc58e62437f1dbc4f29d83 (patch) | |
tree | 9e9cddf725d523f3fa86b7ff848ab887c566954b /core/java | |
parent | 9ed99405ae8cdd9038071a872e7d92cf256f2165 (diff) | |
download | frameworks_base-48e7b458694acdf3a4fc58e62437f1dbc4f29d83.zip frameworks_base-48e7b458694acdf3a4fc58e62437f1dbc4f29d83.tar.gz frameworks_base-48e7b458694acdf3a4fc58e62437f1dbc4f29d83.tar.bz2 |
Start renaming FragmentTransaction.openTransaction() to beginTransaction().
Change-Id: Ib4a6d824b33cca699b7b25159c491fb610d5f5da
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/app/DialogFragment.java | 4 | ||||
-rw-r--r-- | core/java/android/app/FragmentManager.java | 9 | ||||
-rw-r--r-- | core/java/android/app/LoaderManager.java | 2 | ||||
-rw-r--r-- | core/java/android/preference/PreferenceActivity.java | 6 | ||||
-rw-r--r-- | core/java/com/android/internal/app/ActionBarImpl.java | 2 |
5 files changed, 14 insertions, 9 deletions
diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java index 6194240..6f25293 100644 --- a/core/java/android/app/DialogFragment.java +++ b/core/java/android/app/DialogFragment.java @@ -218,7 +218,7 @@ public class DialogFragment extends Fragment * {@link FragmentTransaction#add(Fragment, String) FragmentTransaction.add}. */ public void show(FragmentManager manager, String tag) { - FragmentTransaction ft = manager.openTransaction(); + FragmentTransaction ft = manager.beginTransaction(); ft.add(this, tag); ft.commit(); } @@ -260,7 +260,7 @@ public class DialogFragment extends Fragment FragmentManager.POP_BACK_STACK_INCLUSIVE); mBackStackId = -1; } else { - FragmentTransaction ft = getFragmentManager().openTransaction(); + FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.remove(this); if (allowStateLoss) { ft.commitAllowingStateLoss(); diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index eb9b8a3..e35ef87 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -100,8 +100,13 @@ public abstract class FragmentManager { * in the state, and if changes are made after the state is saved then they * will be lost.</p> */ - public abstract FragmentTransaction openTransaction(); + public abstract FragmentTransaction beginTransaction(); + /** Old API */ + public FragmentTransaction openTransaction() { + return beginTransaction(); + } + /** * After a {@link FragmentTransaction} is committed with * {@link FragmentTransaction#commit FragmentTransaction.commit()}, it @@ -347,7 +352,7 @@ final class FragmentManagerImpl extends FragmentManager { }; @Override - public FragmentTransaction openTransaction() { + public FragmentTransaction beginTransaction() { return new BackStackRecord(this); } diff --git a/core/java/android/app/LoaderManager.java b/core/java/android/app/LoaderManager.java index 5f8c098..ef50bde 100644 --- a/core/java/android/app/LoaderManager.java +++ b/core/java/android/app/LoaderManager.java @@ -60,7 +60,7 @@ public abstract class LoaderManager { * Called when a previously created loader has finished its load. Note * that normally an application is <em>not</em> allowed to commit fragment * transactions while in this call, since it can happen after an - * activity's state is saved. See {@link FragmentManager#openTransaction() + * activity's state is saved. See {@link FragmentManager#beginTransaction() * FragmentManager.openTransaction()} for further discussion on this. * * <p>This function is guaranteed to be called prior to the release of diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java index 7a186f3..ee3bdab 100644 --- a/core/java/android/preference/PreferenceActivity.java +++ b/core/java/android/preference/PreferenceActivity.java @@ -1044,7 +1044,7 @@ public abstract class PreferenceActivity extends ListActivity implements getFragmentManager().popBackStack(BACK_STACK_PREFS, FragmentManager.POP_BACK_STACK_INCLUSIVE); Fragment f = Fragment.instantiate(this, fragmentName, args); - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.setTransition(direction == 0 ? FragmentTransaction.TRANSIT_NONE : direction > 0 ? FragmentTransaction.TRANSIT_FRAGMENT_NEXT : FragmentTransaction.TRANSIT_FRAGMENT_PREV); @@ -1136,7 +1136,7 @@ public abstract class PreferenceActivity extends ListActivity implements * the current fragment will be replaced. */ public void startPreferenceFragment(Fragment fragment, boolean push) { - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.replace(com.android.internal.R.id.prefs, fragment); if (push) { transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); @@ -1175,7 +1175,7 @@ public abstract class PreferenceActivity extends ListActivity implements if (resultTo != null) { f.setTargetFragment(resultTo, resultRequestCode); } - FragmentTransaction transaction = getFragmentManager().openTransaction(); + FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.replace(com.android.internal.R.id.prefs, f); if (titleRes != 0) { transaction.setBreadCrumbTitle(titleRes); diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java index 4ee3083..0e31fef 100644 --- a/core/java/com/android/internal/app/ActionBarImpl.java +++ b/core/java/com/android/internal/app/ActionBarImpl.java @@ -492,7 +492,7 @@ public class ActionBarImpl extends ActionBar { return; } - final FragmentTransaction trans = mActivity.getFragmentManager().openTransaction() + final FragmentTransaction trans = mActivity.getFragmentManager().beginTransaction() .disallowAddToBackStack(); if (mSelectedTab == tab) { |