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

Commit c2a1b3f4 authored by Christian Wailes's avatar Christian Wailes Committed by Android (Google) Code Review
Browse files

Merge "Change USAP name to application name as soon as possible."

parents a8cb6e11 6d00c1ab
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -549,6 +549,8 @@ public final class Zygote {
            }
        }

        setAppProcessName(args, "USAP");

        applyUidSecurityPolicy(args, peerCredentials);
        applyDebuggerSystemProperty(args);

@@ -613,10 +615,6 @@ public final class Zygote {

        disableExecuteOnly(args.mTargetSdkVersion);

        if (args.mNiceName != null) {
            Process.setArgV0(args.mNiceName);
        }

        // End of the postFork event.
        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);

@@ -625,6 +623,16 @@ public final class Zygote {
                                     null /* classLoader */);
    }

    static void setAppProcessName(ZygoteArguments args, String loggingTag) {
        if (args.mNiceName != null) {
            Process.setArgV0(args.mNiceName);
        } else if (args.mPackageName != null) {
            Process.setArgV0(args.mPackageName);
        } else {
            Log.w(loggingTag, "Unable to set package name.");
        }
    }

    private static final String USAP_ERROR_PREFIX = "Invalid command to USAP: ";

    /**
+1 −3
Original line number Diff line number Diff line
@@ -573,9 +573,7 @@ class ZygoteConnection {
            }
        }

        if (parsedArgs.mNiceName != null) {
            Process.setArgV0(parsedArgs.mNiceName);
        }
        Zygote.setAppProcessName(parsedArgs, TAG);

        // End of the postFork event.
        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);