summaryrefslogtreecommitdiffstats
path: root/tools/post_process_props.py
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2012-05-02 14:36:57 -0700
committerJoe Onorato <joeo@google.com>2012-05-02 14:36:57 -0700
commit8ad4bb16a0d8b8ff9b4d17e860db336111bef34d (patch)
tree4c7c533419b2f20324443ad670c126bbdd55ac3a /tools/post_process_props.py
parentac2c989e8492a733bdd3d4c7e1bedd5210c56c8d (diff)
downloadbuild-8ad4bb16a0d8b8ff9b4d17e860db336111bef34d.zip
build-8ad4bb16a0d8b8ff9b4d17e860db336111bef34d.tar.gz
build-8ad4bb16a0d8b8ff9b4d17e860db336111bef34d.tar.bz2
Turn off adb on user builds.
Tungsten is the first device we have done since post_process_props.py and UsbDeviceManager were added that by default has no services running on usb. Everything else has mtp. This makes it so we always populate the property with something. Change-Id: Ic24f52462ed8866e87499c715dd21937e5b1128d
Diffstat (limited to 'tools/post_process_props.py')
-rwxr-xr-xtools/post_process_props.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 01f9128..9d69736 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -21,7 +21,6 @@ import sys
def mangle_build_prop(prop):
pass
-
# Put the modifications that you need to make into the /system/build.prop into this
# function. The prop object has get(name) and put(name,value) methods.
def mangle_default_prop(prop):
@@ -34,7 +33,11 @@ def mangle_default_prop(prop):
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.
+ if not prop.get("persist.sys.usb.config"):
+ prop.put("persist.sys.usb.config", "none");
class PropFile:
def __init__(self, lines):