Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
weliem committed Jan 21, 2022
1 parent 51d7c69 commit 550de09
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ private void cancelAllConnectionsWhenBluetoothOff() {
* Important note: When {@link BluetoothDevice#TRANSPORT_BREDR} is used by the central,
* only a single read request is issued by the central regardless of MTU size.
*/
private byte[] chopValue(final byte[] value, final int offset) {
private byte[] chopValue(@Nullable final byte[] value, final int offset) {
byte[] choppedValue = new byte[0];

if (value == null) return choppedValue;
Expand All @@ -751,14 +751,6 @@ private byte[] chopValue(final byte[] value, final int offset) {
return choppedValue;
}

private @NotNull byte[] copyOf(@NotNull final byte[] source, final int offset, final int maxSize) {
if (source.length > maxSize) {
final int chunkSize = Math.min(source.length - offset, maxSize);
return Arrays.copyOfRange(source, offset, offset + chunkSize);
}
return Arrays.copyOf(source, source.length);
}

/**
* Make a safe copy of a nullable byte array
*
Expand Down

0 comments on commit 550de09

Please sign in to comment.