Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 127a607d6dd3136c839529aaf0386d9f0b1d28cf
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri May 01 17:40:55 2020
Rewrite old ActivityResult methods in Fragment
With the release of the new ActivityResult APIs, Fragment can now take
advantage of those instead of using the framework method of handling
starting activities for results, or requesting permissions.
Using the ActivityResult APIs means there is no longer a requirement for
requestCodes to only use the lower 16 bits, and NestedFragmentTest have
been adjusted accordingly.
Test: existing test pass
Bug: 155518741
Change-Id: Ifddbbd362e2e57cb9cdd30f9e19626c0c9661384
M activity/activity/api/1.2.0-alpha05.txt
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_1.2.0-alpha05.txt
M activity/activity/api/public_plus_experimental_current.txt
M activity/activity/api/restricted_1.2.0-alpha05.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
M activity/activity/src/main/java/androidx/activity/result/contract/ActivityResultContracts.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/NestedFragmentTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManagerState.java
https://android-review.googlesource.com/1289054
Branch: androidx-master-dev
commit 127a607d6dd3136c839529aaf0386d9f0b1d28cf
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri May 01 17:40:55 2020
Rewrite old ActivityResult methods in Fragment
With the release of the new ActivityResult APIs, Fragment can now take
advantage of those instead of using the framework method of handling
starting activities for results, or requesting permissions.
Using the ActivityResult APIs means there is no longer a requirement for
requestCodes to only use the lower 16 bits, and NestedFragmentTest have
been adjusted accordingly.
Test: existing test pass
Bug: 155518741
Change-Id: Ifddbbd362e2e57cb9cdd30f9e19626c0c9661384
M activity/activity/api/1.2.0-alpha05.txt
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_1.2.0-alpha05.txt
M activity/activity/api/public_plus_experimental_current.txt
M activity/activity/api/restricted_1.2.0-alpha05.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
M activity/activity/src/main/java/androidx/activity/result/contract/ActivityResultContracts.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/NestedFragmentTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManagerState.java
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3f40dba7a8d8f44bf3dec7c47a25a06da0021c91
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri May 01 18:12:37 2020
Remove unused code from FragmentActivity
Since Fragments now use the ActivityResultRegistry, we should remove all
of the unused code in FragmentActivity.
Test: all exisiting tests pass
Bug: 155518741
Change-Id: I2b868703a804e2df92dc269e529a0dc81709ed26
M fragment/fragment/api/1.3.0-alpha05.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_1.3.0-alpha05.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_1.3.0-alpha05.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentReceiveResultTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentHostCallback.java
https://android-review.googlesource.com/1300410
Branch: androidx-master-dev
commit 3f40dba7a8d8f44bf3dec7c47a25a06da0021c91
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri May 01 18:12:37 2020
Remove unused code from FragmentActivity
Since Fragments now use the ActivityResultRegistry, we should remove all
of the unused code in FragmentActivity.
Test: all exisiting tests pass
Bug: 155518741
Change-Id: I2b868703a804e2df92dc269e529a0dc81709ed26
M fragment/fragment/api/1.3.0-alpha05.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_1.3.0-alpha05.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_1.3.0-alpha05.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentReceiveResultTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentHostCallback.java
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be available in the Fragment 1.3.0-alpha05 release.
Description
The new ActivityResult APIs have been released, and the old APIs in FragmentActivity and FragmentHostCallback have been deprecated.
We should re-implement the old Fragment Activity Result APIs (startActivityForResult, StartIntentSenderForResult, and RequestPermissions) in terms of the new APIs.