Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d3fe9bd authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Remove constraint inside SearchTarget to only allow one android primitive to be set.

Bug: 262611016

Change-Id: I9c318f76978ba02d9c9f92b88d714d6d688022e8
parent 10f7c412
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -186,16 +186,6 @@ public final class SearchTarget implements Parcelable {
        mAppWidgetProviderInfo = appWidgetProviderInfo;
        mSliceUri = sliceUri;
        mExtras = extras != null ? extras : new Bundle();

        int published = 0;
        if (mSearchAction != null) published++;
        if (mShortcutInfo != null) published++;
        if (mAppWidgetProviderInfo != null) published++;
        if (mSliceUri != null) published++;
        if (published > 1) {
            throw new IllegalStateException("Only one of SearchAction, ShortcutInfo,"
                    + " AppWidgetProviderInfo, SliceUri can be assigned in a SearchTarget.");
        }
    }

    /**