1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.view.inputmethod; 18 19 import android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.app.ActivityThread; 22 import android.os.Bundle; 23 import android.os.IBinder; 24 import android.os.LocaleList; 25 import android.os.Parcel; 26 import android.os.Parcelable; 27 import android.view.Display; 28 import android.widget.inline.InlinePresentationSpec; 29 30 import com.android.internal.util.DataClass; 31 import com.android.internal.util.Preconditions; 32 import com.android.internal.widget.InlinePresentationStyleUtils; 33 34 import java.util.ArrayList; 35 import java.util.List; 36 37 /** 38 * This class represents an inline suggestion request made by one app to get suggestions from the 39 * other source. See {@link InlineSuggestion} for more information. 40 */ 41 @DataClass(genEqualsHashCode = true, genToString = true, genBuilder = true) 42 public final class InlineSuggestionsRequest implements Parcelable { 43 44 /** Constant used to indicate not putting a cap on the number of suggestions to return. */ 45 public static final int SUGGESTION_COUNT_UNLIMITED = Integer.MAX_VALUE; 46 47 /** 48 * Max number of suggestions expected from the response. It must be a positive value. 49 * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. 50 */ 51 private final int mMaxSuggestionCount; 52 53 /** 54 * The {@link InlinePresentationSpec} for each suggestion in the response. If the max suggestion 55 * count is larger than the number of specs in the list, then the last spec is used for the 56 * remainder of the suggestions. The list should not be empty. 57 */ 58 private final @NonNull List<InlinePresentationSpec> mInlinePresentationSpecs; 59 60 /** 61 * The package name of the app that requests for the inline suggestions and will host the 62 * embedded suggestion views. The app does not have to set the value for the field because 63 * it'll be set by the system for safety reasons. 64 */ 65 private @NonNull String mHostPackageName; 66 67 /** 68 * The IME provided locales for the request. If non-empty, the inline suggestions should 69 * return languages from the supported locales. If not provided, it'll default to system locale. 70 */ 71 private @NonNull LocaleList mSupportedLocales; 72 73 /** 74 * The extras state propagated from the IME to pass extra data. 75 * 76 * <p>Note: There should be no remote objects in the bundle, all included remote objects will 77 * be removed from the bundle before transmission.</p> 78 */ 79 private @NonNull Bundle mExtras; 80 81 /** 82 * The host input token of the IME that made the request. This will be set by the system for 83 * safety reasons. 84 * 85 * @hide 86 */ 87 private @Nullable IBinder mHostInputToken; 88 89 /** 90 * The host display id of the IME that made the request. This will be set by the system for 91 * safety reasons. 92 * 93 * @hide 94 */ 95 private int mHostDisplayId; 96 97 /** 98 * @hide 99 * @see {@link #mHostInputToken}. 100 */ setHostInputToken(IBinder hostInputToken)101 public void setHostInputToken(IBinder hostInputToken) { 102 mHostInputToken = hostInputToken; 103 } 104 extrasEquals(@onNull Bundle extras)105 private boolean extrasEquals(@NonNull Bundle extras) { 106 return InlinePresentationStyleUtils.bundleEquals(mExtras, extras); 107 } 108 109 // TODO(b/149609075): remove once IBinder parcelling is natively supported parcelHostInputToken(@onNull Parcel parcel, int flags)110 private void parcelHostInputToken(@NonNull Parcel parcel, int flags) { 111 parcel.writeStrongBinder(mHostInputToken); 112 } 113 114 // TODO(b/149609075): remove once IBinder parcelling is natively supported unparcelHostInputToken(Parcel parcel)115 private @Nullable IBinder unparcelHostInputToken(Parcel parcel) { 116 return parcel.readStrongBinder(); 117 } 118 119 /** 120 * @hide 121 * @see {@link #mHostDisplayId}. 122 */ setHostDisplayId(int hostDisplayId)123 public void setHostDisplayId(int hostDisplayId) { 124 mHostDisplayId = hostDisplayId; 125 } 126 onConstructed()127 private void onConstructed() { 128 Preconditions.checkState(!mInlinePresentationSpecs.isEmpty()); 129 Preconditions.checkState(mMaxSuggestionCount >= mInlinePresentationSpecs.size()); 130 } 131 132 /** 133 * Removes the remote objects from the bundles within the {@Code mExtras} and the 134 * {@code mInlinePresentationSpecs}. 135 * 136 * @hide 137 */ filterContentTypes()138 public void filterContentTypes() { 139 InlinePresentationStyleUtils.filterContentTypes(mExtras); 140 for (int i = 0; i < mInlinePresentationSpecs.size(); i++) { 141 mInlinePresentationSpecs.get(i).filterContentTypes(); 142 } 143 } 144 defaultMaxSuggestionCount()145 private static int defaultMaxSuggestionCount() { 146 return SUGGESTION_COUNT_UNLIMITED; 147 } 148 defaultHostPackageName()149 private static String defaultHostPackageName() { 150 return ActivityThread.currentPackageName(); 151 } 152 defaultSupportedLocales()153 private static LocaleList defaultSupportedLocales() { 154 return LocaleList.getDefault(); 155 } 156 157 @Nullable defaultHostInputToken()158 private static IBinder defaultHostInputToken() { 159 return null; 160 } 161 162 @Nullable defaultHostDisplayId()163 private static int defaultHostDisplayId() { 164 return Display.INVALID_DISPLAY; 165 } 166 167 @NonNull defaultExtras()168 private static Bundle defaultExtras() { 169 return Bundle.EMPTY; 170 } 171 172 /** @hide */ 173 abstract static class BaseBuilder { setInlinePresentationSpecs( @onNull List<android.widget.inline.InlinePresentationSpec> specs)174 abstract Builder setInlinePresentationSpecs( 175 @NonNull List<android.widget.inline.InlinePresentationSpec> specs); 176 setHostPackageName(@ullable String value)177 abstract Builder setHostPackageName(@Nullable String value); 178 setHostInputToken(IBinder hostInputToken)179 abstract Builder setHostInputToken(IBinder hostInputToken); 180 setHostDisplayId(int value)181 abstract Builder setHostDisplayId(int value); 182 } 183 184 185 186 // Code below generated by codegen v1.0.15. 187 // 188 // DO NOT MODIFY! 189 // CHECKSTYLE:OFF Generated code 190 // 191 // To regenerate run: 192 // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/view/inputmethod/InlineSuggestionsRequest.java 193 // 194 // To exclude the generated code from IntelliJ auto-formatting enable (one-time): 195 // Settings > Editor > Code Style > Formatter Control 196 //@formatter:off 197 198 199 @DataClass.Generated.Member InlineSuggestionsRequest( int maxSuggestionCount, @NonNull List<InlinePresentationSpec> inlinePresentationSpecs, @NonNull String hostPackageName, @NonNull LocaleList supportedLocales, @NonNull Bundle extras, @Nullable IBinder hostInputToken, int hostDisplayId)200 /* package-private */ InlineSuggestionsRequest( 201 int maxSuggestionCount, 202 @NonNull List<InlinePresentationSpec> inlinePresentationSpecs, 203 @NonNull String hostPackageName, 204 @NonNull LocaleList supportedLocales, 205 @NonNull Bundle extras, 206 @Nullable IBinder hostInputToken, 207 int hostDisplayId) { 208 this.mMaxSuggestionCount = maxSuggestionCount; 209 this.mInlinePresentationSpecs = inlinePresentationSpecs; 210 com.android.internal.util.AnnotationValidations.validate( 211 NonNull.class, null, mInlinePresentationSpecs); 212 this.mHostPackageName = hostPackageName; 213 com.android.internal.util.AnnotationValidations.validate( 214 NonNull.class, null, mHostPackageName); 215 this.mSupportedLocales = supportedLocales; 216 com.android.internal.util.AnnotationValidations.validate( 217 NonNull.class, null, mSupportedLocales); 218 this.mExtras = extras; 219 com.android.internal.util.AnnotationValidations.validate( 220 NonNull.class, null, mExtras); 221 this.mHostInputToken = hostInputToken; 222 this.mHostDisplayId = hostDisplayId; 223 224 onConstructed(); 225 } 226 227 /** 228 * Max number of suggestions expected from the response. It must be a positive value. 229 * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. 230 */ 231 @DataClass.Generated.Member getMaxSuggestionCount()232 public int getMaxSuggestionCount() { 233 return mMaxSuggestionCount; 234 } 235 236 /** 237 * The {@link InlinePresentationSpec} for each suggestion in the response. If the max suggestion 238 * count is larger than the number of specs in the list, then the last spec is used for the 239 * remainder of the suggestions. The list should not be empty. 240 */ 241 @DataClass.Generated.Member getInlinePresentationSpecs()242 public @NonNull List<InlinePresentationSpec> getInlinePresentationSpecs() { 243 return mInlinePresentationSpecs; 244 } 245 246 /** 247 * The package name of the app that requests for the inline suggestions and will host the 248 * embedded suggestion views. The app does not have to set the value for the field because 249 * it'll be set by the system for safety reasons. 250 */ 251 @DataClass.Generated.Member getHostPackageName()252 public @NonNull String getHostPackageName() { 253 return mHostPackageName; 254 } 255 256 /** 257 * The IME provided locales for the request. If non-empty, the inline suggestions should 258 * return languages from the supported locales. If not provided, it'll default to system locale. 259 */ 260 @DataClass.Generated.Member getSupportedLocales()261 public @NonNull LocaleList getSupportedLocales() { 262 return mSupportedLocales; 263 } 264 265 /** 266 * The extras state propagated from the IME to pass extra data. 267 * 268 * <p>Note: There should be no remote objects in the bundle, all included remote objects will 269 * be removed from the bundle before transmission.</p> 270 */ 271 @DataClass.Generated.Member getExtras()272 public @NonNull Bundle getExtras() { 273 return mExtras; 274 } 275 276 /** 277 * The host input token of the IME that made the request. This will be set by the system for 278 * safety reasons. 279 * 280 * @hide 281 */ 282 @DataClass.Generated.Member getHostInputToken()283 public @Nullable IBinder getHostInputToken() { 284 return mHostInputToken; 285 } 286 287 /** 288 * The host display id of the IME that made the request. This will be set by the system for 289 * safety reasons. 290 * 291 * @hide 292 */ 293 @DataClass.Generated.Member getHostDisplayId()294 public int getHostDisplayId() { 295 return mHostDisplayId; 296 } 297 298 @Override 299 @DataClass.Generated.Member toString()300 public String toString() { 301 // You can override field toString logic by defining methods like: 302 // String fieldNameToString() { ... } 303 304 return "InlineSuggestionsRequest { " + 305 "maxSuggestionCount = " + mMaxSuggestionCount + ", " + 306 "inlinePresentationSpecs = " + mInlinePresentationSpecs + ", " + 307 "hostPackageName = " + mHostPackageName + ", " + 308 "supportedLocales = " + mSupportedLocales + ", " + 309 "extras = " + mExtras + ", " + 310 "hostInputToken = " + mHostInputToken + ", " + 311 "hostDisplayId = " + mHostDisplayId + 312 " }"; 313 } 314 315 @Override 316 @DataClass.Generated.Member equals(@ullable Object o)317 public boolean equals(@Nullable Object o) { 318 // You can override field equality logic by defining either of the methods like: 319 // boolean fieldNameEquals(InlineSuggestionsRequest other) { ... } 320 // boolean fieldNameEquals(FieldType otherValue) { ... } 321 322 if (this == o) return true; 323 if (o == null || getClass() != o.getClass()) return false; 324 @SuppressWarnings("unchecked") 325 InlineSuggestionsRequest that = (InlineSuggestionsRequest) o; 326 //noinspection PointlessBooleanExpression 327 return true 328 && mMaxSuggestionCount == that.mMaxSuggestionCount 329 && java.util.Objects.equals(mInlinePresentationSpecs, that.mInlinePresentationSpecs) 330 && java.util.Objects.equals(mHostPackageName, that.mHostPackageName) 331 && java.util.Objects.equals(mSupportedLocales, that.mSupportedLocales) 332 && extrasEquals(that.mExtras) 333 && java.util.Objects.equals(mHostInputToken, that.mHostInputToken) 334 && mHostDisplayId == that.mHostDisplayId; 335 } 336 337 @Override 338 @DataClass.Generated.Member hashCode()339 public int hashCode() { 340 // You can override field hashCode logic by defining methods like: 341 // int fieldNameHashCode() { ... } 342 343 int _hash = 1; 344 _hash = 31 * _hash + mMaxSuggestionCount; 345 _hash = 31 * _hash + java.util.Objects.hashCode(mInlinePresentationSpecs); 346 _hash = 31 * _hash + java.util.Objects.hashCode(mHostPackageName); 347 _hash = 31 * _hash + java.util.Objects.hashCode(mSupportedLocales); 348 _hash = 31 * _hash + java.util.Objects.hashCode(mExtras); 349 _hash = 31 * _hash + java.util.Objects.hashCode(mHostInputToken); 350 _hash = 31 * _hash + mHostDisplayId; 351 return _hash; 352 } 353 354 @Override 355 @DataClass.Generated.Member writeToParcel(@onNull Parcel dest, int flags)356 public void writeToParcel(@NonNull Parcel dest, int flags) { 357 // You can override field parcelling by defining methods like: 358 // void parcelFieldName(Parcel dest, int flags) { ... } 359 360 byte flg = 0; 361 if (mHostInputToken != null) flg |= 0x20; 362 dest.writeByte(flg); 363 dest.writeInt(mMaxSuggestionCount); 364 dest.writeParcelableList(mInlinePresentationSpecs, flags); 365 dest.writeString(mHostPackageName); 366 dest.writeTypedObject(mSupportedLocales, flags); 367 dest.writeBundle(mExtras); 368 parcelHostInputToken(dest, flags); 369 dest.writeInt(mHostDisplayId); 370 } 371 372 @Override 373 @DataClass.Generated.Member describeContents()374 public int describeContents() { return 0; } 375 376 /** @hide */ 377 @SuppressWarnings({"unchecked", "RedundantCast"}) 378 @DataClass.Generated.Member InlineSuggestionsRequest(@onNull Parcel in)379 /* package-private */ InlineSuggestionsRequest(@NonNull Parcel in) { 380 // You can override field unparcelling by defining methods like: 381 // static FieldType unparcelFieldName(Parcel in) { ... } 382 383 byte flg = in.readByte(); 384 int maxSuggestionCount = in.readInt(); 385 List<InlinePresentationSpec> inlinePresentationSpecs = new ArrayList<>(); 386 in.readParcelableList(inlinePresentationSpecs, InlinePresentationSpec.class.getClassLoader()); 387 String hostPackageName = in.readString(); 388 LocaleList supportedLocales = (LocaleList) in.readTypedObject(LocaleList.CREATOR); 389 Bundle extras = in.readBundle(); 390 IBinder hostInputToken = unparcelHostInputToken(in); 391 int hostDisplayId = in.readInt(); 392 393 this.mMaxSuggestionCount = maxSuggestionCount; 394 this.mInlinePresentationSpecs = inlinePresentationSpecs; 395 com.android.internal.util.AnnotationValidations.validate( 396 NonNull.class, null, mInlinePresentationSpecs); 397 this.mHostPackageName = hostPackageName; 398 com.android.internal.util.AnnotationValidations.validate( 399 NonNull.class, null, mHostPackageName); 400 this.mSupportedLocales = supportedLocales; 401 com.android.internal.util.AnnotationValidations.validate( 402 NonNull.class, null, mSupportedLocales); 403 this.mExtras = extras; 404 com.android.internal.util.AnnotationValidations.validate( 405 NonNull.class, null, mExtras); 406 this.mHostInputToken = hostInputToken; 407 this.mHostDisplayId = hostDisplayId; 408 409 onConstructed(); 410 } 411 412 @DataClass.Generated.Member 413 public static final @NonNull Parcelable.Creator<InlineSuggestionsRequest> CREATOR 414 = new Parcelable.Creator<InlineSuggestionsRequest>() { 415 @Override 416 public InlineSuggestionsRequest[] newArray(int size) { 417 return new InlineSuggestionsRequest[size]; 418 } 419 420 @Override 421 public InlineSuggestionsRequest createFromParcel(@NonNull Parcel in) { 422 return new InlineSuggestionsRequest(in); 423 } 424 }; 425 426 /** 427 * A builder for {@link InlineSuggestionsRequest} 428 */ 429 @SuppressWarnings("WeakerAccess") 430 @DataClass.Generated.Member 431 public static final class Builder extends BaseBuilder { 432 433 private int mMaxSuggestionCount; 434 private @NonNull List<InlinePresentationSpec> mInlinePresentationSpecs; 435 private @NonNull String mHostPackageName; 436 private @NonNull LocaleList mSupportedLocales; 437 private @NonNull Bundle mExtras; 438 private @Nullable IBinder mHostInputToken; 439 private int mHostDisplayId; 440 441 private long mBuilderFieldsSet = 0L; 442 443 /** 444 * Creates a new Builder. 445 * 446 * @param inlinePresentationSpecs 447 * The {@link InlinePresentationSpec} for each suggestion in the response. If the max suggestion 448 * count is larger than the number of specs in the list, then the last spec is used for the 449 * remainder of the suggestions. The list should not be empty. 450 */ Builder( @onNull List<InlinePresentationSpec> inlinePresentationSpecs)451 public Builder( 452 @NonNull List<InlinePresentationSpec> inlinePresentationSpecs) { 453 mInlinePresentationSpecs = inlinePresentationSpecs; 454 com.android.internal.util.AnnotationValidations.validate( 455 NonNull.class, null, mInlinePresentationSpecs); 456 } 457 458 /** 459 * Max number of suggestions expected from the response. It must be a positive value. 460 * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. 461 */ 462 @DataClass.Generated.Member setMaxSuggestionCount(int value)463 public @NonNull Builder setMaxSuggestionCount(int value) { 464 checkNotUsed(); 465 mBuilderFieldsSet |= 0x1; 466 mMaxSuggestionCount = value; 467 return this; 468 } 469 470 /** 471 * The {@link InlinePresentationSpec} for each suggestion in the response. If the max suggestion 472 * count is larger than the number of specs in the list, then the last spec is used for the 473 * remainder of the suggestions. The list should not be empty. 474 */ 475 @DataClass.Generated.Member setInlinePresentationSpecs(@onNull List<InlinePresentationSpec> value)476 public @NonNull Builder setInlinePresentationSpecs(@NonNull List<InlinePresentationSpec> value) { 477 checkNotUsed(); 478 mBuilderFieldsSet |= 0x2; 479 mInlinePresentationSpecs = value; 480 return this; 481 } 482 483 /** @see #setInlinePresentationSpecs */ 484 @DataClass.Generated.Member addInlinePresentationSpecs(@onNull InlinePresentationSpec value)485 public @NonNull Builder addInlinePresentationSpecs(@NonNull InlinePresentationSpec value) { 486 // You can refine this method's name by providing item's singular name, e.g.: 487 // @DataClass.PluralOf("item")) mItems = ... 488 489 if (mInlinePresentationSpecs == null) setInlinePresentationSpecs(new ArrayList<>()); 490 mInlinePresentationSpecs.add(value); 491 return this; 492 } 493 494 /** 495 * The package name of the app that requests for the inline suggestions and will host the 496 * embedded suggestion views. The app does not have to set the value for the field because 497 * it'll be set by the system for safety reasons. 498 */ 499 @DataClass.Generated.Member 500 @Override setHostPackageName(@onNull String value)501 @NonNull Builder setHostPackageName(@NonNull String value) { 502 checkNotUsed(); 503 mBuilderFieldsSet |= 0x4; 504 mHostPackageName = value; 505 return this; 506 } 507 508 /** 509 * The IME provided locales for the request. If non-empty, the inline suggestions should 510 * return languages from the supported locales. If not provided, it'll default to system locale. 511 */ 512 @DataClass.Generated.Member setSupportedLocales(@onNull LocaleList value)513 public @NonNull Builder setSupportedLocales(@NonNull LocaleList value) { 514 checkNotUsed(); 515 mBuilderFieldsSet |= 0x8; 516 mSupportedLocales = value; 517 return this; 518 } 519 520 /** 521 * The extras state propagated from the IME to pass extra data. 522 * 523 * <p>Note: There should be no remote objects in the bundle, all included remote objects will 524 * be removed from the bundle before transmission.</p> 525 */ 526 @DataClass.Generated.Member setExtras(@onNull Bundle value)527 public @NonNull Builder setExtras(@NonNull Bundle value) { 528 checkNotUsed(); 529 mBuilderFieldsSet |= 0x10; 530 mExtras = value; 531 return this; 532 } 533 534 /** 535 * The host input token of the IME that made the request. This will be set by the system for 536 * safety reasons. 537 * 538 * @hide 539 */ 540 @DataClass.Generated.Member 541 @Override setHostInputToken(@onNull IBinder value)542 @NonNull Builder setHostInputToken(@NonNull IBinder value) { 543 checkNotUsed(); 544 mBuilderFieldsSet |= 0x20; 545 mHostInputToken = value; 546 return this; 547 } 548 549 /** 550 * The host display id of the IME that made the request. This will be set by the system for 551 * safety reasons. 552 * 553 * @hide 554 */ 555 @DataClass.Generated.Member 556 @Override setHostDisplayId(int value)557 @NonNull Builder setHostDisplayId(int value) { 558 checkNotUsed(); 559 mBuilderFieldsSet |= 0x40; 560 mHostDisplayId = value; 561 return this; 562 } 563 564 /** Builds the instance. This builder should not be touched after calling this! */ build()565 public @NonNull InlineSuggestionsRequest build() { 566 checkNotUsed(); 567 mBuilderFieldsSet |= 0x80; // Mark builder used 568 569 if ((mBuilderFieldsSet & 0x1) == 0) { 570 mMaxSuggestionCount = defaultMaxSuggestionCount(); 571 } 572 if ((mBuilderFieldsSet & 0x4) == 0) { 573 mHostPackageName = defaultHostPackageName(); 574 } 575 if ((mBuilderFieldsSet & 0x8) == 0) { 576 mSupportedLocales = defaultSupportedLocales(); 577 } 578 if ((mBuilderFieldsSet & 0x10) == 0) { 579 mExtras = defaultExtras(); 580 } 581 if ((mBuilderFieldsSet & 0x20) == 0) { 582 mHostInputToken = defaultHostInputToken(); 583 } 584 if ((mBuilderFieldsSet & 0x40) == 0) { 585 mHostDisplayId = defaultHostDisplayId(); 586 } 587 InlineSuggestionsRequest o = new InlineSuggestionsRequest( 588 mMaxSuggestionCount, 589 mInlinePresentationSpecs, 590 mHostPackageName, 591 mSupportedLocales, 592 mExtras, 593 mHostInputToken, 594 mHostDisplayId); 595 return o; 596 } 597 checkNotUsed()598 private void checkNotUsed() { 599 if ((mBuilderFieldsSet & 0x80) != 0) { 600 throw new IllegalStateException( 601 "This Builder should not be reused. Use a new Builder instance instead"); 602 } 603 } 604 } 605 606 @DataClass.Generated( 607 time = 1588109685838L, 608 codegenVersion = "1.0.15", 609 sourceFile = "frameworks/base/core/java/android/view/inputmethod/InlineSuggestionsRequest.java", 610 inputSignatures = "public static final int SUGGESTION_COUNT_UNLIMITED\nprivate final int mMaxSuggestionCount\nprivate final @android.annotation.NonNull java.util.List<android.widget.inline.InlinePresentationSpec> mInlinePresentationSpecs\nprivate @android.annotation.NonNull java.lang.String mHostPackageName\nprivate @android.annotation.NonNull android.os.LocaleList mSupportedLocales\nprivate @android.annotation.NonNull android.os.Bundle mExtras\nprivate @android.annotation.Nullable android.os.IBinder mHostInputToken\nprivate int mHostDisplayId\npublic void setHostInputToken(android.os.IBinder)\nprivate boolean extrasEquals(android.os.Bundle)\nprivate void parcelHostInputToken(android.os.Parcel,int)\nprivate @android.annotation.Nullable android.os.IBinder unparcelHostInputToken(android.os.Parcel)\npublic void setHostDisplayId(int)\nprivate void onConstructed()\npublic void filterContentTypes()\nprivate static int defaultMaxSuggestionCount()\nprivate static java.lang.String defaultHostPackageName()\nprivate static android.os.LocaleList defaultSupportedLocales()\nprivate static @android.annotation.Nullable android.os.IBinder defaultHostInputToken()\nprivate static @android.annotation.Nullable int defaultHostDisplayId()\nprivate static @android.annotation.NonNull android.os.Bundle defaultExtras()\nclass InlineSuggestionsRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setInlinePresentationSpecs(java.util.List<android.widget.inline.InlinePresentationSpec>)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostPackageName(java.lang.String)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostInputToken(android.os.IBinder)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostDisplayId(int)\nclass BaseBuilder extends java.lang.Object implements []") 611 @Deprecated __metadata()612 private void __metadata() {} 613 614 615 //@formatter:on 616 // End of generated code 617 618 } 619