usb: Add dm condition in NCM am: 7d413565cd

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

Change-Id: Id847e39c485697dc2fc2eb170e6750c10933e529
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ricky Niu 2022-03-25 10:52:34 +00:00 committed by Automerger Merge Worker
commit 721ca06044

View file

@ -270,9 +270,13 @@ static V1_0::Status validateAndSetVidPid(uint64_t functions) {
ret = setVidPid("0x18d1", "0x4eeb");
break;
case GadgetFunction::ADB | GadgetFunction::NCM:
if (!(vendorFunctions == "user" || vendorFunctions == ""))
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
ret = setVidPid("0x18d1", "0x4eec");
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");