usb: Add dm condition in NCM am: 48b3e5de64

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/16334651

Change-Id: I3f2feae311bc65ed245eb00be7761b12d1f52b2a
This commit is contained in:
Ricky Niu 2021-11-26 08:35:10 +00:00 committed by Automerger Merge Worker
commit ac257ea3eb

View file

@ -228,9 +228,13 @@ static V1_0::Status validateAndSetVidPid(uint64_t functions) {
ret = setVidPid("0x18d1", "0x4eeb");
break;
case GadgetFunction::ADB | GadgetFunction::NCM:
if (vendorFunctions == "dm") {
ret = setVidPid("0x04e8", "0x6862");
} else {
if (!(vendorFunctions == "user" || vendorFunctions == ""))
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
ret = setVidPid("0x18d1", "0x4eec");
}
break;
default:
ALOGE("Combination not supported");