Add support for verifying OEM properties.

A separate OEM file must be specified to provide the expected
values for these properties.  The list of properties comes from
the "oem_fingerprint_properties" list in misc_info.txt

Bug: b/13367676

Change-Id: I1a3eaf108492132cf6f595a5d1c9f7e0c3cb3142
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 3d8d5ff..fea335e 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -99,14 +99,9 @@
       except IOError, e:
         if e.errno == errno.ENOENT:
           raise KeyError(fn)
-
   d = {}
   try:
-    for line in read_helper("META/misc_info.txt").split("\n"):
-      line = line.strip()
-      if not line or line.startswith("#"): continue
-      k, v = line.split("=", 1)
-      d[k] = v
+    d = LoadDictionaryFromLines(read_helper("META/misc_info.txt").split("\n"))
   except KeyError:
     # ok if misc_info.txt doesn't exist
     pass
@@ -174,9 +169,11 @@
   except KeyError:
     print "Warning: could not find SYSTEM/build.prop in %s" % zip
     data = ""
+  return LoadDictionaryFromLines(data.split("\n"))
 
+def LoadDictionaryFromLines(lines):
   d = {}
-  for line in data.split("\n"):
+  for line in lines:
     line = line.strip()
     if not line or line.startswith("#"): continue
     if "=" in line: