Replace .toList() with .collect()
.toList() was only introduced to android in api level 34, which is newer than this module's min_sdk_version. Replace it with .collect(). This was found while updating android lint. Flag: EXEMPT refactor Bug: 394096385 Test: Presubmits Change-Id: I472bff7749aebb21bd8681ecf4235ce7a6cfc7de
This commit is contained in:
parent
0bcb13f41c
commit
725078a6bd
1 changed files with 2 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ import java.util.Objects;
|
|||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* This class provides a way to perform Nearby related operations such as scanning, broadcasting
|
||||
|
|
@ -503,7 +504,7 @@ public class NearbyManager {
|
|||
PoweredOffFindingEphemeralId ephemeralId = new PoweredOffFindingEphemeralId();
|
||||
ephemeralId.bytes = eid;
|
||||
return ephemeralId;
|
||||
}).toList();
|
||||
}).collect(Collectors.toUnmodifiableList());
|
||||
try {
|
||||
mService.setPoweredOffFindingEphemeralIds(ephemeralIdList);
|
||||
} catch (RemoteException e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue