| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.companion; |
| 18 |
|
| 19 |
import static android.Manifest.permission.REQUEST_COMPANION_SELF_MANAGED; |
| 20 |
|
| 21 |
import static com.android.internal.util.CollectionUtils.emptyIfNull; |
| 22 |
|
| 23 |
import static java.util.Objects.requireNonNull; |
| 24 |
|
| 25 |
import android.Manifest; |
| 26 |
import android.annotation.NonNull; |
| 27 |
import android.annotation.Nullable; |
| 28 |
import android.annotation.RequiresPermission; |
| 29 |
import android.annotation.StringDef; |
| 30 |
import android.annotation.UserIdInt; |
| 31 |
import android.compat.annotation.UnsupportedAppUsage; |
| 32 |
import android.os.Build; |
| 33 |
import android.os.Parcel; |
| 34 |
import android.os.Parcelable; |
| 35 |
import android.provider.OneTimeUseBuilder; |
| 36 |
|
| 37 |
import com.android.internal.util.ArrayUtils; |
| 38 |
import com.android.internal.util.DataClass; |
| 39 |
|
| 40 |
import java.lang.annotation.Retention; |
| 41 |
import java.lang.annotation.RetentionPolicy; |
| 42 |
import java.util.ArrayList; |
| 43 |
import java.util.List; |
| 44 |
import java.util.Objects; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
@DataClass( |
| 59 |
genConstructor = false, |
| 60 |
genToString = true, |
| 61 |
genEqualsHashCode = true, |
| 62 |
genHiddenGetters = true, |
| 63 |
genParcelable = true, |
| 64 |
genConstDefs = false) |
| 65 |
public final class AssociationRequest implements Parcelable { |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
public static final String DEVICE_PROFILE_WATCH = "android.app.role.COMPANION_DEVICE_WATCH"; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
@RequiresPermission(Manifest.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING) |
| 94 |
public static final String DEVICE_PROFILE_APP_STREAMING = |
| 95 |
"android.app.role.COMPANION_DEVICE_APP_STREAMING"; |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
@RequiresPermission(Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION) |
| 107 |
public static final String DEVICE_PROFILE_AUTOMOTIVE_PROJECTION = |
| 108 |
"android.app.role.SYSTEM_AUTOMOTIVE_PROJECTION"; |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
@RequiresPermission(Manifest.permission.REQUEST_COMPANION_PROFILE_COMPUTER) |
| 121 |
public static final String DEVICE_PROFILE_COMPUTER = |
| 122 |
"android.app.role.COMPANION_DEVICE_COMPUTER"; |
| 123 |
|
| 124 |
|
| 125 |
@Retention(RetentionPolicy.SOURCE) |
| 126 |
@StringDef(value = { DEVICE_PROFILE_WATCH, DEVICE_PROFILE_COMPUTER, |
| 127 |
DEVICE_PROFILE_AUTOMOTIVE_PROJECTION, DEVICE_PROFILE_APP_STREAMING }) |
| 128 |
public @interface DeviceProfile {} |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
private final boolean mSingleDevice; |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
@DataClass.PluralOf("deviceFilter") |
| 143 |
private final @NonNull List<DeviceFilter<?>> mDeviceFilters; |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
private final @Nullable @DeviceProfile String mDeviceProfile; |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
private final @Nullable CharSequence mDisplayName; |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
private final boolean mSelfManaged; |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
private final boolean mForceConfirmation; |
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
private @Nullable String mPackageName; |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
private @UserIdInt int mUserId; |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
private @Nullable String mDeviceProfilePrivilegesDescription; |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
private final long mCreationTime; |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
private boolean mSkipPrompt; |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
private AssociationRequest( |
| 222 |
boolean singleDevice, |
| 223 |
@NonNull List<DeviceFilter<?>> deviceFilters, |
| 224 |
@Nullable @DeviceProfile String deviceProfile, |
| 225 |
@Nullable CharSequence displayName, |
| 226 |
boolean selfManaged, |
| 227 |
boolean forceConfirmation) { |
| 228 |
mSingleDevice = singleDevice; |
| 229 |
mDeviceFilters = requireNonNull(deviceFilters); |
| 230 |
mDeviceProfile = deviceProfile; |
| 231 |
mDisplayName = displayName; |
| 232 |
mSelfManaged = selfManaged; |
| 233 |
mForceConfirmation = forceConfirmation; |
| 234 |
|
| 235 |
mCreationTime = System.currentTimeMillis(); |
| 236 |
} |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
public @Nullable @DeviceProfile String getDeviceProfile() { |
| 242 |
return mDeviceProfile; |
| 243 |
} |
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
public @Nullable CharSequence getDisplayName() { |
| 250 |
return mDisplayName; |
| 251 |
} |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
public boolean isSelfManaged() { |
| 259 |
return mSelfManaged; |
| 260 |
} |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
public boolean isForceConfirmation() { |
| 270 |
return mForceConfirmation; |
| 271 |
} |
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
public boolean isSingleDevice() { |
| 281 |
return mSingleDevice; |
| 282 |
} |
| 283 |
|
| 284 |
|
| 285 |
public void setPackageName(@NonNull String packageName) { |
| 286 |
mPackageName = packageName; |
| 287 |
} |
| 288 |
|
| 289 |
|
| 290 |
public void setUserId(@UserIdInt int userId) { |
| 291 |
mUserId = userId; |
| 292 |
} |
| 293 |
|
| 294 |
|
| 295 |
public void setDeviceProfilePrivilegesDescription(@NonNull String desc) { |
| 296 |
mDeviceProfilePrivilegesDescription = desc; |
| 297 |
} |
| 298 |
|
| 299 |
|
| 300 |
public void setSkipPrompt(boolean value) { |
| 301 |
mSkipPrompt = value; |
| 302 |
} |
| 303 |
|
| 304 |
|
| 305 |
@NonNull |
| 306 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 307 |
public List<DeviceFilter<?>> getDeviceFilters() { |
| 308 |
return mDeviceFilters; |
| 309 |
} |
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
public static final class Builder extends OneTimeUseBuilder<AssociationRequest> { |
| 315 |
private boolean mSingleDevice = false; |
| 316 |
private @Nullable ArrayList<DeviceFilter<?>> mDeviceFilters = null; |
| 317 |
private @Nullable String mDeviceProfile; |
| 318 |
private @Nullable CharSequence mDisplayName; |
| 319 |
private boolean mSelfManaged = false; |
| 320 |
private boolean mForceConfirmation = false; |
| 321 |
|
| 322 |
public Builder() {} |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
@NonNull |
| 335 |
public Builder setSingleDevice(boolean singleDevice) { |
| 336 |
checkNotUsed(); |
| 337 |
this.mSingleDevice = singleDevice; |
| 338 |
return this; |
| 339 |
} |
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
@NonNull |
| 346 |
public Builder addDeviceFilter(@Nullable DeviceFilter<?> deviceFilter) { |
| 347 |
checkNotUsed(); |
| 348 |
if (deviceFilter != null) { |
| 349 |
mDeviceFilters = ArrayUtils.add(mDeviceFilters, deviceFilter); |
| 350 |
} |
| 351 |
return this; |
| 352 |
} |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
@NonNull |
| 358 |
public Builder setDeviceProfile(@NonNull @DeviceProfile String deviceProfile) { |
| 359 |
checkNotUsed(); |
| 360 |
mDeviceProfile = deviceProfile; |
| 361 |
return this; |
| 362 |
} |
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
@NonNull |
| 372 |
public Builder setDisplayName(@NonNull CharSequence displayName) { |
| 373 |
checkNotUsed(); |
| 374 |
mDisplayName = requireNonNull(displayName); |
| 375 |
return this; |
| 376 |
} |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
@RequiresPermission(REQUEST_COMPANION_SELF_MANAGED) |
| 386 |
@NonNull |
| 387 |
public Builder setSelfManaged(boolean selfManaged) { |
| 388 |
checkNotUsed(); |
| 389 |
mSelfManaged = selfManaged; |
| 390 |
return this; |
| 391 |
} |
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
@RequiresPermission(REQUEST_COMPANION_SELF_MANAGED) |
| 399 |
@NonNull |
| 400 |
public Builder setForceConfirmation(boolean forceConfirmation) { |
| 401 |
checkNotUsed(); |
| 402 |
mForceConfirmation = forceConfirmation; |
| 403 |
return this; |
| 404 |
} |
| 405 |
|
| 406 |
|
| 407 |
@NonNull |
| 408 |
@Override |
| 409 |
public AssociationRequest build() { |
| 410 |
markUsed(); |
| 411 |
if (mSelfManaged && mDisplayName == null) { |
| 412 |
throw new IllegalStateException("Request for a self-managed association MUST " |
| 413 |
+ "provide the display name of the device"); |
| 414 |
} |
| 415 |
return new AssociationRequest(mSingleDevice, emptyIfNull(mDeviceFilters), |
| 416 |
mDeviceProfile, mDisplayName, mSelfManaged, mForceConfirmation); |
| 417 |
} |
| 418 |
} |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
@DataClass.Generated.Member |
| 443 |
public @Nullable String getPackageName() { |
| 444 |
return mPackageName; |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
@DataClass.Generated.Member |
| 454 |
public @UserIdInt int getUserId() { |
| 455 |
return mUserId; |
| 456 |
} |
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
@DataClass.Generated.Member |
| 465 |
public @Nullable String getDeviceProfilePrivilegesDescription() { |
| 466 |
return mDeviceProfilePrivilegesDescription; |
| 467 |
} |
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
@DataClass.Generated.Member |
| 475 |
public long getCreationTime() { |
| 476 |
return mCreationTime; |
| 477 |
} |
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
@DataClass.Generated.Member |
| 486 |
public boolean isSkipPrompt() { |
| 487 |
return mSkipPrompt; |
| 488 |
} |
| 489 |
|
| 490 |
@Override |
| 491 |
@DataClass.Generated.Member |
| 492 |
public String toString() { |
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
return "AssociationRequest { " + |
| 497 |
"singleDevice = " + mSingleDevice + ", " + |
| 498 |
"deviceFilters = " + mDeviceFilters + ", " + |
| 499 |
"deviceProfile = " + mDeviceProfile + ", " + |
| 500 |
"displayName = " + mDisplayName + ", " + |
| 501 |
"selfManaged = " + mSelfManaged + ", " + |
| 502 |
"forceConfirmation = " + mForceConfirmation + ", " + |
| 503 |
"packageName = " + mPackageName + ", " + |
| 504 |
"userId = " + mUserId + ", " + |
| 505 |
"deviceProfilePrivilegesDescription = " + mDeviceProfilePrivilegesDescription + ", " + |
| 506 |
"creationTime = " + mCreationTime + ", " + |
| 507 |
"skipPrompt = " + mSkipPrompt + |
| 508 |
" }"; |
| 509 |
} |
| 510 |
|
| 511 |
@Override |
| 512 |
@DataClass.Generated.Member |
| 513 |
public boolean equals(@Nullable Object o) { |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
if (this == o) return true; |
| 519 |
if (o == null || getClass() != o.getClass()) return false; |
| 520 |
@SuppressWarnings("unchecked") |
| 521 |
AssociationRequest that = (AssociationRequest) o; |
| 522 |
|
| 523 |
return true |
| 524 |
&& mSingleDevice == that.mSingleDevice |
| 525 |
&& Objects.equals(mDeviceFilters, that.mDeviceFilters) |
| 526 |
&& Objects.equals(mDeviceProfile, that.mDeviceProfile) |
| 527 |
&& Objects.equals(mDisplayName, that.mDisplayName) |
| 528 |
&& mSelfManaged == that.mSelfManaged |
| 529 |
&& mForceConfirmation == that.mForceConfirmation |
| 530 |
&& Objects.equals(mPackageName, that.mPackageName) |
| 531 |
&& mUserId == that.mUserId |
| 532 |
&& Objects.equals(mDeviceProfilePrivilegesDescription, that.mDeviceProfilePrivilegesDescription) |
| 533 |
&& mCreationTime == that.mCreationTime |
| 534 |
&& mSkipPrompt == that.mSkipPrompt; |
| 535 |
} |
| 536 |
|
| 537 |
@Override |
| 538 |
@DataClass.Generated.Member |
| 539 |
public int hashCode() { |
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
int _hash = 1; |
| 544 |
_hash = 31 * _hash + Boolean.hashCode(mSingleDevice); |
| 545 |
_hash = 31 * _hash + Objects.hashCode(mDeviceFilters); |
| 546 |
_hash = 31 * _hash + Objects.hashCode(mDeviceProfile); |
| 547 |
_hash = 31 * _hash + Objects.hashCode(mDisplayName); |
| 548 |
_hash = 31 * _hash + Boolean.hashCode(mSelfManaged); |
| 549 |
_hash = 31 * _hash + Boolean.hashCode(mForceConfirmation); |
| 550 |
_hash = 31 * _hash + Objects.hashCode(mPackageName); |
| 551 |
_hash = 31 * _hash + mUserId; |
| 552 |
_hash = 31 * _hash + Objects.hashCode(mDeviceProfilePrivilegesDescription); |
| 553 |
_hash = 31 * _hash + Long.hashCode(mCreationTime); |
| 554 |
_hash = 31 * _hash + Boolean.hashCode(mSkipPrompt); |
| 555 |
return _hash; |
| 556 |
} |
| 557 |
|
| 558 |
@Override |
| 559 |
@DataClass.Generated.Member |
| 560 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
int flg = 0; |
| 565 |
if (mSingleDevice) flg |= 0x1; |
| 566 |
if (mSelfManaged) flg |= 0x10; |
| 567 |
if (mForceConfirmation) flg |= 0x20; |
| 568 |
if (mSkipPrompt) flg |= 0x400; |
| 569 |
if (mDeviceProfile != null) flg |= 0x4; |
| 570 |
if (mDisplayName != null) flg |= 0x8; |
| 571 |
if (mPackageName != null) flg |= 0x40; |
| 572 |
if (mDeviceProfilePrivilegesDescription != null) flg |= 0x100; |
| 573 |
dest.writeInt(flg); |
| 574 |
dest.writeParcelableList(mDeviceFilters, flags); |
| 575 |
if (mDeviceProfile != null) dest.writeString(mDeviceProfile); |
| 576 |
if (mDisplayName != null) dest.writeCharSequence(mDisplayName); |
| 577 |
if (mPackageName != null) dest.writeString(mPackageName); |
| 578 |
dest.writeInt(mUserId); |
| 579 |
if (mDeviceProfilePrivilegesDescription != null) dest.writeString(mDeviceProfilePrivilegesDescription); |
| 580 |
dest.writeLong(mCreationTime); |
| 581 |
} |
| 582 |
|
| 583 |
@Override |
| 584 |
@DataClass.Generated.Member |
| 585 |
public int describeContents() { return 0; } |
| 586 |
|
| 587 |
|
| 588 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 589 |
@DataClass.Generated.Member |
| 590 |
AssociationRequest(@NonNull Parcel in) { |
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
int flg = in.readInt(); |
| 595 |
boolean singleDevice = (flg & 0x1) != 0; |
| 596 |
boolean selfManaged = (flg & 0x10) != 0; |
| 597 |
boolean forceConfirmation = (flg & 0x20) != 0; |
| 598 |
boolean skipPrompt = (flg & 0x400) != 0; |
| 599 |
List<DeviceFilter<?>> deviceFilters = new ArrayList<>(); |
| 600 |
in.readParcelableList(deviceFilters, DeviceFilter.class.getClassLoader(), (Class<android.companion.DeviceFilter<?>>) (Class<?>) android.companion.DeviceFilter.class); |
| 601 |
String deviceProfile = (flg & 0x4) == 0 ? null : in.readString(); |
| 602 |
CharSequence displayName = (flg & 0x8) == 0 ? null : (CharSequence) in.readCharSequence(); |
| 603 |
String packageName = (flg & 0x40) == 0 ? null : in.readString(); |
| 604 |
int userId = in.readInt(); |
| 605 |
String deviceProfilePrivilegesDescription = (flg & 0x100) == 0 ? null : in.readString(); |
| 606 |
long creationTime = in.readLong(); |
| 607 |
|
| 608 |
this.mSingleDevice = singleDevice; |
| 609 |
this.mDeviceFilters = deviceFilters; |
| 610 |
com.android.internal.util.AnnotationValidations.validate( |
| 611 |
NonNull.class, null, mDeviceFilters); |
| 612 |
this.mDeviceProfile = deviceProfile; |
| 613 |
com.android.internal.util.AnnotationValidations.validate( |
| 614 |
DeviceProfile.class, null, mDeviceProfile); |
| 615 |
this.mDisplayName = displayName; |
| 616 |
this.mSelfManaged = selfManaged; |
| 617 |
this.mForceConfirmation = forceConfirmation; |
| 618 |
this.mPackageName = packageName; |
| 619 |
this.mUserId = userId; |
| 620 |
com.android.internal.util.AnnotationValidations.validate( |
| 621 |
UserIdInt.class, null, mUserId); |
| 622 |
this.mDeviceProfilePrivilegesDescription = deviceProfilePrivilegesDescription; |
| 623 |
this.mCreationTime = creationTime; |
| 624 |
this.mSkipPrompt = skipPrompt; |
| 625 |
|
| 626 |
|
| 627 |
} |
| 628 |
|
| 629 |
@DataClass.Generated.Member |
| 630 |
public static final @NonNull Parcelable.Creator<AssociationRequest> CREATOR |
| 631 |
= new Parcelable.Creator<AssociationRequest>() { |
| 632 |
@Override |
| 633 |
public AssociationRequest[] newArray(int size) { |
| 634 |
return new AssociationRequest[size]; |
| 635 |
} |
| 636 |
|
| 637 |
@Override |
| 638 |
public AssociationRequest createFromParcel(@NonNull Parcel in) { |
| 639 |
return new AssociationRequest(in); |
| 640 |
} |
| 641 |
}; |
| 642 |
|
| 643 |
@DataClass.Generated( |
| 644 |
time = 1643238443303L, |
| 645 |
codegenVersion = "1.0.23", |
| 646 |
sourceFile = "frameworks/base/core/java/android/companion/AssociationRequest.java", |
| 647 |
inputSignatures = "public static final java.lang.String DEVICE_PROFILE_WATCH\npublic static final @android.annotation.RequiresPermission java.lang.String DEVICE_PROFILE_APP_STREAMING\npublic static final @android.annotation.RequiresPermission java.lang.String DEVICE_PROFILE_AUTOMOTIVE_PROJECTION\npublic static final @android.annotation.RequiresPermission java.lang.String DEVICE_PROFILE_COMPUTER\nprivate final boolean mSingleDevice\nprivate final @com.android.internal.util.DataClass.PluralOf(\"deviceFilter\") @android.annotation.NonNull java.util.List<android.companion.DeviceFilter<?>> mDeviceFilters\nprivate final @android.annotation.Nullable @android.companion.AssociationRequest.DeviceProfile java.lang.String mDeviceProfile\nprivate final @android.annotation.Nullable java.lang.CharSequence mDisplayName\nprivate final boolean mSelfManaged\nprivate final boolean mForceConfirmation\nprivate @android.annotation.Nullable java.lang.String mPackageName\nprivate @android.annotation.UserIdInt int mUserId\nprivate @android.annotation.Nullable java.lang.String mDeviceProfilePrivilegesDescription\nprivate final long mCreationTime\nprivate boolean mSkipPrompt\npublic @android.annotation.Nullable @android.companion.AssociationRequest.DeviceProfile java.lang.String getDeviceProfile()\npublic @android.annotation.Nullable java.lang.CharSequence getDisplayName()\npublic boolean isSelfManaged()\npublic boolean isForceConfirmation()\npublic boolean isSingleDevice()\npublic void setPackageName(java.lang.String)\npublic void setUserId(int)\npublic void setDeviceProfilePrivilegesDescription(java.lang.String)\npublic void setSkipPrompt(boolean)\npublic @android.annotation.NonNull @android.compat.annotation.UnsupportedAppUsage java.util.List<android.companion.DeviceFilter<?>> getDeviceFilters()\nclass AssociationRequest extends java.lang.Object implements [android.os.Parcelable]\nprivate boolean mSingleDevice\nprivate @android.annotation.Nullable java.util.ArrayList<android.companion.DeviceFilter<?>> mDeviceFilters\nprivate @android.annotation.Nullable java.lang.String mDeviceProfile\nprivate @android.annotation.Nullable java.lang.CharSequence mDisplayName\nprivate boolean mSelfManaged\nprivate boolean mForceConfirmation\npublic @android.annotation.NonNull android.companion.AssociationRequest.Builder setSingleDevice(boolean)\npublic @android.annotation.NonNull android.companion.AssociationRequest.Builder addDeviceFilter(android.companion.DeviceFilter<?>)\npublic @android.annotation.NonNull android.companion.AssociationRequest.Builder setDeviceProfile(java.lang.String)\npublic @android.annotation.NonNull android.companion.AssociationRequest.Builder setDisplayName(java.lang.CharSequence)\npublic @android.annotation.RequiresPermission @android.annotation.NonNull android.companion.AssociationRequest.Builder setSelfManaged(boolean)\npublic @android.annotation.RequiresPermission @android.annotation.NonNull android.companion.AssociationRequest.Builder setForceConfirmation(boolean)\npublic @android.annotation.NonNull @java.lang.Override android.companion.AssociationRequest build()\nclass Builder extends android.provider.OneTimeUseBuilder<android.companion.AssociationRequest> implements []\n@com.android.internal.util.DataClass(genConstructor=false, genToString=true, genEqualsHashCode=true, genHiddenGetters=true, genParcelable=true, genConstDefs=false)") |
| 648 |
@Deprecated |
| 649 |
private void __metadata() {} |
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
} |