Fixed
Status Update
Comments
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit a0fbb0a2f609e4540c89b01459d7aca90a9c36d4
Author: Alan Viverette <alanv@google.com>
Date: Wed Jul 05 12:37:46 2023
Fix nullability of getActivity and getService for FLAG_NO_CREATE
Fixes: 289696515
Relnote: "PendingIntentCompat.getActivity and getService may return null
when FLAG_NO_CREATE is specified."
Test: ./gradlew checkApi
Change-Id: Iffdf01bbd65c2cc18f3b21ac4d02881a75a0afee
A core/core/api/current.ignore
M core/core/api/current.txt
A core/core/api/restricted_current.ignore
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/PendingIntentCompat.java
https://android-review.googlesource.com/2649139
Branch: androidx-main
commit a0fbb0a2f609e4540c89b01459d7aca90a9c36d4
Author: Alan Viverette <alanv@google.com>
Date: Wed Jul 05 12:37:46 2023
Fix nullability of getActivity and getService for FLAG_NO_CREATE
Fixes: 289696515
Relnote: "PendingIntentCompat.getActivity and getService may return null
when FLAG_NO_CREATE is specified."
Test: ./gradlew checkApi
Change-Id: Iffdf01bbd65c2cc18f3b21ac4d02881a75a0afee
A core/core/api/current.ignore
M core/core/api/current.txt
A core/core/api/restricted_current.ignore
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/PendingIntentCompat.java
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core:1.12.0-beta01
Description
Version used: 1.11.0-beta02
This is rather a simple lint issue: The methods
PendingIntentCompat#getActivity
andPendingIntentCompat#getService
can returnnull
values if the flag is set toPendingIntent.FLAG_NO_CREATE
whose documentation is as follows:So, the
@NonNull
annotation for return type is simply wrong and should be@Nullable
instead.