Loading libs/binder/IPCThreadState.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -448,14 +448,6 @@ int32_t IPCThreadState::getLastTransactionBinderFlags() const return mLastTransactionBinderFlags; } void IPCThreadState::setCallRestriction(ProcessState::CallRestriction restriction) { mCallRestriction = restriction; } ProcessState::CallRestriction IPCThreadState::getCallRestriction() const { return mCallRestriction; } void IPCThreadState::restoreCallingIdentity(int64_t token) { mCallingUid = (int)(token>>32); Loading libs/binder/ProcessState.cpp +1 −9 Original line number Diff line number Diff line Loading @@ -282,17 +282,9 @@ sp<IBinder> ProcessState::getStrongProxyForHandle(int32_t handle) // a driver API to get a handle to the context manager with // proper reference counting. IPCThreadState* ipc = IPCThreadState::self(); CallRestriction originalCallRestriction = ipc->getCallRestriction(); ipc->setCallRestriction(CallRestriction::NONE); Parcel data; status_t status = ipc->transact( status_t status = IPCThreadState::self()->transact( 0, IBinder::PING_TRANSACTION, data, nullptr, 0); ipc->setCallRestriction(originalCallRestriction); if (status == DEAD_OBJECT) return nullptr; } Loading libs/binder/include/binder/IPCThreadState.h +3 −6 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ namespace android { class IPCThreadState { public: using CallRestriction = ProcessState::CallRestriction; static IPCThreadState* self(); static IPCThreadState* selfOrNull(); // self(), but won't instantiate Loading Loading @@ -101,9 +99,6 @@ public: void setLastTransactionBinderFlags(int32_t flags); int32_t getLastTransactionBinderFlags() const; void setCallRestriction(CallRestriction restriction); CallRestriction getCallRestriction() const; int64_t clearCallingIdentity(); // Restores PID/UID (not SID) void restoreCallingIdentity(int64_t token); Loading Loading @@ -162,6 +157,7 @@ public: // This constant needs to be kept in sync with Binder.UNSET_WORKSOURCE from the Java // side. static const int32_t kUnsetWorkSource = -1; private: IPCThreadState(); ~IPCThreadState(); Loading Loading @@ -208,7 +204,8 @@ private: bool mPropagateWorkSource; int32_t mStrictModePolicy; int32_t mLastTransactionBinderFlags; CallRestriction mCallRestriction; ProcessState::CallRestriction mCallRestriction; }; } // namespace android Loading libs/binder/tests/binderLibTest.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -608,12 +608,6 @@ TEST_F(BinderLibTest, AddServer) ASSERT_TRUE(server != nullptr); } TEST_F(BinderLibTest, AddManagerToManager) { sp<IServiceManager> sm = defaultServiceManager(); sp<IBinder> binder = IInterface::asBinder(sm); EXPECT_EQ(NO_ERROR, sm->addService(String16("binderLibTest-manager"), binder)); } TEST_F(BinderLibTest, DeathNotificationStrongRef) { status_t ret; Loading Loading
libs/binder/IPCThreadState.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -448,14 +448,6 @@ int32_t IPCThreadState::getLastTransactionBinderFlags() const return mLastTransactionBinderFlags; } void IPCThreadState::setCallRestriction(ProcessState::CallRestriction restriction) { mCallRestriction = restriction; } ProcessState::CallRestriction IPCThreadState::getCallRestriction() const { return mCallRestriction; } void IPCThreadState::restoreCallingIdentity(int64_t token) { mCallingUid = (int)(token>>32); Loading
libs/binder/ProcessState.cpp +1 −9 Original line number Diff line number Diff line Loading @@ -282,17 +282,9 @@ sp<IBinder> ProcessState::getStrongProxyForHandle(int32_t handle) // a driver API to get a handle to the context manager with // proper reference counting. IPCThreadState* ipc = IPCThreadState::self(); CallRestriction originalCallRestriction = ipc->getCallRestriction(); ipc->setCallRestriction(CallRestriction::NONE); Parcel data; status_t status = ipc->transact( status_t status = IPCThreadState::self()->transact( 0, IBinder::PING_TRANSACTION, data, nullptr, 0); ipc->setCallRestriction(originalCallRestriction); if (status == DEAD_OBJECT) return nullptr; } Loading
libs/binder/include/binder/IPCThreadState.h +3 −6 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ namespace android { class IPCThreadState { public: using CallRestriction = ProcessState::CallRestriction; static IPCThreadState* self(); static IPCThreadState* selfOrNull(); // self(), but won't instantiate Loading Loading @@ -101,9 +99,6 @@ public: void setLastTransactionBinderFlags(int32_t flags); int32_t getLastTransactionBinderFlags() const; void setCallRestriction(CallRestriction restriction); CallRestriction getCallRestriction() const; int64_t clearCallingIdentity(); // Restores PID/UID (not SID) void restoreCallingIdentity(int64_t token); Loading Loading @@ -162,6 +157,7 @@ public: // This constant needs to be kept in sync with Binder.UNSET_WORKSOURCE from the Java // side. static const int32_t kUnsetWorkSource = -1; private: IPCThreadState(); ~IPCThreadState(); Loading Loading @@ -208,7 +204,8 @@ private: bool mPropagateWorkSource; int32_t mStrictModePolicy; int32_t mLastTransactionBinderFlags; CallRestriction mCallRestriction; ProcessState::CallRestriction mCallRestriction; }; } // namespace android Loading
libs/binder/tests/binderLibTest.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -608,12 +608,6 @@ TEST_F(BinderLibTest, AddServer) ASSERT_TRUE(server != nullptr); } TEST_F(BinderLibTest, AddManagerToManager) { sp<IServiceManager> sm = defaultServiceManager(); sp<IBinder> binder = IInterface::asBinder(sm); EXPECT_EQ(NO_ERROR, sm->addService(String16("binderLibTest-manager"), binder)); } TEST_F(BinderLibTest, DeathNotificationStrongRef) { status_t ret; Loading