summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-01-17 12:33:50 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-17 12:33:50 -0800
commitdb7f38673c33ba55801019007ff18fa4c57f75e0 (patch)
tree414342922f752f199a195a9711e4c32a2abb91f5
parentf09d63a52c84386a7b3539eab5b43f020f194c77 (diff)
parent48e7b458694acdf3a4fc58e62437f1dbc4f29d83 (diff)
downloadframeworks_base-db7f38673c33ba55801019007ff18fa4c57f75e0.zip
frameworks_base-db7f38673c33ba55801019007ff18fa4c57f75e0.tar.gz
frameworks_base-db7f38673c33ba55801019007ff18fa4c57f75e0.tar.bz2
Merge "Start renaming FragmentTransaction.openTransaction() to beginTransaction()." into honeycomb
-rw-r--r--api/current.xml15
-rw-r--r--core/java/android/app/DialogFragment.java4
-rw-r--r--core/java/android/app/FragmentManager.java9
-rw-r--r--core/java/android/app/LoaderManager.java2
-rw-r--r--core/java/android/preference/PreferenceActivity.java6
-rw-r--r--core/java/com/android/internal/app/ActionBarImpl.java2
6 files changed, 27 insertions, 11 deletions
diff --git a/api/current.xml b/api/current.xml
index db0bb62..339ba72 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -30672,6 +30672,17 @@
<parameter name="listener" type="android.app.FragmentManager.OnBackStackChangedListener">
</parameter>
</method>
+<method name="beginTransaction"
+ return="android.app.FragmentTransaction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="countBackStackEntries"
return="int"
abstract="true"
@@ -30782,7 +30793,7 @@
</method>
<method name="openTransaction"
return="android.app.FragmentTransaction"
- abstract="true"
+ abstract="false"
native="false"
synchronized="false"
static="false"
@@ -86359,7 +86370,7 @@
<method name="updateTexImage"
return="void"
abstract="false"
- native="true"
+ native="false"
synchronized="false"
static="false"
final="false"
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 1ef011c..cd5e3bb 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) {