From 162ea0e9e8f3c293b7572bfff2671a5af5244032 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Fri, 28 Mar 2014 13:41:28 +0000 Subject: Remove global variables from ProcessState. These weren't really being used and they make it very hard to reason about who looks at command line arguments. Processes started via app_process (this includes all zygote forks and the system_server) can get information about command line arguments from the AndroidRuntime class, which is available via a call to AndroidRuntime::getRuntime. bug: 13647418 Change-Id: I6f92680c3619a68c6d4b0995db4cdc9adc788e36 --- libs/binder/ProcessState.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 19ed047365..303d6cf3a2 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -48,11 +48,6 @@ namespace android { -// Global variables -int mArgC; -const char* const* mArgV; -int mArgLen; - class PoolThread : public Thread { public: @@ -280,36 +275,6 @@ void ProcessState::expungeHandle(int32_t handle, IBinder* binder) if (e && e->binder == binder) e->binder = NULL; } -void ProcessState::setArgs(int argc, const char* const argv[]) -{ - mArgC = argc; - mArgV = (const char **)argv; - - mArgLen = 0; - for (int i=0; i