diff options
author | Christopher Ferris <cferris@google.com> | 2015-01-28 17:56:32 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2015-01-29 12:20:06 -0800 |
commit | e32df45fe1a8cb7286bfdad392a0d36e0ddcf8e7 (patch) | |
tree | f280fe63b54d7fd14428640c26d3405ec304202e /core/java/com | |
parent | 106da5bf80d182a2e6fd346e1836ae4fc0ba1d92 (diff) | |
download | frameworks_base-e32df45fe1a8cb7286bfdad392a0d36e0ddcf8e7.zip frameworks_base-e32df45fe1a8cb7286bfdad392a0d36e0ddcf8e7.tar.gz frameworks_base-e32df45fe1a8cb7286bfdad392a0d36e0ddcf8e7.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
Change-Id: Icc1a26593237ca19ad0ebd776a60b3d6290bb355
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 aba4bd0..0eb52cb 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -800,7 +800,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) { |