Merge "Check usb functions support with USB Gadget Hal version" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bbf0d29880
@@ -2139,6 +2139,12 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
|
||||
Slog.d(TAG, "setEnabledFunctions functions=" + functions + ", "
|
||||
+ "forceRestart=" + forceRestart);
|
||||
}
|
||||
if (mCurrentGadgetHalVersion < UsbManager.GADGET_HAL_V1_2) {
|
||||
if ((functions & UsbManager.FUNCTION_NCM) != 0) {
|
||||
Slog.e(TAG, "Could not set unsupported function for the GadgetHal");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (mCurrentFunctions != functions
|
||||
|| !mCurrentFunctionsApplied
|
||||
|| forceRestart) {
|
||||
|
||||
Reference in New Issue
Block a user