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

Commit 95b1048d 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

(cherry picked from commit e32df45f)

Change-Id: I126a40ffae76ee6a06926e770ca015fb063a334b
parent d24047dc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -842,7 +842,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) {