Loading core/java/android/companion/AssociationInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ public final class AssociationInfo implements Parcelable { /** * Get the device icon of the associated device. The device icon represents the device type. * * @return the device icon, or {@code null} if no device icon is has been set for the * @return the device icon, or {@code null} if no device icon has been set for the * associated device. * * @see AssociationRequest.Builder#setDeviceIcon(Icon) Loading core/java/android/companion/AssociationRequest.java +2 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,8 @@ public final class AssociationRequest implements Parcelable { } /** * Set the device icon for the self-managed device and this icon will be * displayed in the self-managed association dialog. * Set the device icon for the self-managed device and to display the icon in the * self-managed association dialog. * * @throws IllegalArgumentException if the icon is not exactly 24dp by 24dp * or if it is {@link Icon#TYPE_URI} or {@link Icon#TYPE_URI_ADAPTIVE_BITMAP}. Loading core/java/android/companion/CompanionDeviceManager.java +15 −4 Original line number Diff line number Diff line Loading @@ -478,6 +478,15 @@ public final class CompanionDeviceManager { Objects.requireNonNull(callback, "Callback cannot be null"); handler = Handler.mainIfNull(handler); if (Flags.associationDeviceIcon()) { final Icon deviceIcon = request.getDeviceIcon(); if (deviceIcon != null && !isValidIcon(deviceIcon, mContext)) { throw new IllegalArgumentException("The size of the device icon must be " + "24dp x 24dp to ensure proper display"); } } try { mService.associate(request, new AssociationRequestCallbackProxy(handler, callback), mContext.getOpPackageName(), mContext.getUserId()); Loading Loading @@ -542,11 +551,13 @@ public final class CompanionDeviceManager { Objects.requireNonNull(executor, "Executor cannot be null"); Objects.requireNonNull(callback, "Callback cannot be null"); if (Flags.associationDeviceIcon()) { final Icon deviceIcon = request.getDeviceIcon(); if (deviceIcon != null && !isValidIcon(deviceIcon, mContext)) { throw new IllegalArgumentException("The size of the device icon must be 24dp x 24dp to" + "ensure proper display"); throw new IllegalArgumentException("The size of the device icon must be " + "24dp x 24dp to ensure proper display"); } } try { Loading Loading
core/java/android/companion/AssociationInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ public final class AssociationInfo implements Parcelable { /** * Get the device icon of the associated device. The device icon represents the device type. * * @return the device icon, or {@code null} if no device icon is has been set for the * @return the device icon, or {@code null} if no device icon has been set for the * associated device. * * @see AssociationRequest.Builder#setDeviceIcon(Icon) Loading
core/java/android/companion/AssociationRequest.java +2 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,8 @@ public final class AssociationRequest implements Parcelable { } /** * Set the device icon for the self-managed device and this icon will be * displayed in the self-managed association dialog. * Set the device icon for the self-managed device and to display the icon in the * self-managed association dialog. * * @throws IllegalArgumentException if the icon is not exactly 24dp by 24dp * or if it is {@link Icon#TYPE_URI} or {@link Icon#TYPE_URI_ADAPTIVE_BITMAP}. Loading
core/java/android/companion/CompanionDeviceManager.java +15 −4 Original line number Diff line number Diff line Loading @@ -478,6 +478,15 @@ public final class CompanionDeviceManager { Objects.requireNonNull(callback, "Callback cannot be null"); handler = Handler.mainIfNull(handler); if (Flags.associationDeviceIcon()) { final Icon deviceIcon = request.getDeviceIcon(); if (deviceIcon != null && !isValidIcon(deviceIcon, mContext)) { throw new IllegalArgumentException("The size of the device icon must be " + "24dp x 24dp to ensure proper display"); } } try { mService.associate(request, new AssociationRequestCallbackProxy(handler, callback), mContext.getOpPackageName(), mContext.getUserId()); Loading Loading @@ -542,11 +551,13 @@ public final class CompanionDeviceManager { Objects.requireNonNull(executor, "Executor cannot be null"); Objects.requireNonNull(callback, "Callback cannot be null"); if (Flags.associationDeviceIcon()) { final Icon deviceIcon = request.getDeviceIcon(); if (deviceIcon != null && !isValidIcon(deviceIcon, mContext)) { throw new IllegalArgumentException("The size of the device icon must be 24dp x 24dp to" + "ensure proper display"); throw new IllegalArgumentException("The size of the device icon must be " + "24dp x 24dp to ensure proper display"); } } try { Loading