Merge "Start renaming FragmentTransaction.openTransaction() to beginTransaction()." into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
db7f38673c
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user