• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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.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  * A request for the user to select a companion device to associate with.
48  *
49  * You can optionally set {@link Builder#addDeviceFilter filters} for which devices to show to the
50  * user to select from.
51  * The exact type and fields of the filter you can set depend on the
52  * medium type. See {@link Builder}'s static factory methods for specific protocols that are
53  * supported.
54  *
55  * You can also set {@link Builder#setSingleDevice single device} to request a popup with single
56  * device to be shown instead of a list to choose from
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      * Device profile: watch.
68      *
69      * If specified, the current request may have a modified UI to highlight that the device being
70      * set up is a specific kind of device, and some extra permissions may be granted to the app
71      * as a result.
72      *
73      * Using it requires declaring uses-permission
74      * {@link android.Manifest.permission#REQUEST_COMPANION_PROFILE_WATCH} in the manifest.
75      *
76      * <a href="{@docRoot}about/versions/12/features#cdm-profiles">Learn more</a>
77      * about device profiles.
78      *
79      * @see AssociationRequest.Builder#setDeviceProfile
80      */
81     public static final String DEVICE_PROFILE_WATCH = "android.app.role.COMPANION_DEVICE_WATCH";
82 
83     /**
84      * Device profile: a virtual display capable of rendering Android applications, and sending back
85      * input events.
86      *
87      * Only applications that have been granted
88      * {@link android.Manifest.permission#REQUEST_COMPANION_PROFILE_APP_STREAMING} are allowed to
89      * request to be associated with such devices.
90      *
91      * @see AssociationRequest.Builder#setDeviceProfile
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      * Device profile: Android Automotive Projection
99      *
100      * Only applications that have been granted
101      * {@link android.Manifest.permission#REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION} are
102      * allowed to request to be associated with such devices.
103      *
104      * @see AssociationRequest.Builder#setDeviceProfile
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      * Device profile: Allows the companion app to access notification, recent photos and media for
112      * computer cross-device features.
113      *
114      * Only applications that have been granted
115      * {@link android.Manifest.permission#REQUEST_COMPANION_PROFILE_COMPUTER} are allowed to
116      * request to be associated with such devices.
117      *
118      * @see AssociationRequest.Builder#setDeviceProfile
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     /** @hide */
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      * Whether only a single device should match the provided filter.
132      *
133      * When scanning for a single device with a specific {@link BluetoothDeviceFilter} mac
134      * address, bonded devices are also searched among. This allows to obtain the necessary app
135      * privileges even if the device is already paired.
136      */
137     private final boolean mSingleDevice;
138 
139     /**
140      * If set, only devices matching either of the given filters will be shown to the user
141      */
142     @DataClass.PluralOf("deviceFilter")
143     private final @NonNull List<DeviceFilter<?>> mDeviceFilters;
144 
145     /**
146      * Profile of the device.
147      */
148     private final @Nullable @DeviceProfile String mDeviceProfile;
149 
150     /**
151      * The Display name of the device to be shown in the CDM confirmation UI. Must be non-null for
152      * "self-managed" association.
153      */
154     private final @Nullable CharSequence mDisplayName;
155 
156     /**
157      * Whether the association is to be managed by the companion application.
158      */
159     private final boolean mSelfManaged;
160 
161     /**
162      * Indicates that the application would prefer the CompanionDeviceManager to collect an explicit
163      * confirmation from the user before creating an association, even if such confirmation is not
164      * required.
165      */
166     private final boolean mForceConfirmation;
167 
168     /**
169      * The app package name of the application the association will belong to.
170      * Populated by the system.
171      * @hide
172      */
173     private @Nullable String mPackageName;
174 
175     /**
176      * The UserId of the user the association will belong to.
177      * Populated by the system.
178      * @hide
179      */
180     private @UserIdInt int mUserId;
181 
182     /**
183      * The user-readable description of the device profile's privileges.
184      * Populated by the system.
185      * @hide
186      */
187     private @Nullable String mDeviceProfilePrivilegesDescription;
188 
189     /**
190      * The time at which his request was created
191      * @hide
192      */
193     private final long mCreationTime;
194 
195     /**
196      * Whether the user-prompt may be skipped once the device is found.
197      * Populated by the system.
198      * @hide
199      */
200     private boolean mSkipPrompt;
201 
202     /**
203      * Creates a new AssociationRequest.
204      *
205      * @param singleDevice
206      *   Whether only a single device should match the provided filter.
207      *
208      *   When scanning for a single device with a specific {@link BluetoothDeviceFilter} mac
209      *   address, bonded devices are also searched among. This allows to obtain the necessary app
210      *   privileges even if the device is already paired.
211      * @param deviceFilters
212      *   If set, only devices matching either of the given filters will be shown to the user
213      * @param deviceProfile
214      *   Profile of the device.
215      * @param displayName
216      *   The Display name of the device to be shown in the CDM confirmation UI. Must be non-null for
217      *   "self-managed" association.
218      * @param selfManaged
219      *   Whether the association is to be managed by the companion application.
220      */
AssociationRequest( boolean singleDevice, @NonNull List<DeviceFilter<?>> deviceFilters, @Nullable @DeviceProfile String deviceProfile, @Nullable CharSequence displayName, boolean selfManaged, boolean forceConfirmation)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      * @return profile of the companion device.
240      */
getDeviceProfile()241     public @Nullable @DeviceProfile String getDeviceProfile() {
242         return mDeviceProfile;
243     }
244 
245     /**
246      * The Display name of the device to be shown in the CDM confirmation UI. Must be non-null for
247      * "self-managed" association.
248      */
getDisplayName()249     public @Nullable CharSequence getDisplayName() {
250         return mDisplayName;
251     }
252 
253     /**
254      * Whether the association is to be managed by the companion application.
255      *
256      * @see Builder#setSelfManaged(boolean)
257      */
isSelfManaged()258     public boolean isSelfManaged() {
259         return mSelfManaged;
260     }
261 
262     /**
263      * Indicates whether the application requires the {@link CompanionDeviceManager} service to
264      * collect an explicit confirmation from the user before creating an association, even if
265      * such confirmation is not required from the service's perspective.
266      *
267      * @see Builder#setForceConfirmation(boolean)
268      */
isForceConfirmation()269     public boolean isForceConfirmation() {
270         return mForceConfirmation;
271     }
272 
273     /**
274      * Whether only a single device should match the provided filter.
275      *
276      * When scanning for a single device with a specific {@link BluetoothDeviceFilter} mac
277      * address, bonded devices are also searched among. This allows to obtain the necessary app
278      * privileges even if the device is already paired.
279      */
isSingleDevice()280     public boolean isSingleDevice() {
281         return mSingleDevice;
282     }
283 
284     /** @hide */
setPackageName(@onNull String packageName)285     public void setPackageName(@NonNull String packageName) {
286         mPackageName = packageName;
287     }
288 
289     /** @hide */
setUserId(@serIdInt int userId)290     public void setUserId(@UserIdInt int userId) {
291         mUserId = userId;
292     }
293 
294     /** @hide */
setDeviceProfilePrivilegesDescription(@onNull String desc)295     public void setDeviceProfilePrivilegesDescription(@NonNull String desc) {
296         mDeviceProfilePrivilegesDescription = desc;
297     }
298 
299     /** @hide */
setSkipPrompt(boolean value)300     public void setSkipPrompt(boolean value) {
301         mSkipPrompt = value;
302     }
303 
304     /** @hide */
305     @NonNull
306     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
getDeviceFilters()307     public List<DeviceFilter<?>> getDeviceFilters() {
308         return mDeviceFilters;
309     }
310 
311     /**
312      * A builder for {@link AssociationRequest}
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 
Builder()322         public Builder() {}
323 
324         /**
325          * Whether only a single device should match the provided filter.
326          *
327          * When scanning for a single device with a specific {@link BluetoothDeviceFilter} mac
328          * address, bonded devices are also searched among. This allows to obtain the necessary app
329          * privileges even if the device is already paired.
330          *
331          * @param singleDevice if true, scanning for a device will stop as soon as at least one
332          *                     fitting device is found
333          */
334         @NonNull
setSingleDevice(boolean singleDevice)335         public Builder setSingleDevice(boolean singleDevice) {
336             checkNotUsed();
337             this.mSingleDevice = singleDevice;
338             return this;
339         }
340 
341         /**
342          * @param deviceFilter if set, only devices matching the given filter will be shown to the
343          *                     user
344          */
345         @NonNull
addDeviceFilter(@ullable DeviceFilter<?> deviceFilter)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          * If set, association will be requested as a corresponding kind of device
356          */
357         @NonNull
setDeviceProfile(@onNull @eviceProfile String deviceProfile)358         public Builder setDeviceProfile(@NonNull @DeviceProfile String deviceProfile) {
359             checkNotUsed();
360             mDeviceProfile = deviceProfile;
361             return this;
362         }
363 
364         /**
365          * Adds a display name.
366          * Generally {@link AssociationRequest}s are not required to provide a display name, except
367          * for request for creating "self-managed" associations, which MUST provide a display name.
368          *
369          * @param displayName the display name of the device.
370          */
371         @NonNull
setDisplayName(@onNull CharSequence displayName)372         public Builder setDisplayName(@NonNull CharSequence displayName) {
373             checkNotUsed();
374             mDisplayName = requireNonNull(displayName);
375             return this;
376         }
377 
378         /**
379          * Indicate whether the association would be managed by the companion application.
380          *
381          * Requests for creating "self-managed" association MUST provide a Display name.
382          *
383          * @see #setDisplayName(CharSequence)
384          */
385         @RequiresPermission(REQUEST_COMPANION_SELF_MANAGED)
386         @NonNull
setSelfManaged(boolean selfManaged)387         public Builder setSelfManaged(boolean selfManaged) {
388             checkNotUsed();
389             mSelfManaged = selfManaged;
390             return this;
391         }
392 
393         /**
394          * Indicates whether the application requires the {@link CompanionDeviceManager} service to
395          * collect an explicit confirmation from the user before creating an association, even if
396          * such confirmation is not required from the service's perspective.
397          */
398         @RequiresPermission(REQUEST_COMPANION_SELF_MANAGED)
399         @NonNull
setForceConfirmation(boolean forceConfirmation)400         public Builder setForceConfirmation(boolean forceConfirmation) {
401             checkNotUsed();
402             mForceConfirmation = forceConfirmation;
403             return this;
404         }
405 
406         /** @inheritDoc */
407         @NonNull
408         @Override
build()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     // Code below generated by codegen v1.0.23.
424     //
425     // DO NOT MODIFY!
426     // CHECKSTYLE:OFF Generated code
427     //
428     // To regenerate run:
429     // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/companion/AssociationRequest.java
430     //
431     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
432     //   Settings > Editor > Code Style > Formatter Control
433     //@formatter:off
434 
435 
436     /**
437      * The app package name of the application the association will belong to.
438      * Populated by the system.
439      *
440      * @hide
441      */
442     @DataClass.Generated.Member
getPackageName()443     public @Nullable String getPackageName() {
444         return mPackageName;
445     }
446 
447     /**
448      * The UserId of the user the association will belong to.
449      * Populated by the system.
450      *
451      * @hide
452      */
453     @DataClass.Generated.Member
getUserId()454     public @UserIdInt int getUserId() {
455         return mUserId;
456     }
457 
458     /**
459      * The user-readable description of the device profile's privileges.
460      * Populated by the system.
461      *
462      * @hide
463      */
464     @DataClass.Generated.Member
getDeviceProfilePrivilegesDescription()465     public @Nullable String getDeviceProfilePrivilegesDescription() {
466         return mDeviceProfilePrivilegesDescription;
467     }
468 
469     /**
470      * The time at which his request was created
471      *
472      * @hide
473      */
474     @DataClass.Generated.Member
getCreationTime()475     public long getCreationTime() {
476         return mCreationTime;
477     }
478 
479     /**
480      * Whether the user-prompt may be skipped once the device is found.
481      * Populated by the system.
482      *
483      * @hide
484      */
485     @DataClass.Generated.Member
isSkipPrompt()486     public boolean isSkipPrompt() {
487         return mSkipPrompt;
488     }
489 
490     @Override
491     @DataClass.Generated.Member
toString()492     public String toString() {
493         // You can override field toString logic by defining methods like:
494         // String fieldNameToString() { ... }
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
equals(@ullable Object o)513     public boolean equals(@Nullable Object o) {
514         // You can override field equality logic by defining either of the methods like:
515         // boolean fieldNameEquals(AssociationRequest other) { ... }
516         // boolean fieldNameEquals(FieldType otherValue) { ... }
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         //noinspection PointlessBooleanExpression
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
hashCode()539     public int hashCode() {
540         // You can override field hashCode logic by defining methods like:
541         // int fieldNameHashCode() { ... }
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
writeToParcel(@onNull Parcel dest, int flags)560     public void writeToParcel(@NonNull Parcel dest, int flags) {
561         // You can override field parcelling by defining methods like:
562         // void parcelFieldName(Parcel dest, int flags) { ... }
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
describeContents()585     public int describeContents() { return 0; }
586 
587     /** @hide */
588     @SuppressWarnings({"unchecked", "RedundantCast"})
589     @DataClass.Generated.Member
AssociationRequest(@onNull Parcel in)590     /* package-private */ AssociationRequest(@NonNull Parcel in) {
591         // You can override field unparcelling by defining methods like:
592         // static FieldType unparcelFieldName(Parcel in) { ... }
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         // onConstructed(); // You can define this method to get a callback
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
__metadata()649     private void __metadata() {}
650 
651 
652     //@formatter:on
653     // End of generated code
654 
655 }
656