Infeasible
Status Update
Comments
mi...@onfleet.com <mi...@onfleet.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c2365dcfeb9064814282304f30f3eb86be71fdc7
Author: Dan Nizri <dniz@google.com>
Date: Wed Dec 20 16:33:08 2023
Fix Popup back handling on Android T/13+ when android:enableOnBackInvokedCallback="true"
Bug: 313702338
Bug: 318537200
Test: tested with android:enableOnBackInvokedCallback="true"
Change-Id: I7c7cef686ed9fbfd2d144c90040b13528f1675ed
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
https://android-review.googlesource.com/2886766
Branch: androidx-main
commit c2365dcfeb9064814282304f30f3eb86be71fdc7
Author: Dan Nizri <dniz@google.com>
Date: Wed Dec 20 16:33:08 2023
Fix Popup back handling on Android T/13+ when android:enableOnBackInvokedCallback="true"
Bug: 313702338
Bug: 318537200
Test: tested with android:enableOnBackInvokedCallback="true"
Change-Id: I7c7cef686ed9fbfd2d144c90040b13528f1675ed
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
il...@google.com <il...@google.com> #3
Is there remaining work for this feature request. Support for predictive back in Dialogs would allow Material3 to remove some Dialog forks and would be very helpful!
Description
Version used: 2.1.0-alpha05
Devices/Android versions reproduced on: Pixel 3XL Android 9 (physical device)
Sometimes, when an app is opened with a deeplink, if the user goes back all the way to the top of the backstack, and then back again (to the previous app which opened the deeplink), the app remains in the recents screen, and then if the user brings the app back to the foreground from the recents screen, the deeplink is handled again and the user goes BACk to the deep link destination, instead of the top level destination they were on previously. This can result in an endless loop where every time the user foregrounds the app, they end up on the deeplink destination.
Despite this issue being resolved in this ticket:
Sample App Description:
The attached "Navigation" app is a simple implementation of the nav component. It has 2 destinations:
Root Destination - the top level, start destination
Child Destination - A "child" destination that is reachable by clicking the button in the Root Destination.
Child Destination can be opened using the follwing deep link:
The fragments for both destinations include a text view that lists the Flags that are present on the Activity's Intent.
Steps to reproduce the issue:
1. Install the "Navigation" app
2. With another app, create an Intent that contains the NEW_TASK flag, and a data URI of
- You can easily create such an intent by uses the Messages app, and creating a text with the
3. Send the intent (in messages, click on the URL link), and in the system prompt, open it with the "Navigation" app.
4. The Navigation app correctly opens to the fragment_child destination.
5. Using the system back button, go back once (to the fragment_root destination), and then go back again (to the messages app).
6. Open the Recents screen and find the entry that shows the Navigation app. Notice that it is showing "fragment_root", which is the last place we were in that app.
7. Select the Navigation app in the recents screen.
8. Observe that it uses the deeplink again, and shows the fragment_child destination.
The attached screen record is a demonstration of the above steps, using the Messages app.
It's worth noting that if I follow the same procedure as above, but use Gmail app instead of messages, the behavior is different and I cannot reproduce the issue. When Gmail sends the intent, it adds the NEW_DOCUMENT flag (in addition to NEW_TASK). As a result, when you use the back button to go back (first to root_fragment, and then back to gmail), the task for the Navigation app is completely gone, and Navigation no longer appears in the recents screen. Since it is not there, you cannot open it and re-create the problem.