Loading libs/binder/ndk/include_platform/android/binder_manager.h +1 −5 Original line number Diff line number Diff line Loading @@ -30,11 +30,7 @@ enum AServiceManager_AddServiceFlag : uint32_t { * Services with methods that perform file IO, web socket creation or ways to egress data must * not be added with this flag for privacy concerns. */ ADD_SERVICE_ALLOW_ISOLATED = 1 << 0, ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL = 1 << 1, ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH = 1 << 2, ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL = 1 << 3, ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT = 1 << 4, ADD_SERVICE_ALLOW_ISOLATED = 1, }; /** Loading libs/binder/ndk/service_manager.cpp +1 −19 Original line number Diff line number Diff line Loading @@ -49,25 +49,7 @@ binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const c sp<IServiceManager> sm = defaultServiceManager(); bool allowIsolated = flags & AServiceManager_AddServiceFlag::ADD_SERVICE_ALLOW_ISOLATED; int dumpFlags = 0; if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_HIGH; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_NORMAL; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT; } if (dumpFlags == 0) { dumpFlags = IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT; } status_t exception = sm->addService(String16(instance), binder->getBinder(), allowIsolated, dumpFlags); status_t exception = sm->addService(String16(instance), binder->getBinder(), allowIsolated); return PruneException(exception); } Loading Loading
libs/binder/ndk/include_platform/android/binder_manager.h +1 −5 Original line number Diff line number Diff line Loading @@ -30,11 +30,7 @@ enum AServiceManager_AddServiceFlag : uint32_t { * Services with methods that perform file IO, web socket creation or ways to egress data must * not be added with this flag for privacy concerns. */ ADD_SERVICE_ALLOW_ISOLATED = 1 << 0, ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL = 1 << 1, ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH = 1 << 2, ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL = 1 << 3, ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT = 1 << 4, ADD_SERVICE_ALLOW_ISOLATED = 1, }; /** Loading
libs/binder/ndk/service_manager.cpp +1 −19 Original line number Diff line number Diff line Loading @@ -49,25 +49,7 @@ binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const c sp<IServiceManager> sm = defaultServiceManager(); bool allowIsolated = flags & AServiceManager_AddServiceFlag::ADD_SERVICE_ALLOW_ISOLATED; int dumpFlags = 0; if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_HIGH; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_NORMAL; } if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT) { dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT; } if (dumpFlags == 0) { dumpFlags = IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT; } status_t exception = sm->addService(String16(instance), binder->getBinder(), allowIsolated, dumpFlags); status_t exception = sm->addService(String16(instance), binder->getBinder(), allowIsolated); return PruneException(exception); } Loading