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

Commit 4c88a8c6 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Zygote: Allow arbitrary-length wrap property names

The restriction on system property key length has been lifted.
Update the invoke-with code to first check the full-length property.
Then fall back to the truncated version for backwards-compatibility.

Test: m
Test: manual with long package name (Maps)
Change-Id: I9f714af093a6017307cfef18c84de769f0de7c3e
parent 73818566
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -717,14 +717,6 @@ class ZygoteConnection {
    public static void applyInvokeWithSystemProperty(Arguments args) {
        if (args.invokeWith == null && args.niceName != null) {
            String property = "wrap." + args.niceName;
            if (property.length() > 31) {
                // Properties with a trailing "." are illegal.
                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) {
                args.invokeWith = null;