Have setRemoteAddress accept a Nullable remoteAddress
Per API council feedback. Bug: 388438641 Test: TH Change-Id: Iba71c4944ebbd91df5fdbb3605fc9edcc2139af5
This commit is contained in:
parent
ab1cb2a80d
commit
c7e388423a
2 changed files with 3 additions and 4 deletions
|
|
@ -255,7 +255,7 @@ package android.net {
|
|||
method @NonNull public android.net.L2capNetworkSpecifier build();
|
||||
method @NonNull public android.net.L2capNetworkSpecifier.Builder setHeaderCompression(int);
|
||||
method @NonNull public android.net.L2capNetworkSpecifier.Builder setPsm(int);
|
||||
method @NonNull public android.net.L2capNetworkSpecifier.Builder setRemoteAddress(@NonNull android.net.MacAddress);
|
||||
method @NonNull public android.net.L2capNetworkSpecifier.Builder setRemoteAddress(@Nullable android.net.MacAddress);
|
||||
method @NonNull public android.net.L2capNetworkSpecifier.Builder setRole(int);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,11 +178,10 @@ public final class L2capNetworkSpecifier extends NetworkSpecifier implements Par
|
|||
*
|
||||
* Only valid for client networks. A null MacAddress matches *any* MacAddress.
|
||||
*
|
||||
* @param remoteAddress the MAC address to connect to.
|
||||
* @param remoteAddress the MAC address to connect to, or null to match any MAC address.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setRemoteAddress(@NonNull MacAddress remoteAddress) {
|
||||
Objects.requireNonNull(remoteAddress);
|
||||
public Builder setRemoteAddress(@Nullable MacAddress remoteAddress) {
|
||||
mRemoteAddress = remoteAddress;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue