Merge "Remove constraint inside SearchTarget to only allow one android primitive to be set." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
99e08bc3eb
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user