Merge "Add nullability annotations to android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid"
This commit is contained in:
@@ -8734,8 +8734,8 @@ package android.bluetooth.le {
|
|||||||
method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]);
|
method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]);
|
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]);
|
method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(android.os.ParcelUuid);
|
method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(android.os.ParcelUuid, android.os.ParcelUuid);
|
method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid, @Nullable android.os.ParcelUuid);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid);
|
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid);
|
||||||
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
|
method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package android.bluetooth.le;
|
package android.bluetooth.le;
|
||||||
|
|
||||||
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
@@ -586,7 +587,8 @@ public final class ScanFilter implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Set filter on service solicitation uuid.
|
* Set filter on service solicitation uuid.
|
||||||
*/
|
*/
|
||||||
public Builder setServiceSolicitationUuid(ParcelUuid serviceSolicitationUuid) {
|
public @NonNull Builder setServiceSolicitationUuid(
|
||||||
|
@Nullable ParcelUuid serviceSolicitationUuid) {
|
||||||
mServiceSolicitationUuid = serviceSolicitationUuid;
|
mServiceSolicitationUuid = serviceSolicitationUuid;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -601,8 +603,9 @@ public final class ScanFilter implements Parcelable {
|
|||||||
* @throws IllegalArgumentException If {@code serviceSolicitationUuid} is {@code null} but
|
* @throws IllegalArgumentException If {@code serviceSolicitationUuid} is {@code null} but
|
||||||
* {@code serviceSolicitationUuidMask} is not {@code null}.
|
* {@code serviceSolicitationUuidMask} is not {@code null}.
|
||||||
*/
|
*/
|
||||||
public Builder setServiceSolicitationUuid(ParcelUuid serviceSolicitationUuid,
|
public @NonNull Builder setServiceSolicitationUuid(
|
||||||
ParcelUuid solicitationUuidMask) {
|
@Nullable ParcelUuid serviceSolicitationUuid,
|
||||||
|
@Nullable ParcelUuid solicitationUuidMask) {
|
||||||
if (mServiceSolicitationUuidMask != null && mServiceSolicitationUuid == null) {
|
if (mServiceSolicitationUuidMask != null && mServiceSolicitationUuid == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"SolicitationUuid is null while SolicitationUuidMask is not null!");
|
"SolicitationUuid is null while SolicitationUuidMask is not null!");
|
||||||
|
|||||||
Reference in New Issue
Block a user