Set argv[0] from the main thread of an app, not a random binder thread

Change-Id: Ibf6e51b7975cdb5e6aa97591a571c599ecf84020
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5f2de0f..daf4090 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1447,7 +1447,6 @@
                 Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher,
                 int debugMode, boolean isRestrictedBackupMode, Configuration config,
                 Map<String, IBinder> services) {
-            Process.setArgV0(processName);
 
             if (services != null) {
                 // Setup the service cache in the ServiceManager
@@ -3818,6 +3817,7 @@
         //Process.setUid(data.appInfo.uid);
 
         // send up app name; do this *before* waiting for debugger
+        Process.setArgV0(data.processName);
         android.ddm.DdmHandleAppName.setAppName(data.processName);
 
         /*