Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4604,6 +4604,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4737,6 +4737,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4604,6 +4604,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment); core/java/android/app/BackStackRecord.java +12 −0 Original line number Diff line number Diff line Loading @@ -667,6 +667,18 @@ final class BackStackRecord extends FragmentTransaction implements return commitInternal(true); } @Override public void commitNow() { disallowAddToBackStack(); mManager.execSingleAction(this, false); } @Override public void commitNowAllowingStateLoss() { disallowAddToBackStack(); mManager.execSingleAction(this, true); } int commitInternal(boolean allowStateLoss) { if (mCommitted) { throw new IllegalStateException("commit already called"); Loading core/java/android/app/FragmentManager.java +26 −1 Original line number Diff line number Diff line Loading @@ -1503,6 +1503,26 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate } } public void execSingleAction(Runnable action, boolean allowStateLoss) { if (mExecutingActions) { throw new IllegalStateException("FragmentManager is already executing transactions"); } if (Looper.myLooper() != mHost.getHandler().getLooper()) { throw new IllegalStateException("Must be called from main thread of fragment host"); } if (allowStateLoss) { checkStateLoss(); } mExecutingActions = true; action.run(); mExecutingActions = false; doPendingDeferredStart(); } /** * Only call from main thread! */ Loading Loading @@ -1543,6 +1563,12 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate didSomething = true; } doPendingDeferredStart(); return didSomething; } void doPendingDeferredStart() { if (mHavePendingDeferredStart) { boolean loadersRunning = false; for (int i=0; i<mActive.size(); i++) { Loading @@ -1556,7 +1582,6 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate startPendingDeferredFragments(); } } return didSomething; } void reportBackStackChanged() { Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4604,6 +4604,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4737,6 +4737,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -4604,6 +4604,8 @@ package android.app { method public abstract android.app.FragmentTransaction attach(android.app.Fragment); method public abstract int commit(); method public abstract int commitAllowingStateLoss(); method public abstract void commitNow(); method public abstract void commitNowAllowingStateLoss(); method public abstract android.app.FragmentTransaction detach(android.app.Fragment); method public abstract android.app.FragmentTransaction disallowAddToBackStack(); method public abstract android.app.FragmentTransaction hide(android.app.Fragment);
core/java/android/app/BackStackRecord.java +12 −0 Original line number Diff line number Diff line Loading @@ -667,6 +667,18 @@ final class BackStackRecord extends FragmentTransaction implements return commitInternal(true); } @Override public void commitNow() { disallowAddToBackStack(); mManager.execSingleAction(this, false); } @Override public void commitNowAllowingStateLoss() { disallowAddToBackStack(); mManager.execSingleAction(this, true); } int commitInternal(boolean allowStateLoss) { if (mCommitted) { throw new IllegalStateException("commit already called"); Loading
core/java/android/app/FragmentManager.java +26 −1 Original line number Diff line number Diff line Loading @@ -1503,6 +1503,26 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate } } public void execSingleAction(Runnable action, boolean allowStateLoss) { if (mExecutingActions) { throw new IllegalStateException("FragmentManager is already executing transactions"); } if (Looper.myLooper() != mHost.getHandler().getLooper()) { throw new IllegalStateException("Must be called from main thread of fragment host"); } if (allowStateLoss) { checkStateLoss(); } mExecutingActions = true; action.run(); mExecutingActions = false; doPendingDeferredStart(); } /** * Only call from main thread! */ Loading Loading @@ -1543,6 +1563,12 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate didSomething = true; } doPendingDeferredStart(); return didSomething; } void doPendingDeferredStart() { if (mHavePendingDeferredStart) { boolean loadersRunning = false; for (int i=0; i<mActive.size(); i++) { Loading @@ -1556,7 +1582,6 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate startPendingDeferredFragments(); } } return didSomething; } void reportBackStackChanged() { Loading