Skip to content
Commit 79c9c9e3 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Allow RNDIS and NCM to be enabled at the same time.

Currently, UsbManager#setCurrentFunctions takes a bitmask of
functions to enable, but will only allow callers to enable one
function at a time.

Allow it to enable both RNDIS and NCM together as well. This is
because from the user's point of view the two functions are the
same (i.e., USB tethering).

Android has historically used RNDIS for tethering. NCM performs
better, but it doesn't work on older OSes like Windows 8.1.

Also change the import order to keep the linter happy.

Bug: 172793258
Test: added unit test for UsbManager.areSettableFunctions
Change-Id: I51b6752781528b09f8929e1fb3b1fa7e4ac36aae
parent 94f23cd4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment