Fixed
Status Update
Comments
vi...@google.com <vi...@google.com> #2
This is the same as the internal b/148420810
vi...@google.com <vi...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 6aab78e2ef9377b16663d979a87083d139856806
Author: Ian Lake <ilake@google.com>
Date: Mon Apr 13 13:15:05 2020
Add @NonNull annotations to internal menu callbacks
Window.Callback was recently to changed to only
take non-null menus / menu items. This updates the
internal AppCompat MenuBuilder.Callback and
MenuPresenter.Callback to add the same @NonNull
annotations.
Test: new BaseBasicsTestCase tests pass
BUG: 142843126
Change-Id: I1fc695406d486d86fe0aa7c3387057b8b3a9160e
M appcompat/appcompat/api/restricted_1.2.0-beta01.txt
M appcompat/appcompat/api/restricted_current.txt
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/ToolbarActionBar.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/WindowDecorActionBar.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/StandaloneActionMode.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/BaseMenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuBuilder.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuDialogHelper.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/SubMenuBuilder.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/ActionMenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/ActionMenuView.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/PopupMenu.java
https://android-review.googlesource.com/1284518
Branch: androidx-master-dev
commit 6aab78e2ef9377b16663d979a87083d139856806
Author: Ian Lake <ilake@google.com>
Date: Mon Apr 13 13:15:05 2020
Add @NonNull annotations to internal menu callbacks
Window.Callback was recently to changed to only
take non-null menus / menu items. This updates the
internal AppCompat MenuBuilder.Callback and
MenuPresenter.Callback to add the same @NonNull
annotations.
Test: new BaseBasicsTestCase tests pass
BUG: 142843126
Change-Id: I1fc695406d486d86fe0aa7c3387057b8b3a9160e
M appcompat/appcompat/api/restricted_1.2.0-beta01.txt
M appcompat/appcompat/api/restricted_current.txt
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/ToolbarActionBar.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/WindowDecorActionBar.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/StandaloneActionMode.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/BaseMenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuBuilder.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuDialogHelper.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/MenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/view/menu/SubMenuBuilder.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/ActionMenuPresenter.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/ActionMenuView.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/PopupMenu.java
li...@gmail.com <li...@gmail.com> #4
We've updated AppCompat to no longer pass a null Menu. This will be available in a future 1.2.0 release.
vi...@google.com <vi...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 10990f668a04e5eb532cd173f44562d80eae06e2
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jun 22 16:26:37 2022
Restrict devices for ComponentActivity menu tests
Prior to SDK 26, it was possible to pass null menus to Activity menu
APIs. b/142843126 added nullability annotations to framework Activity
that ensured that any menu passed to the menu APIs were non-null.
LeakCanary was implemented in Kotlin with the expectations that the new
framework Activity nullability contracts would hold true. In reality
that is not the case, and on API levels 25 and lower, you can get a
non-null menu passed to a framework API.
There is nothing we can do to address this in the framework. The only
way to run into this issue is by using ActionBar with ComponentActivity
and attempting to use a null menu. Any devs interacting with ActionBar
should be using AppCompantActivity which addresses this issue.
Otherwise, they should be using ToolBar, which also addresses this.
We are going to move these particular test to only run on API 26 and
above to avoid these failures.
Test: updated tests
Fixes: 236868265
Fixes: 229013665
Change-Id: Ib4f606d4a1533bf9b56bd3346c0b5772d5e3cf47
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityMenuTest.kt
https://android-review.googlesource.com/2134516
Branch: androidx-main
commit 10990f668a04e5eb532cd173f44562d80eae06e2
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Jun 22 16:26:37 2022
Restrict devices for ComponentActivity menu tests
Prior to SDK 26, it was possible to pass null menus to Activity menu
APIs.
that ensured that any menu passed to the menu APIs were non-null.
LeakCanary was implemented in Kotlin with the expectations that the new
framework Activity nullability contracts would hold true. In reality
that is not the case, and on API levels 25 and lower, you can get a
non-null menu passed to a framework API.
There is nothing we can do to address this in the framework. The only
way to run into this issue is by using ActionBar with ComponentActivity
and attempting to use a null menu. Any devs interacting with ActionBar
should be using AppCompantActivity which addresses this issue.
Otherwise, they should be using ToolBar, which also addresses this.
We are going to move these particular test to only run on API 26 and
above to avoid these failures.
Test: updated tests
Fixes: 236868265
Fixes: 229013665
Change-Id: Ib4f606d4a1533bf9b56bd3346c0b5772d5e3cf47
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityMenuTest.kt
Description
Version used: 1.1.0-alpha04
Theme used: Theme.MaterialComponents.DayNight.NoActionBar
Devices/Android versions reproduced on: android pie
- When I set toolbar_maxButtonHeight, since buttonGravity can only be set to top and bottom, it does not meet the CENTER_VERTICAL requirements of the design.