diff options
Diffstat (limited to 'include/binder')
-rw-r--r-- | include/binder/BinderService.h | 8 | ||||
-rw-r--r-- | include/binder/IPCThreadState.h | 2 | ||||
-rw-r--r-- | include/binder/IServiceManager.h | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/include/binder/BinderService.h b/include/binder/BinderService.h index 2316fef..ca594d3 100644 --- a/include/binder/BinderService.h +++ b/include/binder/BinderService.h @@ -34,15 +34,15 @@ template<typename SERVICE> class BinderService { public: - static status_t publish() { + static status_t publish(bool allowIsolated = false) { sp<IServiceManager> sm(defaultServiceManager()); - return sm->addService(String16(SERVICE::getServiceName()), new SERVICE()); + return sm->addService(String16(SERVICE::getServiceName()), new SERVICE(), allowIsolated); } - static void publishAndJoinThreadPool() { + static void publishAndJoinThreadPool(bool allowIsolated = false) { sp<ProcessState> proc(ProcessState::self()); sp<IServiceManager> sm(defaultServiceManager()); - sm->addService(String16(SERVICE::getServiceName()), new SERVICE()); + sm->addService(String16(SERVICE::getServiceName()), new SERVICE(), allowIsolated); ProcessState::self()->startThreadPool(); IPCThreadState::self()->joinThreadPool(); } diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h index 3378d97..691ba2f 100644 --- a/include/binder/IPCThreadState.h +++ b/include/binder/IPCThreadState.h @@ -41,6 +41,7 @@ public: int getCallingPid(); int getCallingUid(); + int getOrigCallingUid(); void setStrictModePolicy(int32_t policy); int32_t getStrictModePolicy() const; @@ -116,6 +117,7 @@ private: status_t mLastError; pid_t mCallingPid; uid_t mCallingUid; + uid_t mOrigCallingUid; int32_t mStrictModePolicy; int32_t mLastTransactionBinderFlags; }; diff --git a/include/binder/IServiceManager.h b/include/binder/IServiceManager.h index 24e9e99..2c297d6 100644 --- a/include/binder/IServiceManager.h +++ b/include/binder/IServiceManager.h @@ -47,7 +47,8 @@ public: * Register a service. */ virtual status_t addService( const String16& name, - const sp<IBinder>& service) = 0; + const sp<IBinder>& service, + bool allowIsolated = false) = 0; /** * Return list of all existing services. |