Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull

Test: compilation
Bug: 115639878
Merged-In: I5f895d65a7036275ab0faa0afd2ee1eebc416476
Change-Id: I5f895d65a7036275ab0faa0afd2ee1eebc416476
This commit is contained in:
Jakub Pawlowski
2019-04-10 18:48:57 +02:00
parent 84f5f1b8c4
commit 64307cc0b2
2 changed files with 3 additions and 5 deletions

View File

@@ -8748,7 +8748,7 @@ package android.bluetooth.le {
method @Nullable public byte[] getManufacturerSpecificData(int);
method public java.util.Map<android.os.ParcelUuid,byte[]> getServiceData();
method @Nullable public byte[] getServiceData(android.os.ParcelUuid);
method @Nullable public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids();
method @NonNull public java.util.List<android.os.ParcelUuid> getServiceSolicitationUuids();
method public java.util.List<android.os.ParcelUuid> getServiceUuids();
method public int getTxPowerLevel();
}

View File

@@ -16,6 +16,7 @@
package android.bluetooth.le;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.bluetooth.BluetoothUuid;
@@ -97,7 +98,7 @@ public final class ScanRecord {
* Returns a list of service solicitation UUIDs within the advertisement that are used to
* identify the Bluetooth GATT services.
*/
@Nullable
@NonNull
public List<ParcelUuid> getServiceSolicitationUuids() {
return mServiceSolicitationUuids;
}
@@ -297,9 +298,6 @@ public final class ScanRecord {
if (serviceUuids.isEmpty()) {
serviceUuids = null;
}
if (serviceSolicitationUuids.isEmpty()) {
serviceSolicitationUuids = null;
}
return new ScanRecord(serviceUuids, serviceSolicitationUuids, manufacturerData,
serviceData, advertiseFlag, txPowerLevel, localName, scanRecord);
} catch (Exception e) {