Suppress one off errorprone warnings for AndroidFrameworkPendingIntentMutability
These are essentially false positives that are just taking the flags in as an argument and passing that over to PendingIntent methods. This change should clear up the noise. Bug: 160794467 Test: Errorprone builds should no longer show these as violations Exempt-From-Owner-Approval: Trivial warning suppression Change-Id: I8ae309fd53140718d41f4d3b94f92e111cdd8955
This commit is contained in:
@@ -363,6 +363,7 @@ public final class PendingIntent implements Parcelable {
|
||||
* parameters. May return null only if {@link #FLAG_NO_CREATE} has been
|
||||
* supplied.
|
||||
*/
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public static PendingIntent getActivity(Context context, int requestCode,
|
||||
Intent intent, @Flags int flags) {
|
||||
return getActivity(context, requestCode, intent, flags, null);
|
||||
@@ -489,6 +490,7 @@ public final class PendingIntent implements Parcelable {
|
||||
* parameters. May return null only if {@link #FLAG_NO_CREATE} has been
|
||||
* supplied.
|
||||
*/
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public static PendingIntent getActivities(Context context, int requestCode,
|
||||
@NonNull Intent[] intents, @Flags int flags) {
|
||||
return getActivities(context, requestCode, intents, flags, null);
|
||||
@@ -611,6 +613,7 @@ public final class PendingIntent implements Parcelable {
|
||||
* parameters. May return null only if {@link #FLAG_NO_CREATE} has been
|
||||
* supplied.
|
||||
*/
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public static PendingIntent getBroadcast(Context context, int requestCode,
|
||||
Intent intent, @Flags int flags) {
|
||||
return getBroadcastAsUser(context, requestCode, intent, flags, context.getUser());
|
||||
|
||||
@@ -264,6 +264,7 @@ public class TaskStackBuilder {
|
||||
*
|
||||
* @return The obtained PendingIntent
|
||||
*/
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public PendingIntent getPendingIntent(int requestCode, @PendingIntent.Flags int flags,
|
||||
Bundle options) {
|
||||
if (mIntents.isEmpty()) {
|
||||
@@ -278,6 +279,7 @@ public class TaskStackBuilder {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public PendingIntent getPendingIntent(int requestCode, int flags, Bundle options,
|
||||
UserHandle user) {
|
||||
if (mIntents.isEmpty()) {
|
||||
|
||||
@@ -2624,6 +2624,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("AndroidFrameworkPendingIntentMutability")
|
||||
public PendingIntent getPendingIntentActivity(Context context, int requestCode, Intent intent,
|
||||
int flags) {
|
||||
return PendingIntent.getActivity(context, requestCode, intent, flags);
|
||||
|
||||
Reference in New Issue
Block a user