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