Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e32df45f authored by Christopher Ferris's avatar Christopher Ferris
Browse files

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
parent 106da5bf
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -800,7 +800,12 @@ class ZygoteConnection {
            if (args.niceName != null) {
                String property = "wrap." + args.niceName;
                if (property.length() > 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) {