From 17e3e829bfee5471a4f42cdd41e15bc8a8cc8d50 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Wed, 3 Feb 2021 19:34:54 +0100 Subject: [PATCH] API: Suppress existing NullableCollections lints (S edition, die zweite) Bug: 152525509 Test: make checkapi Change-Id: Ia8cc585c6815c7b641ed3603862042eef70c369f --- core/java/android/app/smartspace/SmartspaceAction.java | 4 +++- core/java/android/app/smartspace/SmartspaceConfig.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/smartspace/SmartspaceAction.java b/core/java/android/app/smartspace/SmartspaceAction.java index 033cda1ba8459..439d851acea6c 100644 --- a/core/java/android/app/smartspace/SmartspaceAction.java +++ b/core/java/android/app/smartspace/SmartspaceAction.java @@ -18,6 +18,7 @@ package android.app.smartspace; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.app.PendingIntent; import android.content.Intent; @@ -171,6 +172,7 @@ public final class SmartspaceAction implements Parcelable { /** * Returns the extra bundle for this object. */ + @SuppressLint("NullableCollection") public @Nullable Bundle getExtras() { return mExtras; } @@ -334,7 +336,7 @@ public final class SmartspaceAction implements Parcelable { * Sets the extra. */ @NonNull - public Builder setExtras(@Nullable Bundle extras) { + public Builder setExtras(@SuppressLint("NullableCollection") @Nullable Bundle extras) { mExtras = extras; return this; } diff --git a/core/java/android/app/smartspace/SmartspaceConfig.java b/core/java/android/app/smartspace/SmartspaceConfig.java index 1f9cbb5ca33b4..07d7bf0e33afb 100644 --- a/core/java/android/app/smartspace/SmartspaceConfig.java +++ b/core/java/android/app/smartspace/SmartspaceConfig.java @@ -17,6 +17,7 @@ package android.app.smartspace; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.content.Context; import android.os.Bundle; @@ -98,6 +99,7 @@ public final class SmartspaceConfig implements Parcelable { } @Nullable + @SuppressLint("NullableCollection") public Bundle getExtras() { return mExtras; } @@ -186,7 +188,7 @@ public final class SmartspaceConfig implements Parcelable { * Used to send a bundle containing extras for the {@link SmartspaceConfig}. */ @NonNull - public Builder setExtras(@NonNull Bundle extras) { + public Builder setExtras(@SuppressLint("NullableCollection") @NonNull Bundle extras) { this.mExtras = extras; return this; }