516cca196619858af65870e3f3dc6dac23246778 |
|
24-May-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Fix warnings surfaced by error-prone." into oc-support-26.0-dev
|
ca32d4043899ec48d5807f24c2f1a513c8b3824e |
|
23-May-2017 |
George Mount <mount@google.com> |
Fix warnings surfaced by error-prone. Bug 36033775 Error-prone discovered that mAdded is created after usage, but can be accessed on any thread. This CL makes mAdded a final value so that it cannot be created on one thread and accessed on another. Test: ran fragment tests Change-Id: Iebede853029c1e8b2cb927935d2397d27848fee4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
d15baded7e3e904ef00ccda50449c2adf8374f11 |
|
23-May-2017 |
Sergey Vasilinets <sergeyv@google.com> |
Correctly save retained fragments in the backstack Test: FragmentLifecycleTest#retainedFragmentsInBackstack Change-Id: I5aa2ad801febcaaf92a628e57160ef127895106b
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
8ab31e242e509b289fa6a577426b21cc45b95ef5 |
|
13-May-2017 |
George Mount <mount@google.com> |
Fix back stack problems due to postponed transitions Bug 38277003 The back stack was being moved while executing operations and then again when the postponed transaction was executed. It should only be done once. Test: ran fragment tests Change-Id: I3159c2345a7b77fa82f1c602f4639f51b5a47980
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
ff3deb363de36fc9bab1ec6eb4f0f48e4c3556f4 |
|
04-May-2017 |
George Mount <mount@google.com> |
Remove duplicated onBackStackChanged() call. Bug 37433435 We were reporting onBackStackChanged() twice, once when the operations are collected and once when the operations are executed. This CL only reports the onBackStackChanged() after the operations are executed. Test: ran fragment tests Change-Id: Idaf14cf8c64f87ba78ecd4f0a72a045a30ff9222
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1d1dad664f27bc66fa52e4b0a294a5efb5af0ea1 |
|
25-Apr-2017 |
Adam Powell <adamp@google.com> |
Address API feedback for new fragment APIs Bug: 37637473 Bug: 37636731 Bug: 37638276 Test: run fragment tests Change-Id: Ib48dd8a849eb528ead311e2401407e32646c08ed
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
fda5be2466024a656152015c45a7681361d399bb |
|
26-Apr-2017 |
George Mount <mount@google.com> |
Address API council feedback. Bug 37636027 Change FragmentTransaction#setAllowOptimization() to FragmentTransaction#setReorderingAllowed(). Framework Change: I24c35aad95ffa14d2e2fa092ae71d3d459e6d648 Test: ran fragment tests Change-Id: Ia81f2cd7bd3c97ad2f121caa3a943aead0f8d100
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
a6a88fd0bbc5e342b4a71c143c907a61c5666bb4 |
|
12-Apr-2017 |
George Mount <mount@google.com> |
Kill running animations on fragment view's when removed. Bug 29274792 Stop animation and animators on the Fragment view from preventing the view from being removed from the shadow view hierarchy. Test: ran fragment tests and manually tested. Change-Id: I628b38f76357bce1ca7dd5c5c736f0f087d7bab4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
867716f017ea85e3481369e5fb3712563832212d |
|
21-Apr-2017 |
Aurimas Liutikas <aurimas@google.com> |
Merge "Fix/suppress error-prone warnings in support-fragment." into oc-dev
|
15e593ea3575512d7072240d1db9d74fad8749a3 |
|
12-Apr-2017 |
George Mount <mount@google.com> |
Add animator support to setCustomAnimations() Bug 37280782 This adds animator support in setCustomAnimations() to work in nearly the same way as framework fragments. The difference is that onCreateAnimation() is called first, then onCreateAnimator() if onCreateAnimations() returns null. Test: ran fragment tests Change-Id: I23becb7a3b282a5435758b202771f11f69b5094c
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
b7a2c474fc66d5b7f2a57f2c212f8ac5a9e6de70 |
|
31-Mar-2017 |
Aurimas Liutikas <aurimas@google.com> |
Fix/suppress error-prone warnings in support-fragment. Bug: 37537860 Test: ./gradlew assembleErrorProne has fewer warnings now Change-Id: I57851ff02c821b6fbeb824391a470bf52a75e789
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
bae5c5f73f48516194fdf5c7cfb6b3b7d9878537 |
|
18-Apr-2017 |
George Mount <mount@google.com> |
resolve merge conflicts of 0eb50f95ba to oc-dev Test: Ran fragment tests Change-Id: I7a7e25bf6b99c6762f771cf818524739e6c1d56d
|
8b60e88655f6d4191e55b1dd8706e4ae2ae21b04 |
|
13-Apr-2017 |
George Mount <mount@google.com> |
Adds getLayoutInflater() to return a cached value. Bug 37156970 Many applications need to get the LayoutInflater used for fragment View inflation. onGetLayoutInflater() can be heavy weight, so a version that caches that last value is added. Test: ran fragment tests Change-Id: I11d719d7416a5bb3b65f37a78e6ed96a69c32332
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
aee2fb02851620a16703f950f865d990fc64cf6d |
|
14-Apr-2017 |
George Mount <mount@google.com> |
Execute pending transactions after FM state change. Bug 37255517 Because we no longer allow reentrant transactions during fragment manager state changes, we must have the pending transactions execute as soon as the state changes. This allows developers to avoid calling executePendingTransactions() in lifecycle calls. Test: ran fragment tests Change-Id: Icdecc018c7cb02f69a694b52c711ba9056469aa5
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
902cd5c04e05bd5d94b969698a5ce502f0d92180 |
|
12-Apr-2017 |
Chris Craik <ccraik@google.com> |
Merge "Work around android.view.animation.Animation bug prior to N" into nyc-support-25.4-dev am: 678e6103ca Change-Id: I707a85154bd35781ec4f65edb22c9cd107f8d5e5
|
678e6103ca1d3fd4ce95a5cd35c6e42a0ca9c88c |
|
12-Apr-2017 |
Chris Craik <ccraik@google.com> |
Merge "Work around android.view.animation.Animation bug prior to N" into nyc-support-25.4-dev
|
c6dae16bdbaf9070358886a55b556bfc45025a83 |
|
11-Apr-2017 |
Chris Craik <ccraik@google.com> |
Work around android.view.animation.Animation bug prior to N Fixes:36652953 Test: none Prior to N, Animation#cancel() would cause an animation to infinitely loop instead of stopping. Calling View#clearAnimation avoids the problem, since it removes the Animation entirely. Change-Id: Iabce4bbcfedcf6b2e1d87c742d859c174113b1ab
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1c9edfe9a1778c5590e919889632cef36fdad472 |
|
06-Apr-2017 |
Alan Viverette <alanv@google.com> |
Merge "Change getFragments() to return a List." into oc-dev
|
1af440bacb04c42ca18ad58cbcefa01b41c6792e |
|
05-Apr-2017 |
George Mount <mount@google.com> |
Change getFragments() to return a List. Bug 36762718 Changes getFragments() to return a List instead of a Collection. The order is the order in which the fragment is added or attached. Test: ran fragment tests Change-Id: I236b00000d27fc3efebc87fae793bc3da1d00c51
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1045192d999ff058f0f27036af14ab4506b8b328 |
|
05-Apr-2017 |
George Mount <mount@google.com> |
DO NOT MERGE: Change getFragments() to return List instead of Collection Bug 36762718 This reverts commit de7e27c0d3d1477fed1e3b1150411797f682cc21. This CL also changes getFragments() to return a List instead of a Colleciton as the public API and offers a reliable order as part of the API. Test: ran fragment tests Change-Id: Ib18e38a9d7bc4b20797c57b7e1694e5c7b03176f
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
25806414c27ad7a9b194e01328b1315058d3d2ad |
|
04-Apr-2017 |
George Mount <mount@google.com> |
Save FragmentManagerNonConfig during onSaveInstanceState() Bug 36815706 onSaveInstanceState() is called prior to onStop(), but onRetainNonConfigInstance() is called after. When a retained instance fragment is added during onStop(), the state of the two configurations won't match. This CL moves the non-configuration save to happen immediately after the save instance state. Test: ran fragment tests Change-Id: Ib41cbe02d060d3411e32d1494525e119d0c23dd7
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
5a97188ba9e2fe80ef31c1bd269f3963c394c1b4 |
|
04-Apr-2017 |
George Mount <mount@google.com> |
Fix saving target fragment when Fragment not created. Bug 35928527 During optimized transactions, a fragment may be removed without being created. That leaves the state of the fragment in INITIALIZING and previously, that state wasn't ever saved. This CL allows a fragment that is being removed to be brought up to the CREATED state so that it can be saved during saveAllState(). Chrry-picked from: Iea922369ab9bd91a7ee7a4e9e5a638e58dd97430 Matches Framework changes: * I649f1931745be43087ec3578e9195624e80821dc * Ie7207cc647312d38b377405bc5ec8721db757d2e Test: ran fragment tests Change-Id: Iea922369ab9bd91a7ee7a4e9e5a638e58dd97430
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
cfedb8d5ab2b14e025e8202fb6d0a2356e56c18f |
|
04-Apr-2017 |
George Mount <mount@google.com> |
resolve merge conflicts of 0765353c00 to oc-dev Test: I solemnly swear I tested this conflict resolution. Change-Id: I7574a0666e2e029ce7ea0ecbce6aaf1cdac98a93
|
2506af21275447a309f284540194866f9fcd5cb7 |
|
04-Apr-2017 |
George Mount <mount@google.com> |
Fix saving target fragment when Fragment not yet created. Bug 35928527 During optimized transactions, a fragment may be removed without being created. That leaves the state of the fragment in INITIALIZING and previously, that state wasn't ever saved. This CL allows a fragment that is being removed to be brought up to the CREATED state so that it can be saved during saveAllState(). Matches Framework changes: * I649f1931745be43087ec3578e9195624e80821dc * Ie7207cc647312d38b377405bc5ec8721db757d2e Test: ran fragment tests Change-Id: Iea922369ab9bd91a7ee7a4e9e5a638e58dd97430
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
0765353c002bfdf681c982565810aa4be3499dd0 |
|
01-Apr-2017 |
George Mount <mount@google.com> |
Call noteStateNotSaved on child fragment managers. Bug 36740474 When onNewIntent() is called, it calls noteStateNotSaved on the FragmentManager. It wasn't propagating that to child FragmentManagers. This CL properly propagates the noteStateNotSaved(). Test: ran fragment tests Change-Id: Ibe0794c02059f5787e144d1ee63980990fe2a04a
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
de7e27c0d3d1477fed1e3b1150411797f682cc21 |
|
03-Apr-2017 |
George Mount <mount@google.com> |
DO NOT MERGE: Revert to List return for getFragments() Bug 36762718 Temporarily use a List return type for getFragments to unblock builds. Test: removed tests relying on getFragments() and ran fragment tests Change-Id: I7783f19b81a878280f2a25997ce554486d9d013b
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
dac8b826698e502f7a4712d50ed5739116c1fdfb |
|
30-Mar-2017 |
George Mount <mount@google.com> |
Merge "Allow committing allowing state loss on detached FragmentManager." into nyc-support-25.4-dev am: 3fd952f578 Change-Id: Ia8c21696069b9cb49ea9c09ea3659570e10ecdd8
|
875d9733f354fc93e72c7e8d849c9b5333950183 |
|
30-Mar-2017 |
George Mount <mount@google.com> |
Allow committing allowing state loss on detached FragmentManager. Bug 36702993 Instead of throwing an exception during commitAllowStateLoss() or commitNowAllowingStateLoss(), silently drop the transaction when the FragmentManager is detached. Test: ran fragment tests Change-Id: Ic1f36c9fdbaa598b17180cfa6afbf8fa45a952a4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
c9b422af389946c58cd15ff0d1b776bee6bbf2fe |
|
30-Mar-2017 |
George Mount <mount@google.com> |
Merge "Fix getting wrong instance when restoring non-config" into nyc-support-25.4-dev am: 3b53e55fe6 Change-Id: If09fa4cb75562175dcbf2fd3958b6d4c7dd79796
|
f019390c7c85b8e185d6b06eb5c7e66be7bb4143 |
|
30-Mar-2017 |
George Mount <mount@google.com> |
resolve merge conflicts of 43db3168ca to oc-dev Test: I solemnly swear I tested this conflict resolution. Change-Id: Ia8a53b6307c3b543eb279e0ca45d0a2a18ae3e4c
|
38083235ff15c516dbba4ef655f4895b0282cf7b |
|
29-Mar-2017 |
George Mount <mount@google.com> |
Fix getting wrong instance when restoring non-config Bug 36679897 When restoring the non-config fragments, the wrong index was being used to lookup the fragment fromt the list of active fragment states. Test: ran breaking test in google3 and ran fragment tests Change-Id: I73ea16550a4e7333b90e24f3dc253cad531c8e27
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
43db3168ca4a4d309f059363054ba60bc22a9ef3 |
|
29-Mar-2017 |
George Mount <mount@google.com> |
Change getFragments() to return a collection instead of list. Bug 34703669 Bug 36656643 Test: ran fragment and appcompat tests Change-Id: I4c41adfebb073a74c569fc4514d38a010619c80c
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
0abeed582ee0a105edb41181d76e8ee034750f22 |
|
28-Mar-2017 |
George Mount <mount@google.com> |
Rename getLayoutInflater() to onGetLayoutInflater() Bug 34703669 Change the name based on API review. Keeping getLayoutInflater() temporarily until apps have an opportunity to change their implementations. Test: ran fragment tests Change-Id: I675d20e94dceaf7178f9c30123c7483d0565aa64
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
412addbcb02eb52d1238040e8b0720c12fd2a97f |
|
28-Mar-2017 |
George Mount <mount@google.com> |
DO NOT MERGE: Rename getLayoutInflater() to onGetLayoutInflater() Bug 34703669 Change the name based on API review. Keeping getLayoutInflater() temporarily until apps have an opportunity to change their implementations. Test: ran fragment tests Change-Id: I0c4e8c884a3f45195426ad565f36b432b62b735a
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
4867e99525d200f9aacf7508ee047054396a4870 |
|
24-Mar-2017 |
Aurimas Liutikas <aurimas@google.com> |
Remove all the uses BuildCompat.isAtLeastN(). Test: ./gradlew assemble still compiles Change-Id: I9635a23dc4bd00ee77c4bba609616d2ed82a8cde
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
96767975440de77e44a231e6ef66b374b1403bd0 |
|
24-Mar-2017 |
George Mount <mount@google.com> |
resolve merge conflicts of bde8614049 to master Test: ran fragment and appcompat tests Change-Id: I078e2b929e0e5c71ea032ae95c899ea3d14c5d77
|
bde8614049b3bada2f997c07fa4cd934c5bf3c62 |
|
23-Mar-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Do not reuse fragment indices." into nyc-support-25.4-dev
|
995c3504e6c5b1d20368c36193b44a7e6844709d |
|
22-Mar-2017 |
George Mount <mount@google.com> |
resolve merge conflicts of 945ef67304 to master Test: Ran fragment and appcompat tests Change-Id: I8c1d95280dbe75624aa43d64247376cd22f32a67
|
832e5fdbe5416d03dbc4787951f01d91b2c17478 |
|
22-Mar-2017 |
George Mount <mount@google.com> |
Fix wrong API for getLayoutInflater Bug 34703669 getLayoutInflater(Bundle) is needed for DialogFragment, so it should be the one that is used. This removes the incorrectly added getLayoutInflater() method. Test: ran fragment tests Change-Id: I4456cb4ffbdac2ef007d5a811d5f12a9546dbb2c
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
90b15311c0461be519432794b7f8e8132fb7a72c |
|
14-Mar-2017 |
George Mount <mount@google.com> |
Do not reuse fragment indices. Bug 25472591 Use a SparseArray instead of two ArrayLists to track active fragments. This allows monotonically increasing indexes instead of reusing indexes in the ArrayList. Test: ran fragment tests Change-Id: Ibb6cc842c8cfc85589bca5997cd61d24a0ab6243
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
96221034e4a23a2abb83f772a0281bb197ac5ac0 |
|
14-Mar-2017 |
George Mount <mount@google.com> |
Make public getFragments() and getLayoutInflater() methods Bug 34703669 Test: ran fragment tests Change-Id: I460bc4b7c74550dddaa8345db4514c4b29094d84
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
abc73958d264e1eed7fd401a18be1d9ede8304eb |
|
06-Mar-2017 |
Aurimas Liutikas <aurimas@google.com> |
A pass at fixing unchecked javac warnings. Add types where needed. Suppress places where we intentionally skip types. Test: ./gradlew assemble still works Change-Id: If1350e896948c7e27c212cf7b1a94f08b9131193
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
e2104f4b5c8e3ad63570306a25e61502dfe4c418 |
|
05-Mar-2017 |
Aurimas Liutikas <aurimas@google.com> |
Add all missing @Override annotations. Historically, we could not add @Override for certain methods due to using older SDKs to build support library. That is no longer the case so we can add @Override everywhere now. Test: ./gradlew assemble assembleAndroidTest still works Change-Id: I85e3c1157f0e253e3eab7584189f3bf95cf030e9
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
8b5f31fb9f3e5bbedf82fb21e1a6c05c4b0ed193 |
|
24-Feb-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Expose isStateSaved() in FragmentManager."
|
9d359be2fec790cf02c3201c89ff37d425d35058 |
|
22-Feb-2017 |
Aurimas Liutikas <aurimas@google.com> |
Cleanup FragmentManager after minSdk 14 bump. Remove unneeded code since we are always on API 14 and newer now. Bug: 32794064 Test: ./gradlew assemble Change-Id: Iadb6511b2abf76bf4e50963c074c1a4008eb411b
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
47844337986f365dae294fb434de0c0f7f8df5db |
|
21-Feb-2017 |
George Mount <mount@google.com> |
Expose isStateSaved() in FragmentManager. Bug 35594367 Protect the FragmentManager during onBackPressed() from changing the state after the state was saved. Test: ran fragment tests Change-Id: Iae10e71402c600566590022ae0d992b978409ccb
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1136f044790e765c43a04c920ac7095a787538f0 |
|
21-Feb-2017 |
George Mount <mount@google.com> |
Ensure transactions cannot be run during controller state change am: 9268ce1264 am: dc03f0f5cc am: 26aec22c3e Change-Id: If58468608e78383f6070ab7d394e0defdb486b80
|
9268ce1264c6c2919b3feb1e26eef13ded3c9ab4 |
|
17-Feb-2017 |
George Mount <mount@google.com> |
Ensure transactions cannot be run during controller state change Bug 35349893 When the FragmentManager is being brought up or down, the state of fragments is changed. Any fragment using commitNow() during the state change was being allowed through instead of throwing. This CL locks out reentrant fragment transctions during FragmentManager state changes. Test: ran fragment tests Change-Id: Iead0e44cfc6515b044da1d1ebcad045d0a24b162
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
a4f6216bbaccbc509a5a8a6e59f25ad4bc589d57 |
|
18-Feb-2017 |
George Mount <mount@google.com> |
Merge "Catch reentrancy while executing postponed transactions." into nyc-support-25.2-dev am: 3776f73df5 am: 239af8f4bd am: 7f0630acde Change-Id: I829579f0377d499cd6c6d439c44ea3e316a53dcc
|
0a849aafc735476e572e97c78be0ce912adfe512 |
|
17-Feb-2017 |
George Mount <mount@google.com> |
Catch reentrancy while executing postponed transactions. Bug 35349893 While executing postponed transactions, it was possible for Fragments to call commitNow() or executePendingTransactions() and therefore causing disallowed reentrancy. This CL now prevents reentrancy while executing postponed transactions. Test: ran fragment/ tests Change-Id: I90935fbae1cf0bcb90f041803f97d7dfa6a70d56
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
a02dbdde8c70426f695331c344549859f9bd4865 |
|
10-Feb-2017 |
Aurimas Liutikas <aurimas@google.com> |
Merge "Cleanup LayoutInflaterCompat after minSdk 14 bump."
|
4bf8c3d1aeb944a993c946db770604b55f981341 |
|
07-Feb-2017 |
Aurimas Liutikas <aurimas@google.com> |
Cleanup LayoutInflaterCompat after minSdk 14 bump. Bug: 32794064 Test: ./gradlew assemble Change-Id: I45598595683ab9c53eccac17d9dff04574a54dc8
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1a8d4cc864801bd850f643247a6f60c483ff4528 |
|
07-Feb-2017 |
George Mount <mount@google.com> |
Delay changing state of added fragments until all executed. am: 0846eb5fb9 am: a19afca341 am: ba711e9638 Change-Id: Ic690bd1e9ff85208c8f2b469938cec52ae2bff55
|
0846eb5fb991505a85c8288b52d7fa58ebade9b2 |
|
06-Feb-2017 |
George Mount <mount@google.com> |
Delay changing state of added fragments until all executed. Bug 34963118 When popping multiple transactions, all added fragments should wait until all transactions are executed before moving their states to the final state. This CL brings back the behavior of executing all operations first before changing the state of added fragments. This means that intermediate fragments won't be created when popping. Test: gradlew connectedCheck in fragment Change-Id: I45a8c0319794e20f08559fb63cafbb84024c9a45
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
e5709e378135a6e6f9baa2becbf36d07e56e0673 |
|
02-Feb-2017 |
George Mount <mount@google.com> |
Fix: fragment destroyed improperly during pop. am: 37e785570b am: 1d0969951a am: 84d8e4ef88 Change-Id: I4d23e465fe4dbeeb3be372fa970ed992cb6ffa58
|
37e785570b316db48ae8843d101f383899ea4d61 |
|
01-Feb-2017 |
George Mount <mount@google.com> |
Fix: fragment destroyed improperly during pop. Bug 34850219 When multiple back stack records were popped together, to the bottom of the stack, the fragment at the bottom would be destroyed. This was caused by the back stack being bumped prior to executing the operations. The back stack record index didn't properly reflect the state it should be in during the operation and the final fragment returned false to isInBackStack(). This CL moves the back stack bumping to immediately prior to executing the operations. Test: gradlew connectedCheck Change-Id: I40fcbea9f5dc3777731a0465d4e000d496321717
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
fa0f82f629bf95681c14ed559922f77a3030aa18 |
|
30-Jan-2017 |
Aurimas Liutikas <aurimas@google.com> |
Deprecated ViewCompat methods that were added in API 11. Deprecated all the ViewCompat methods that were APIs added to View since API 11. Additionally this removes usages of these APIs in support library. Bug: 32794064 Test: ./gradlew assemble assembleAndroidTest still works Change-Id: I18fb0cc1ebc67c911eeb30aada7b8315afc15835
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
6a15b09e37b960e774dd4806165e7da642b0d9ad |
|
27-Jan-2017 |
Adam Powell <adamp@google.com> |
Fix FragmentManager.FragmentLifecycleCallbacks scope am: f745fbe6f2 Change-Id: I7b2918c27e336faee2c4bfb022a4651fd62b7301
|
f745fbe6f2eff2e4a771765cb80270c3685b18fd |
|
16-Nov-2016 |
Adam Powell <adamp@google.com> |
Fix FragmentManager.FragmentLifecycleCallbacks scope Static class is much more useful here. Bug: 32938039 Test: n/a Change-Id: I1cc10928ac79139de6cc09efba63a4b056666c32 (cherry picked from commit 1b5b6c012765919f50bfb64dcf494a2d8cfcfbb1)
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
a4fd990846a60f3647445bf65980faad47b4cc68 |
|
25-Jan-2017 |
Adam Powell <adamp@google.com> |
Lifecycle guarantees for target fragments When a target fragment was set using Fragment#setTargetFragment, all bets were off, especially when restoring from instance state. Order of lifecyle initialization was undefined meaning that two bugs could occur, both of which manifested as the target fragment was not initialized by the time the referring fragment's onCreate ran. One could happen if the target fragment is on the back stack, the other could happen if the target fragment was ordered unfortunately in FragmentManager implementation details. (!) Fix both by guaranteeing that any target fragment gets pushed forward to at least the CREATED state before we dispatch any lifecycle events for the referring fragment. Add some sanity checks that try to keep developers from setting target fragments across different FragmentManagers or from creating target cycles, both of which are bad ideas. Bug: 33653458 Test: ./gradlew support-fragment:connectedCheck Change-Id: I824eb312fbdfd6b548fe94aa2cd5b03afbaa97c7
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
4aebb5be19bbf9314e7474dd62df8dd915313436 |
|
19-Jan-2017 |
Adam Powell <adamp@google.com> |
Allow FragmentContainer to play a role in fragment construction This allows class swapping, dependency injection, and other fun stuff. Port of change-id I93e17ccf9cebb6f542903d31597b5ea41544e069 from frameworks/base Test: manual Change-Id: I4552d61cfc9e9b651f05a2e91746e9f355a90311
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
22f13fd48fb232a9a29b43dc2e11dfaeef121ca3 |
|
18-Jan-2017 |
Chris Banes <chrisbanes@google.com> |
Fix some issues caught via a static analyzer am: f83358389f Change-Id: I75ae8adf22fe2383c554b6416e6a8ba2329885cb
|
725ce5fa4206ac43a772bddff1ba6ab5bbd93c23 |
|
18-Jan-2017 |
Chris Banes <chrisbanes@google.com> |
Merge "Fix some issues caught via a static analyzer" into nyc-support-25.2-dev
|
5e2b030b851bde2b4569104a01b4acf6960327a6 |
|
13-Jan-2017 |
Adam Powell <adamp@google.com> |
Fragment grab bag! * Fragment#isStateSaved: report whether a given fragment has been through state save within its given FragmentManager. This will additionally echo the state of its child FragmentManager, indicating whether it is safe to perform transactions without losing state. * Fragment#setArguments can now be called at any time before a fragment's state is saved, not just before an internal index is assigned. This fixes an issue with assigning arguments during fragment inflation in some code paths. * FragmentTransaction#postOnCommit: Add a Runnable to a FragmentTransaction that will be executed once the operations in the transaction have been fully executed. Transaction optimization may mean that other transaction ops could run before this is executed, or that specific operations from this transaction were optimized out. (e.g. a fragment in this transaction was added, but then removed in a subsequent transaction before pending operations were executed.) This may not be used for transactions added to the back stack, as we cannot persist the runnable for later to guarantee running it when the transaction is reversed. Test: ./gradlew support-fragment:connectedCheck Change-Id: Iff605d35329214d15148f3e83960cd264a8c0316
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
6afb38c9e9f1f70be0738b2342c7277753fbdc45 |
|
10-Jan-2017 |
George Mount <mount@google.com> |
Execute non-optimized add operations one at a time. am: f284a0dc76 am: 84073ffb43 Change-Id: I6654e9d947aa0d0bd22cc8aa07e35fb27be25b58
|
f83358389f0c4ea37a7e7d9e493857f99baf0440 |
|
07-Jan-2017 |
Chris Banes <chrisbanes@google.com> |
Fix some issues caught via a static analyzer I concentrated on the resource leaks rather than any possible null dereferences. Test: all pass Change-Id: I2eab70648068058111b6dc82ba7494a1ff0ecb32
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
f284a0dc76d73ef7132dd1187a43d9a7ad0258de |
|
06-Jan-2017 |
George Mount <mount@google.com> |
Execute non-optimized add operations one at a time. Bug 34125817 It appears that some developers rely on fragment views containing other fragments without using the fragment's child fragment manager. This CL executes all unoptimized add operations separately to make sure that this continues to work. Pop operations continue to be executed together as they did previously. Test: gradlew connectedCheck in fragments/ Change-Id: Iabf76eb1a95d5d7436a14c59b13f0c87932306b4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1ff374ad7efdabdd103bf0ad3352a4bb184acc78 |
|
06-Jan-2017 |
George Mount <mount@google.com> |
Properly track fragments from pop operations. Bug 33849992 When popping and executing another transaction, the pop transaction weren't properly tracking the fragments that were added and removed. This CL adds tracking the fragments during the pop execution. It also fixes a small issue in when fragment state was executed during pop. Test: gradlew connectedCheck in fragments/ Manually merged from the original CL: Id9f99eb44e54bf5202a170c8b1d01ba045383278 Change-Id: I9ae1774d293b71f50278cd516d878fa8f51a31af
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
e7e8d3d3a5211abc960351923b8b2bac85f6adec |
|
05-Jan-2017 |
George Mount <mount@google.com> |
Properly track fragments from pop operations. Bug 33849992 When popping and executing another transaction, the pop transaction weren't properly tracking the fragments that were added and removed. This CL adds tracking the fragments during the pop execution. It also fixes a small issue in when fragment state was executed during pop. Test: gradlew connectedCheck in fragments/ Change-Id: Id9f99eb44e54bf5202a170c8b1d01ba045383278
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
3bfda46e646d72b25a6cedc73e61dc1eb90475f8 |
|
05-Jan-2017 |
George Mount <mount@google.com> |
Fix focus problems when using optimized fragment transactions. am: 0bb3f19c91 am: 84aaafe705 Change-Id: I7d7fb57327497248c002ed49b8a047e1c644ea1d
|
84aaafe7057fc5f7aab2a211681167e3006ed8e9 |
|
05-Jan-2017 |
George Mount <mount@google.com> |
Fix focus problems when using optimized fragment transactions. am: 0bb3f19c91 Change-Id: Ic716fa7b64f767f5cc0d05b153756be7339244cc
|
639bc5a1802f720574af5a9d0140eee41988b828 |
|
05-Jan-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Fix focus problems when using optimized fragment transactions." into nyc-support-25.1-dev
|
0bb3f19c91311de0b6619c7728a7bcc1f6863132 |
|
04-Jan-2017 |
George Mount <mount@google.com> |
Fix focus problems when using optimized fragment transactions. Bug 33754255 Instead of making Views INVISIBLE immediately after adding them, Views are set to alpha = 0 (or INVISIBLE pre-11) only after they have been determined to be postponed. Test: gradlew connectedCheck in fragments/ Change-Id: I474af8ca19f7544afef28067e8d11749ef3571b4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
a3bec96f7222b1e64570804bf62149c8bfc30d8b |
|
05-Jan-2017 |
George Mount <mount@google.com> |
Properly cancel the animation when saving the fragment state. am: 9b07983005 am: 6419a5cbc4 Change-Id: Iaaed53c51c26f7a2a2eea3a2969e8a887e8f142d
|
9b07983005689872240dee2084dec3520f95eb5a |
|
05-Jan-2017 |
George Mount <mount@google.com> |
Properly cancel the animation when saving the fragment state. Bug 33827301 When saving the fragment state, animations should be canceled, not cleared. When clear() is called, the animation is set to null and the ViewGroup parent doesn't remove it from its disappearing children. Test: manual Change-Id: Ic65d4adad26085706ddff4d06e167e5df84e981b
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
aa3a5538c003c6098185d1c948e22054e2f27488 |
|
28-Nov-2016 |
George Mount <mount@google.com> |
Don't change visibility of fragment Views that aren't visible Bug 32864127 When a fragment creates a view that is either invisible or gone, it should remain that way. This means that the fragment won't have any animations. When transactions are optimized, transitions will avoid invisible and gone fragment views, but unoptimized transactions will lead to failed transitions because none of the views will be visible. Test: gradlew connectedCheck in fragments/ Change-Id: Id5ab447a006cf37b30024bbe7efb3bb7d253f2ce
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
418738949305a8a0e30eba92c125c650048f9c50 |
|
10-Dec-2016 |
Adam Powell <adamp@google.com> |
Primary navigation fragments Add API to track the "primary navigation fragment" for a FragmentManager. This allows designating one active fragment in a FragmentManager as the intended nested recipient of navigation actions such as popping the back stack. The FragmentManager popBackStack methods will now delegate to the child FragmentManager of the current primary navigation fragment first before trying to pop its own back stack. This can only happen if a back stack transaction id or back stack entry name is not provided to the pop operation, as these names and ids are namespaced to each individual FragmentManager. Primary navigation fragments are set as part of a FragmentTransaction and follow the associated expectations. Transactions added to the back stack will be fully reversed when popped, restoring the previous primary navigation fragment for the FragmentManager. If a primary navigation fragment is removed from the FragmentManager, the primary navigation fragment will be set to null. Bug: 30596279 Test: ../gradlew connectedCheck in fragment/ Change-Id: I82cd22cda6e9ee22fe293c36859e99f49d36a129
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
d88ddfd4577e46829bf87124ad335d3cb82c3895 |
|
28-Nov-2016 |
George Mount <mount@google.com> |
Don't change visibility of fragment Views that aren't visible Bug 32864127 When a fragment creates a view that is either invisible or gone, it should remain that way. This means that the fragment won't have any animations. When transactions are optimized, transitions will avoid invisible and gone fragment views, but unoptimized transactions will lead to failed transitions because none of the views will be visible. Test: gradlew connectedCheck in fragments/ Change-Id: Id5ab447a006cf37b30024bbe7efb3bb7d253f2ce
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
42435e007921e83d45bbb8532f4e2a6b460d42da |
|
28-Nov-2016 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Fix FragmentManager.FragmentLifecycleCallbacks scope"
|
00834368f8f1ad9bae181b5b34ff65ac572dae2e |
|
21-Nov-2016 |
Aurimas Liutikas <aurimas@google.com> |
resolve merge conflicts of 8e10080 to master Change-Id: I48e02631e7622097e9c556602485a7cdf96dcf21
|
8e10080c914d1ad0784394fa3026b85535535847 |
|
18-Nov-2016 |
Aurimas Liutikas <aurimas@google.com> |
Move from GROUP_ID to LIBRARY_GROUP annotations - GROUP_ID was deprecated in favor of LIBRARY_GROUP. - Fix import order in touched files. Test: ./gradlew assemble assembleAndroidTest Change-Id: I2a774e93215090f42262fb86cf8e841f2a546a4f
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
1b5b6c012765919f50bfb64dcf494a2d8cfcfbb1 |
|
16-Nov-2016 |
Adam Powell <adamp@google.com> |
Fix FragmentManager.FragmentLifecycleCallbacks scope Static class is much more useful here. Bug: 32938039 Test: n/a Change-Id: I1cc10928ac79139de6cc09efba63a4b056666c32
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
37149f137aad1b2ec06df63807cef6713da3ca2f |
|
11-Nov-2016 |
Adam Powell <adamp@google.com> |
Fix bugs around inflated child fragments * Ensure that a fragment that has had its view destroyed has a chance to recreate it. * Clear mInLayout after views are destroyed * Make sure that when a fragment is restored from the back stack and reinflates its view that child fragments from fragment tags are reconnected properly. Bug: 32691935 Test: ./gradlew support-fragment:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v4.app.NestedInflatedFragmentTest Change-Id: I581af852a9162d7328270575be8f82c2442c9650
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
77f11e921b9be7645b74a33b2ca11c1c4e24fbab |
|
02-Nov-2016 |
George Mount <mount@google.com> |
Don't update fragments if the manager's state doesn't change. Bug 32610133 A change in behavior was introduced in which the dispatch* methods moved the state of the manager's fragments even when the manager's state doesn't change. Test: gradlew connectedCheck in fragments/ Change-Id: I2dd80b257c5375904a99de8bb36db7521318eb91
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
44e98ab45229efc5f2fbbc61611787f75299d903 |
|
28-Oct-2016 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Perform onDestroy when FragmentController is torn down."
|
40e1750a5ed6cca1efb47e10af4db19abecd9fd5 |
|
27-Oct-2016 |
George Mount <mount@google.com> |
Perform onDestroy when FragmentController is torn down. Bug 32457575 Test: gradlew connectedCheck in fragments/ Change-Id: Ie248995ba0a173535bbc0e2e7e652446d41b699e
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
267b02ebf455fa4d7de59150548676e406b2dd2b |
|
25-Oct-2016 |
Adam Powell <adamp@google.com> |
Add FragmentLifecycleCallbacks Add a new callback object that can be attached to a FragmentManager to observe all fragment lifecycle events within that FragmentManager. Useful for dependency injection and other shenanigans. FragmentLifecycleCallbacks can be registered as recursive, in which case they will be activated for any lifecycle events that happen in descendant FragmentManagers as well. Test: ../gradlew connectedCheck [from fragment/] Change-Id: I19af51fb98dea54628781676a3c25090626df547
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
667ec4150c78bf295b3db1fa4d546def9ade9d20 |
|
26-Oct-2016 |
George Mount <mount@google.com> |
Fix hide fragment transition. Bug 30699392 During optimized hide operations with fragment transitions, the hidden fragment View should not be GONE, but instead be visible and the exiting views should be made INVISIBLE. After the transition completes, the fragment's view should be GONE. Add tests for Fragment Transitions with show/hide/attach/detach Test: ./gradlew connectedCheck in fragment/ Change-Id: Id7699ef6f9c5bab3b37ab9710ad897d8556adaed
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
990e6fc0326f5948736650c0cb71b6002d443c9c |
|
14-Oct-2016 |
George Mount <mount@google.com> |
Add optimize and postpone transactions. Bug 29631389 Bug 30502032 Bug 20068723 When multiple operations are executed at once, they sometimes cancel each other. For example, if the following transactions are queued: Transaction 1: add A Transaction 2: replace with B This can be trimmed down to add B. This CL optimizes fragments in both add and pop directions. Developers can choose not to allow optimization by using FragmentTransaction#setAllowOptimization Fragments in a transaction can now indicate when they are ready and the transaction should complete. Postponed transactions will have new views in the fragments created and added to the hierarchy INVISIBLE. When all postponed fragments are ready, the transitions and animations will start. INVISIBLE views will be made VISIBLE and removed views will be taken out of the View hierarchy Test: gradlew connectedCheck in fragment/ Test: manual tests also, just to make sure Change-Id: I3fdab8e75cb33a02e9e636ff6f43a6f95a564d21
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
c39d9c75590eca86a5e7e32a8824ba04a0d42e9b |
|
25-Aug-2016 |
Alan Viverette <alanv@google.com> |
Add @RestrictTo(GROUP_ID) annotations to match @hide docs annotations Also removes some unnecessary @hide annotations on classes that wouldn't have shown up in docs anyway due to package/private visibility or NO_DOCS. Bug: 27937193 Change-Id: Iab127a5a3ce57a2d61965d3cef782621eb3859f5
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
b12afdc2d1fc72a3c43213fbf8e4d31bbbe5fd39 |
|
06-Sep-2016 |
Aurimas Liutikas <aurimas@google.com> |
Merge "Remove all the extra accessor methods added by javac in support-fragment." into nyc-mr1-dev
|
fd28b81e0501d11989a8ad095c1a54619000df19 |
|
26-Aug-2016 |
Aurimas Liutikas <aurimas@google.com> |
Correct typo in FragmentManager documentation. Bug: 31102593 Change-Id: I341b64be23e7e339420b458d0fe6d6f02674f5f4
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
dea7d510a375df0e0e703bfba5ff63c8acca849e |
|
25-Aug-2016 |
Aurimas Liutikas <aurimas@google.com> |
Remove all the extra accessor methods added by javac in support-fragment. Change private methods to be package protected to avoid extra methods that get added to be able to access them from inner classes. This CL saves 13 methods in our jar. Bug: 31075707 Change-Id: Ia83c01c603b87ab7a1a43cb0a26d73707187a2f6
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
c9a859537b0871f84afeeb706a5b425fe3f2b4dd |
|
25-May-2016 |
Aurimas Liutikas <aurimas@google.com> |
Fix a random assortment of spelling errors. Fix spelling errors found by Android Studio. Change-Id: I121c79029f4e323da4ff2f44891e25480c44ebbc
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
90ac236504c1a4cac7e91f1ffc523334f2a8f399 |
|
23-May-2016 |
Aurimas Liutikas <aurimas@google.com> |
Add missing @Override annotations in support fragment code. Change-Id: I96e78e7bb69b68f2de8c0f1fe415da95ae053eb9
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|
2a87300db31223942e2916add55067bc7a3e4c4f |
|
14-May-2016 |
Adam Powell <adamp@google.com> |
resolve merge conflicts of 9540fd1 to master Change-Id: I73485945388f8467e9956240ad60352b5321313d
|
ff22d81f6561f6cdd2a91eb63238c41079927a22 |
|
12-May-2016 |
Kirill Grouchnikov <kirillg@google.com> |
Extracting fragments and widgets into their own modules. Also rename core to core-utils. Change-Id: Icef764d01bc49cd4d04ac4ce47faadda983f4c48
/frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java
|