Snap for 8458224 from 5ebcf15700
to tm-qpr1-release
Change-Id: I7aa681dcdeeb648c12c00fa23476604b784bf844
This commit is contained in:
commit
a099a3227c
3 changed files with 8 additions and 27 deletions
|
@ -577,10 +577,6 @@ void DumpstateDevice::dumpTouchSection(int fd) {
|
||||||
snprintf(cmd, sizeof(cmd), "%s/selftest/Short", focaltech_cmd_path);
|
snprintf(cmd, sizeof(cmd), "%s/selftest/Short", focaltech_cmd_path);
|
||||||
DumpFileToFd(fd, "Get Short Test", cmd);
|
DumpFileToFd(fd, "Get Short Test", cmd);
|
||||||
|
|
||||||
// Get HeatMap(ms,ss)
|
|
||||||
snprintf(cmd, sizeof(cmd), "%s/selftest/Strength", focaltech_cmd_path);
|
|
||||||
DumpFileToFd(fd, "Get HeatMap(ms,ss)", cmd);
|
|
||||||
|
|
||||||
// Disable: force touch active
|
// Disable: force touch active
|
||||||
snprintf(cmd, sizeof(cmd), "echo 20 > %s/force_active", focaltech_cmd_path);
|
snprintf(cmd, sizeof(cmd), "echo 20 > %s/force_active", focaltech_cmd_path);
|
||||||
RunCommandToFd(fd, "Disable Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
RunCommandToFd(fd, "Disable Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
|
||||||
|
|
Binary file not shown.
|
@ -165,7 +165,6 @@ static V1_0::Status validateAndSetVidPid(uint64_t functions) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case static_cast<uint64_t>(GadgetFunction::RNDIS):
|
case static_cast<uint64_t>(GadgetFunction::RNDIS):
|
||||||
case GadgetFunction::RNDIS | GadgetFunction::NCM:
|
|
||||||
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
|
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
|
||||||
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
|
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
|
||||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||||
|
@ -174,7 +173,6 @@ static V1_0::Status validateAndSetVidPid(uint64_t functions) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GadgetFunction::ADB | GadgetFunction::RNDIS:
|
case GadgetFunction::ADB | GadgetFunction::RNDIS:
|
||||||
case GadgetFunction::ADB | GadgetFunction::RNDIS | GadgetFunction::NCM:
|
|
||||||
if (vendorFunctions == "dm") {
|
if (vendorFunctions == "dm") {
|
||||||
ret = setVidPid("0x04e8", "0x6862");
|
ret = setVidPid("0x04e8", "0x6862");
|
||||||
} else {
|
} else {
|
||||||
|
@ -309,30 +307,20 @@ V1_0::Status UsbGadget::setupFunctions(uint64_t functions,
|
||||||
bool ffsEnabled = false;
|
bool ffsEnabled = false;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// Use the NCM support hack because the gadget function has no NCM definition.
|
if (addGenericAndroidFunctions(&monitorFfs, functions, &ffsEnabled, &i) !=
|
||||||
// TODO: add formal NCM function setup once gadget function supports NCM.
|
|
||||||
uint64_t usbFunctions = functions;
|
|
||||||
bool ncmEnabled = false;
|
|
||||||
const std::string vendorRndisConfig = GetProperty(google::pixel::usb::kVendorRndisConfig, "");
|
|
||||||
if ((functions & GadgetFunction::RNDIS) && (vendorRndisConfig.find("ncm.gs", 0) == 0)) {
|
|
||||||
ncmEnabled = true;
|
|
||||||
usbFunctions &= ~static_cast<uint64_t>(GadgetFunction::RNDIS);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addGenericAndroidFunctions(&monitorFfs, usbFunctions, &ffsEnabled, &i) !=
|
|
||||||
Status::SUCCESS)
|
Status::SUCCESS)
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
|
|
||||||
if ((functions & GadgetFunction::NCM) != 0) {
|
std::string vendorFunctions = getVendorFunctions();
|
||||||
|
|
||||||
|
if (((functions & GadgetFunction::NCM) != 0) && (vendorFunctions != "dm")) {
|
||||||
if (linkFunction("ncm.gs9", i++))
|
if (linkFunction("ncm.gs9", i++))
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string vendorFunctions = getVendorFunctions();
|
|
||||||
|
|
||||||
if (vendorFunctions == "dm") {
|
if (vendorFunctions == "dm") {
|
||||||
ALOGI("enable usbradio debug functions");
|
ALOGI("enable usbradio debug functions");
|
||||||
if ((usbFunctions & GadgetFunction::RNDIS) != 0) {
|
if ((functions & GadgetFunction::RNDIS) != 0) {
|
||||||
if (linkFunction("acm.gs6", i++))
|
if (linkFunction("acm.gs6", i++))
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
if (linkFunction("dm.gs7", i++))
|
if (linkFunction("dm.gs7", i++))
|
||||||
|
@ -353,17 +341,14 @@ V1_0::Status UsbGadget::setupFunctions(uint64_t functions,
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((usbFunctions & GadgetFunction::ADB) != 0) {
|
if ((functions & GadgetFunction::ADB) != 0) {
|
||||||
ffsEnabled = true;
|
ffsEnabled = true;
|
||||||
if (addAdb(&monitorFfs, &i) != Status::SUCCESS)
|
if (addAdb(&monitorFfs, &i) != Status::SUCCESS)
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reordering NCM function makes Windows generic NCM driver work when vendor funcs are enabled.
|
if (((functions & GadgetFunction::NCM) != 0) && (vendorFunctions == "dm")) {
|
||||||
// TODO: possibly remove the reordering once vendor function Windows driver supports NCM.
|
if (linkFunction("ncm.gs9", i++))
|
||||||
if (ncmEnabled) {
|
|
||||||
ALOGI("set ncm function");
|
|
||||||
if (linkFunction(vendorRndisConfig.c_str(), i++))
|
|
||||||
return Status::ERROR;
|
return Status::ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue