/system/core/init/property_service.cpp
745static void update_sys_usb_config() { 746 bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false); 747 std::string config = android::base::GetProperty("persist.sys.usb.config", ""); 748 // b/150130503, add (config == "none") condition here to prevent appending 749 // ",adb" if "none" is explicitly defined in default prop. 750 if (config.empty() || config == "none") { 751 InitPropertySet("persist.sys.usb.config", is_debuggable ? "adb" : "none"); 752 } else if (is_debuggable && config.find("adb") == std::string::npos && 753 config.length() + 4 < PROP_VALUE_MAX) { 754 config.append(",adb"); 755 InitPropertySet("persist.sys.usb.config", config); 756 } 757}