Loading tests/UsbManagerTests/lib/src/com/android/server/usblib/UsbManagerTestLib.java +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ public class UsbManagerTestLib { testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM); } public void testSetCurrentFunctions_shouldMatched() { Loading @@ -125,5 +126,6 @@ public class UsbManagerTestLib { testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM); } } tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,14 @@ public class UsbHandlerTest { assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_RNDIS, 0); } @SmallTest @Test public void setFunctionsNcm() { mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS, UsbManager.FUNCTION_NCM)); assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_NCM, 0); } @SmallTest @Test public void setFunctionsNcmAndRndis() { Loading Loading
tests/UsbManagerTests/lib/src/com/android/server/usblib/UsbManagerTestLib.java +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ public class UsbManagerTestLib { testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS); testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM); } public void testSetCurrentFunctions_shouldMatched() { Loading @@ -125,5 +126,6 @@ public class UsbManagerTestLib { testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS); testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM); } }
tests/UsbTests/src/com/android/server/usb/UsbHandlerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,14 @@ public class UsbHandlerTest { assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_RNDIS, 0); } @SmallTest @Test public void setFunctionsNcm() { mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS, UsbManager.FUNCTION_NCM)); assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_NCM, 0); } @SmallTest @Test public void setFunctionsNcmAndRndis() { Loading