Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
AppCompat doesn't depend on Activity 1.5 yet, so it has no access to ViewTreeOnBackPressedDispatcherOwner
. Once it upgrades to depend on Activity 1.5, it can also add this same line.
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit cb4f58de8d140ddc2eeaac8d9481f961343f1300
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Aug 25 16:42:53 2022
Set view tree dispatchOwner for AppCompat
Now that AppCompat depends on an Activity version that includes it, we
can set the AppCompatActivity as the OnBackPressedDispatcherOwner on the
view tree.
RelNote: "`AppCompatActivity` now sets the
`ViewTreeOnBackPressedDispatcherOwner` so that it is possible to
retrieve the dispatcher from the view."
Test: Added AppCompatActivityViewTreeTest
Bug: 235416503
Change-Id: I1a115d42a68a37bab113927e9e6975f1a83b2b54
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/AppCompatActivityViewTreeTest.kt
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatActivity.java
https://android-review.googlesource.com/2197918
Branch: androidx-main
commit cb4f58de8d140ddc2eeaac8d9481f961343f1300
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Aug 25 16:42:53 2022
Set view tree dispatchOwner for AppCompat
Now that AppCompat depends on an Activity version that includes it, we
can set the AppCompatActivity as the OnBackPressedDispatcherOwner on the
view tree.
RelNote: "`AppCompatActivity` now sets the
`ViewTreeOnBackPressedDispatcherOwner` so that it is possible to
retrieve the dispatcher from the view."
Test: Added AppCompatActivityViewTreeTest
Bug: 235416503
Change-Id: I1a115d42a68a37bab113927e9e6975f1a83b2b54
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/AppCompatActivityViewTreeTest.kt
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatActivity.java
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be in the AppCompat 1.6.0-rc01
release.
na...@google.com <na...@google.com> #5
This bug was linked in a change in the following release(s):
androidx.appcompat:appcompat:1.6.0-rc01
na...@google.com <na...@google.com> #6
This bug was linked in a change in the following release(s):
androidx.appcompat:appcompat:1.7.0-alpha01
Description
Component used: Activity
Version used: 1.5.0-alpha05
Devices/Android versions reproduced on: Android 11
It appears that AppCompatActivity mistakenly doesn't set the ViewTreeOnBackPressedDispatcherOwner even though its superclass ComponentActivity does, looks like a copy-paste bug:
ComponentActivity:
AppCompatActivity: