17d9d287fd6d180c6c48d62305ae4d7265056410 |
|
23-May-2018 |
Ian Lake <ilake@google.com> |
Combine FragmentManager stop and really stop FragmentActivity would determine if it should retain ViewModels by looking for calls to onStop() followed by onRetainNonConfigurationInstance(). This meant that there were two states: - stopped (onStop() was called) - really stopped (onRetain was called or onDestroy was called or a Handler message was handled) With the introduction of the Honeycomb API of isChangingConfigurations() and a minSdkVersion of 14, we can replace our own retain flag with the proper signal from the system, thus removing the need for a separate really stop call. Test: existing tests pass BUG: 73644080 Change-Id: Ia79e1d6f285704727e9b61af6d9ae8f2515d04fa
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
eb89fcf1decf9044f53330ea4bb689d25d2328b1 |
|
12-Mar-2018 |
Ian Lake <ilake@google.com> |
Add Fragment#getViewLifecycleOwner The Fragment's View lifecycle can diverge from the Fragment's lifecycle in cases of detached Fragments. This can cause issues with LiveData where old observers should be cleared when the View is destroyed to prevent duplication with new observers created in onCreateView/onViewCreated. By exposing a separate LifecycleOwner specifically for the Fragment's View, developers can use that in place of the Fragment itself to better model the Lifecycle they actually care about. Also adds a getViewLifecycleOwnerLiveData() for observing changes in the View LifecycleOwner (i.e., creation, destruction, and recreation). Test: new FragmentViewLifecycleTest passes BUG: 72411063 Change-Id: I3f1531e64d4f18aed1ed69434029ab9b317e3886
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
e8ffa7a5775d29c6144ce0276cd4853baed5c1fb |
|
23-Mar-2018 |
Ian Lake <ilake@google.com> |
Avoid ClassLoader issues setting user visible hint Instead of modifying the mSavedFragmentState Bundle before it is restored in order to save the updated user visible hint, store its updated value separately so as to avoid ClassNotFoundExceptions due to the correct ClassLoader not being set until the Fragment is created. Test: existing user visible hint tests pass BUG: 74130311 Change-Id: Iae885d74b0b152c3fd0f8aa54500acf35dc84fa4
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
ba069d50913c3fb250bb60ec310439db36895337 |
|
09-Mar-2018 |
Alan Viverette <alanv@google.com> |
DO NOT MERGE. Migrate app-toolkit projects to androidx Bug: 74405443 Test: ./gradlew createArchive Change-Id: Iae6f83cc396dbcdc5ae2a98793e9c7c61d94367e
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
3fd8f020a6d2e97e03106b62766f73309c2662a1 |
|
14-Mar-2018 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Deprecate getLoaderManager()" into pi-preview1-androidx-dev
|
261fa1b6dce85674f9a6fbe8a48851c80701b1db |
|
14-Mar-2018 |
Ian Lake <ilake@google.com> |
Defer starting due to user visible hint to after onCreate Avoid calling performPendingDeferredStart if the Fragment is not yet created, such as is the case if setUserVisibleHint(true) is used from onAttachFragment. This avoids issues where moveToState is called recursively and can cause a StackOverflowException. Test: new NestedInflatedFragmentTest passes BUG: 74355137 Change-Id: I6bff2627f3e2824de2f5352ef1f13294745d2a9c
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
320113721c2e14bbc2403809046fa2959a665c11 |
|
13-Mar-2018 |
Aurimas Liutikas <aurimas@google.com> |
Fix imports for fragment code. A follow up after factor to make it so androidx imports go in the correct order. Test: ./gradlew buildOnServer Change-Id: I49af96ac2c8324de2369e0a5b635bda6aa12d5cb
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
c559bbd18f472db18dd7cbc9f4c520ffdebd97e8 |
|
09-Mar-2018 |
Ian Lake <ilake@google.com> |
Deprecate getLoaderManager() With the introduction of LoaderManager.getInstance(), the APIs in FragmentActivity and Fragment to get a LoaderManager can be deprecated in favor of the more decoupled solution. Test: ./gradlew checkApi BUG: 74437029 Change-Id: Ic3bcd5ea6244e30b53883c9e2cfc45d3a2266c78
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
ac5fe7c617c66850fff75a9fce9979c6e5674b0f |
|
06-Mar-2018 |
Aurimas Liutikas <aurimas@google.com> |
Refactor support library Test: None Change-Id: I92e450c739fc9d77e8f8840bed4165ab88247fd6
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
f27b1ffc67228d73326ec3426fef4c9db75cd6fd |
|
06-Mar-2018 |
Aurimas Liutikas <aurimas@google.com> |
Revert "Refactor support library." This reverts commit b31c3281d870e9abb673db239234d580dcc4feff. Change-Id: Icfa5b9af633739ad2c857dff22a2181bac6661ef
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|
b31c3281d870e9abb673db239234d580dcc4feff |
|
20-Feb-2018 |
Aurimas Liutikas <aurimas@google.com> |
Refactor support library. Test: None Change-Id: I11a047324832801555673dac45ec1d6590a6338b
/frameworks/support/fragment/src/main/java/androidx/fragment/app/Fragment.java
|