diff options
author | Narayan Kamath <narayan@google.com> | 2014-03-28 13:41:28 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-04-03 12:29:44 +0000 |
commit | 162ea0e9e8f3c293b7572bfff2671a5af5244032 (patch) | |
tree | ca27f1f3c91592ccb523efc3ea576089a16930ed /libs | |
parent | b1a8c016371282a3cd3b113e6b2c0310372babf2 (diff) | |
download | frameworks_native-162ea0e9e8f3c293b7572bfff2671a5af5244032.zip frameworks_native-162ea0e9e8f3c293b7572bfff2671a5af5244032.tar.gz frameworks_native-162ea0e9e8f3c293b7572bfff2671a5af5244032.tar.bz2 |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/ProcessState.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 19ed047..303d6cf 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<argc; i++) { - mArgLen += strlen(argv[i]) + 1; - } - mArgLen--; -} - -int ProcessState::getArgC() const -{ - return mArgC; -} - -const char* const* ProcessState::getArgV() const -{ - return mArgV; -} - -void ProcessState::setArgV0(const char* txt) -{ - if (mArgV != NULL) { - strncpy((char*)mArgV[0], txt, mArgLen); - set_process_name(txt); - } -} - String8 ProcessState::makeBinderThreadName() { int32_t s = android_atomic_add(1, &mThreadPoolSeq); String8 name; |