diff options
author | Christopher Ferris <cferris@google.com> | 2015-01-28 17:56:32 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2015-01-29 15:54:40 -0800 |
commit | 95b1048d390e79029978efd4654c05816722e17f (patch) | |
tree | 1bba82a9b58c83dabc4eaed7e4e19540ebaf66f8 /core/java/com | |
parent | d24047dcfed3fb7c913a0a5950c9f48ce3d49b9e (diff) | |
download | frameworks_base-95b1048d390e79029978efd4654c05816722e17f.zip frameworks_base-95b1048d390e79029978efd4654c05816722e17f.tar.gz frameworks_base-95b1048d390e79029978efd4654c05816722e17f.tar.bz2 |
Fix wrap property creation when truncating.
If a property name gets truncated, make sure it doesn't end in a '.'
since that makes the name illegal.
Bug: 19196358
Bug: https://code.google.com/p/android/issues/detail?id=82947
(cherry picked from commit e32df45fe1a8cb7286bfdad392a0d36e0ddcf8e7)
Change-Id: I126a40ffae76ee6a06926e770ca015fb063a334b
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/os/ZygoteConnection.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java index 2ef8a20..4548221 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -842,7 +842,12 @@ class ZygoteConnection { if (args.niceName != null) { String property = "wrap." + args.niceName; if (property.length() > 31) { - property = property.substring(0, 31); + // Avoid creating an illegal property name when truncating. + if (property.charAt(30) != '.') { + property = property.substring(0, 31); + } else { + property = property.substring(0, 30); + } } args.invokeWith = SystemProperties.get(property); if (args.invokeWith != null && args.invokeWith.length() == 0) { |