Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ public Response execute(DvbDevice dvbDevice, long... payload) throws DvbExceptio
(long) dvbDevice.getDeviceFilter().getProductId() // parameter 6
);
}
}),
REQ_DISABLE_PID_FILTER(new Executor() {
@Override
public Response execute(DvbDevice dvbDevice, long... payload) throws DvbException {
dvbDevice.disablePidFilter();
return Response.SUCCESS;
}
});

private final static String TAG = Request.class.getSimpleName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ public void testGetCapabilities() throws Exception {
assertThat(response[6], is(0x2838L)); // USB product id
}

@Test
public void testDisablePidFilter() throws Exception {
long[] response = getRawResponse(6);

assertThat(response.length, is(1));
assertThat(response[0], is(1L)); // success

// verify hardware was called
verify(dvbDevice).disablePidFilter();
}

/** Helper to do serialization/deserialization to bytes */
private long[] getRawResponse(int requestOrdinal, long ... reqArgs) {
try {
Expand Down