diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-09-01 19:15:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-09-01 19:15:39 +0000 |
commit | 280af8eb1676293a2afe063add6f83b2a05ba975 (patch) | |
tree | 2598763b40db6ef3b11ec3c386adb4d2110a0020 | |
parent | 022564e3e74bbb58e61be2700d5aba6634fec5fe (diff) | |
parent | 6109662d0f0ae9c2d7f40ea36a04f695d59544ab (diff) | |
download | native-280af8eb1676293a2afe063add6f83b2a05ba975.tar.gz |
Merge "libbinder: remove unused context variables"
-rw-r--r-- | cmds/servicemanager/main.cpp | 2 | ||||
-rw-r--r-- | libs/binder/ProcessState.cpp | 8 | ||||
-rw-r--r-- | libs/binder/include/binder/ProcessState.h | 11 |
3 files changed, 3 insertions, 18 deletions
diff --git a/cmds/servicemanager/main.cpp b/cmds/servicemanager/main.cpp index 2618906261..b1bc6dc7d5 100644 --- a/cmds/servicemanager/main.cpp +++ b/cmds/servicemanager/main.cpp @@ -130,7 +130,7 @@ int main(int argc, char** argv) { } IPCThreadState::self()->setTheContextObject(manager); - ps->becomeContextManager(nullptr, nullptr); + ps->becomeContextManager(); sp<Looper> looper = Looper::prepare(false /*allowNonCallbacks*/); diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 4f818366d1..c110ff67b9 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -144,11 +144,9 @@ void ProcessState::startThreadPool() } } -bool ProcessState::becomeContextManager(context_check_func checkFunc, void* userData) +bool ProcessState::becomeContextManager() { AutoMutex _l(mLock); - mBinderContextCheckFunc = checkFunc; - mBinderContextUserData = userData; flat_binder_object obj { .flags = FLAT_BINDER_FLAG_TXN_SECURITY_CTX, @@ -165,8 +163,6 @@ bool ProcessState::becomeContextManager(context_check_func checkFunc, void* user } if (result == -1) { - mBinderContextCheckFunc = nullptr; - mBinderContextUserData = nullptr; ALOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno)); } @@ -397,8 +393,6 @@ ProcessState::ProcessState(const char *driver) , mExecutingThreadsCount(0) , mMaxThreads(DEFAULT_MAX_BINDER_THREADS) , mStarvationStartTimeMs(0) - , mBinderContextCheckFunc(nullptr) - , mBinderContextUserData(nullptr) , mThreadPoolStarted(false) , mThreadPoolSeq(1) , mCallRestriction(CallRestriction::NONE) diff --git a/libs/binder/include/binder/ProcessState.h b/libs/binder/include/binder/ProcessState.h index 9f5346ac27..efb95f4316 100644 --- a/libs/binder/include/binder/ProcessState.h +++ b/libs/binder/include/binder/ProcessState.h @@ -50,14 +50,8 @@ public: sp<IBinder> getContextObject(const sp<IBinder>& caller); void startThreadPool(); - - typedef bool (*context_check_func)(const String16& name, - const sp<IBinder>& caller, - void* userData); - bool becomeContextManager( - context_check_func checkFunc, - void* userData); + bool becomeContextManager(); sp<IBinder> getStrongProxyForHandle(int32_t handle); void expungeHandle(int32_t handle, IBinder* binder); @@ -128,9 +122,6 @@ private: Vector<handle_entry>mHandleToObject; - context_check_func mBinderContextCheckFunc; - void* mBinderContextUserData; - String8 mRootDir; bool mThreadPoolStarted; volatile int32_t mThreadPoolSeq; |