Merge "Create a new Bundle object if mExtras is null." into tm-qpr-dev am: 5abc26927b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19016479

Change-Id: I4c1a787369ed85459c592d4d3ff6f6c636e5fafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-07-14 17:20:52 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ public final class SearchAction implements Parcelable {
private final UserHandle mUserHandle;
@Nullable
private Bundle mExtras;
private final Bundle mExtras;
SearchAction(Parcel in) {
mId = in.readString();
@@ -99,7 +99,7 @@ public final class SearchAction implements Parcelable {
mPendingIntent = pendingIntent;
mIntent = intent;
mUserHandle = userHandle;
mExtras = extras;
mExtras = extras != null ? extras : new Bundle();
if (mPendingIntent == null && mIntent == null) {
throw new IllegalStateException("At least one type of intent should be available.");

View File

@@ -185,7 +185,7 @@ public final class SearchTarget implements Parcelable {
mShortcutInfo = shortcutInfo;
mAppWidgetProviderInfo = appWidgetProviderInfo;
mSliceUri = sliceUri;
mExtras = extras;
mExtras = extras != null ? extras : new Bundle();
int published = 0;
if (mSearchAction != null) published++;