Merge "Do not add 'adb' to persist.sys.usb.config if already there"
This commit is contained in:
commit
6106f320d3
1 changed files with 6 additions and 5 deletions
|
@ -37,11 +37,12 @@ def mangle_default_prop(prop):
|
|||
# (this is for userdebug builds)
|
||||
if prop.get("ro.debuggable") == "1":
|
||||
val = prop.get("persist.sys.usb.config")
|
||||
if val == "":
|
||||
val = "adb"
|
||||
else:
|
||||
val = val + ",adb"
|
||||
prop.put("persist.sys.usb.config", val)
|
||||
if "adb" not in val:
|
||||
if val == "":
|
||||
val = "adb"
|
||||
else:
|
||||
val = val + ",adb"
|
||||
prop.put("persist.sys.usb.config", val)
|
||||
# UsbDeviceManager expects a value here. If it doesn't get it, it will
|
||||
# default to "adb". That might not the right policy there, but it's better
|
||||
# to be explicit.
|
||||
|
|
Loading…
Reference in a new issue