/frameworks/native/libs/binder/ |
D | Stability.cpp | 26 void Stability::forceDowngradeToStability(const sp<IBinder>& binder, Level level) { in forceDowngradeToStability() argument 31 LOG_ALWAYS_FATAL_IF(!binder || !binder->localBinder(), "Can only downgrade local binder"); in forceDowngradeToStability() 33 status_t result = setRepr(binder.get(), level, REPR_LOG | REPR_ALLOW_DOWNGRADE); in forceDowngradeToStability() 37 void Stability::forceDowngradeToLocalStability(const sp<IBinder>& binder) { in forceDowngradeToLocalStability() argument 38 forceDowngradeToStability(binder, getLocalLevel()); in forceDowngradeToLocalStability() 41 void Stability::forceDowngradeToSystemStability(const sp<IBinder>& binder) { in forceDowngradeToSystemStability() argument 42 forceDowngradeToStability(binder, Level::SYSTEM); in forceDowngradeToSystemStability() 45 void Stability::forceDowngradeToVendorStability(const sp<IBinder>& binder) { in forceDowngradeToVendorStability() argument 46 forceDowngradeToStability(binder, Level::VENDOR); in forceDowngradeToVendorStability() 49 void Stability::markCompilationUnit(IBinder* binder) { in markCompilationUnit() argument [all …]
|
D | IMemory.cpp | 51 sp<IMemoryHeap> find_heap(const sp<IBinder>& binder); 52 void free_heap(const sp<IBinder>& binder); 53 sp<IMemoryHeap> get_heap(const sp<IBinder>& binder); 64 void free_heap(const wp<IBinder>& binder); 97 static inline sp<IMemoryHeap> find_heap(const sp<IBinder>& binder) { in find_heap() argument 98 return gHeapCache->find_heap(binder); in find_heap() 100 static inline void free_heap(const sp<IBinder>& binder) { in free_heap() argument 101 gHeapCache->free_heap(binder); in free_heap() 103 static inline sp<IMemoryHeap> get_heap(const sp<IBinder>& binder) { in get_heap() argument 104 return gHeapCache->get_heap(binder); in get_heap() [all …]
|
D | servicedispatcher.cpp | 83 auto binder = std::invoke(serviceRetriever, defaultServiceManager(), String16(name)); in Dispatch() local 84 if (nullptr == binder) { in Dispatch() 100 auto status = binder->setRpcClientDebug(std::move(socket), keepAliveBinder); in Dispatch() 119 android::binder::Status getService(const std::string&, in getService() 122 return android::binder::Status::fromStatusT(android::INVALID_OPERATION); in getService() 124 android::binder::Status checkService(const std::string&, in checkService() 127 return android::binder::Status::fromStatusT(android::INVALID_OPERATION); in checkService() 129 android::binder::Status addService(const std::string&, const android::sp<android::IBinder>&, in addService() 132 return android::binder::Status::fromStatusT(android::INVALID_OPERATION); in addService() 134 android::binder::Status listServices(int32_t dumpPriority, in listServices() [all …]
|
/frameworks/native/libs/binder/ndk/ |
D | ibinder.cpp | 49 static void attach(const sp<IBinder>& binder) { in attach() argument 51 CHECK_EQ(nullptr, binder->attachObject(kId, kValue, nullptr /*cookie*/, clean)); in attach() 53 static bool has(const sp<IBinder>& binder) { in has() argument 54 return binder != nullptr && binder->findObject(kId) == kValue; in has() 63 wp<ABpBinder> binder; member 239 ABpBinder::ABpBinder(const ::android::sp<::android::IBinder>& binder) in ABpBinder() argument 240 : AIBinder(nullptr /*clazz*/), BpRefBase(binder) { in ABpBinder() 241 CHECK(binder != nullptr); in ABpBinder() 255 remote()->withLock([&]() { value->binder = nullptr; }); in onLastStrongRef() 260 sp<AIBinder> ABpBinder::lookupOrCreateFromBinder(const ::android::sp<::android::IBinder>& binder) { in lookupOrCreateFromBinder() argument [all …]
|
D | stability.cpp | 35 extern "C" void AIBinder_markVendorStability(AIBinder* binder) { in AIBinder_markVendorStability() argument 36 Stability::markVndk(binder->getBinder().get()); in AIBinder_markVendorStability() 39 void AIBinder_markSystemStability(AIBinder* binder) { in AIBinder_markSystemStability() argument 40 Stability::markCompilationUnit(binder->getBinder().get()); in AIBinder_markSystemStability() 43 void AIBinder_markVintfStability(AIBinder* binder) { in AIBinder_markVintfStability() argument 44 Stability::markVintf(binder->getBinder().get()); in AIBinder_markVintfStability() 48 extern "C" void AIBinder_forceDowngradeToVendorStability(AIBinder* binder) { in AIBinder_forceDowngradeToVendorStability() argument 49 Stability::forceDowngradeToVendorStability(binder->getBinder()); in AIBinder_forceDowngradeToVendorStability() 52 void AIBinder_forceDowngradeToSystemStability(AIBinder* binder) { in AIBinder_forceDowngradeToSystemStability() argument 53 Stability::forceDowngradeToSystemStability(binder->getBinder()); in AIBinder_forceDowngradeToSystemStability()
|
D | service_manager.cpp | 34 binder_exception_t AServiceManager_addService(AIBinder* binder, const char* instance) { in AServiceManager_addService() argument 35 if (binder == nullptr || instance == nullptr) { in AServiceManager_addService() 40 status_t exception = sm->addService(String16(instance), binder->getBinder()); in AServiceManager_addService() 49 sp<IBinder> binder = sm->checkService(String16(instance)); in AServiceManager_checkService() local 51 sp<AIBinder> ret = ABpBinder::lookupOrCreateFromBinder(binder); in AServiceManager_checkService() 61 sp<IBinder> binder = sm->getService(String16(instance)); in AServiceManager_getService() local 63 sp<AIBinder> ret = ABpBinder::lookupOrCreateFromBinder(binder); in AServiceManager_getService() 67 binder_status_t AServiceManager_registerLazyService(AIBinder* binder, const char* instance) { in AServiceManager_registerLazyService() argument 68 if (binder == nullptr || instance == nullptr) { in AServiceManager_registerLazyService() 72 auto serviceRegistrar = android::binder::LazyServiceRegistrar::getInstance(); in AServiceManager_registerLazyService() [all …]
|
/frameworks/native/libs/binder/ndk/include_platform/android/ |
D | binder_stability.h | 42 void AIBinder_markVendorStability(AIBinder* binder); 44 static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { in AIBinder_markCompilationUnitStability() argument 45 AIBinder_markVendorStability(binder); in AIBinder_markCompilationUnitStability() 54 void AIBinder_forceDowngradeToVendorStability(AIBinder* binder); 56 static inline void AIBinder_forceDowngradeToLocalStability(AIBinder* binder) { in AIBinder_forceDowngradeToLocalStability() argument 57 AIBinder_forceDowngradeToVendorStability(binder); in AIBinder_forceDowngradeToLocalStability() 69 __attribute__((weak)) void AIBinder_markSystemStability(AIBinder* binder); 71 static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { in AIBinder_markCompilationUnitStability() argument 74 AIBinder_markSystemStability(binder); in AIBinder_markCompilationUnitStability() 83 void AIBinder_forceDowngradeToSystemStability(AIBinder* binder); [all …]
|
/frameworks/native/libs/binder/ndk/tests/ |
D | iface.cpp | 45 binder_status_t IFoo_Class_onTransact(AIBinder* binder, transaction_code_t code, const AParcel* in, in IFoo_Class_onTransact() argument 49 sp<IFoo> foo = static_cast<IFoo_Class_Data*>(AIBinder_getUserData(binder))->foo; in IFoo_Class_onTransact() 77 explicit BpFoo(AIBinder* binder) : mBinder(binder) {} in BpFoo() argument 122 AIBinder* binder = nullptr; in getBinder() local 126 binder = AIBinder_Weak_promote(mWeakBinder); in getBinder() 128 if (binder == nullptr) { in getBinder() 130 binder = AIBinder_new(IFoo::kClass, static_cast<void*>(new IFoo_Class_Data{this})); in getBinder() 134 mWeakBinder = AIBinder_Weak_new(binder); in getBinder() 141 return binder; in getBinder() 145 AIBinder* binder = getBinder(); in addService() local [all …]
|
D | libbinder_ndk_unit_test.cpp | 131 auto binder = service->asBinder(); in generatedService() local 133 AIBinder_setRequestingSid(binder.get(), true); in generatedService() 136 AServiceManager_addService(binder.get(), kBinderNdkUnitTestService); in generatedService() 205 auto binder = service->asBinder(); in lazyService() local 207 binder_status_t status = AServiceManager_registerLazyService(binder.get(), instance); in lazyService() 218 AIBinder* binder = AServiceManager_checkService(serviceName); in isServiceRunning() local 219 if (binder == nullptr) { in isServiceRunning() 222 AIBinder_decStrong(binder); in isServiceRunning() 243 AIBinder* binder = AServiceManager_checkService("asdfghkl;"); in TEST() local 244 ASSERT_EQ(nullptr, binder); in TEST() [all …]
|
/frameworks/native/services/vr/virtual_touchpad/ |
D | VirtualTouchpadService.cpp | 28 binder::Status VirtualTouchpadService::attach() { in attach() 31 return binder::Status::fromStatusT(PERMISSION_DENIED); in attach() 39 return binder::Status::fromStatusT(ALREADY_EXISTS); in attach() 49 return binder::Status::ok(); in attach() 53 return binder::Status::fromStatusT(error); in attach() 55 return binder::Status::ok(); in attach() 58 binder::Status VirtualTouchpadService::detach() { in detach() 60 return binder::Status::fromStatusT(PERMISSION_DENIED); in detach() 64 return binder::Status::fromStatusT(error); in detach() 66 return binder::Status::ok(); in detach() [all …]
|
/frameworks/native/cmds/installd/ |
D | InstalldNativeService.h | 44 binder::Status createUserData(const std::optional<std::string>& uuid, int32_t userId, 46 binder::Status destroyUserData(const std::optional<std::string>& uuid, int32_t userId, 49 binder::Status createAppData(const std::optional<std::string>& uuid, 54 binder::Status createAppData( 57 binder::Status createAppDataBatched( 61 binder::Status reconcileSdkData(const android::os::ReconcileSdkDataArgs& args); 63 binder::Status restoreconAppData(const std::optional<std::string>& uuid, 67 binder::Status migrateAppData(const std::optional<std::string>& uuid, 69 binder::Status clearAppData(const std::optional<std::string>& uuid, 71 binder::Status destroyAppData(const std::optional<std::string>& uuid, [all …]
|
/frameworks/native/libs/binder/tests/unit_fuzzers/ |
D | StatusFuzzFunctions.h | 35 static const std::vector<std::function<void(FuzzedDataProvider*, binder::Status*, Parcel*)>> 37 [](FuzzedDataProvider*, binder::Status* status, Parcel* parcel) -> void { 41 [](FuzzedDataProvider*, binder::Status* status, Parcel* parcel) -> void { 44 [](FuzzedDataProvider* fdp, binder::Status* status, Parcel*) -> void { 50 [](FuzzedDataProvider* fdp, binder::Status* status, Parcel*) -> void { 56 [](FuzzedDataProvider*, binder::Status* status, Parcel*) -> void { status->ok(); }, 57 [](FuzzedDataProvider* fdp, binder::Status* status, Parcel*) -> void { 61 *status = binder::Status::fromExceptionCode(fdp->ConsumeIntegral<int32_t>(), 64 [](FuzzedDataProvider* fdp, binder::Status* status, Parcel*) -> void { 65 *status = binder::Status::fromServiceSpecificError( [all …]
|
/frameworks/base/services/incremental/ |
D | BinderIncrementalService.h | 42 binder::Status openStorage(const std::string& path, int32_t* _aidl_return) final; 43 binder::Status createStorage(const ::std::string& path, 46 binder::Status createLinkedStorage(const std::string& path, int32_t otherStorageId, 48 binder::Status startLoading( 55 binder::Status onInstallationComplete(int32_t storageId) final; 57 binder::Status makeBindMount(int32_t storageId, const std::string& sourcePath, 60 binder::Status deleteBindMount(int32_t storageId, const std::string& targetFullPath, 62 binder::Status makeDirectory(int32_t storageId, const std::string& path, 64 binder::Status makeDirectories(int32_t storageId, const std::string& path, 66 binder::Status makeFile(int32_t storageId, const std::string& path, [all …]
|
D | IncrementalServiceValidation.cpp | 28 binder::Status Ok() { in Ok() 29 return binder::Status::ok(); in Ok() 32 binder::Status Exception(uint32_t code, const std::string& msg) { in Exception() 33 return binder::Status::fromExceptionCode(code, String8(msg.c_str())); in Exception() 36 int fromBinderStatus(const binder::Status& status) { in fromBinderStatus() 37 return status.exceptionCode() == binder::Status::EX_SERVICE_SPECIFIC in fromBinderStatus() 45 binder::Status CheckPermissionForDataDelivery(const char* permission, const char* operation, in CheckPermissionForDataDelivery() 53 return Exception(binder::Status::EX_SECURITY, in CheckPermissionForDataDelivery() 61 return Exception(binder::Status::EX_SECURITY, in CheckPermissionForDataDelivery() 67 return binder::Status::ok(); in CheckPermissionForDataDelivery() [all …]
|
/frameworks/native/libs/binder/ndk/include_ndk/android/ |
D | binder_ibinder.h | 169 typedef binder_status_t (*AIBinder_Class_onTransact)(AIBinder* binder, transaction_code_t code, 205 typedef binder_status_t (*AIBinder_onDump)(AIBinder* binder, int fd, const char** args, 272 bool AIBinder_isRemote(const AIBinder* binder) __INTRODUCED_IN(29); 287 bool AIBinder_isAlive(const AIBinder* binder) __INTRODUCED_IN(29); 300 binder_status_t AIBinder_ping(AIBinder* binder) __INTRODUCED_IN(29); 316 binder_status_t AIBinder_dump(AIBinder* binder, int fd, const char** args, uint32_t numArgs) 338 binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, 363 binder_status_t AIBinder_unlinkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, 410 void AIBinder_incStrong(AIBinder* binder) __INTRODUCED_IN(29); 419 void AIBinder_decStrong(AIBinder* binder) __INTRODUCED_IN(29); [all …]
|
/frameworks/native/libs/binder/tests/ |
D | binderStabilityTest.cpp | 35 using android::binder::Status; 50 static status_t doUserTransaction(const sp<IBinder>& binder) { in doUserTransaction() argument 53 return binder->transact(USER_TRANSACTION, data, &reply, 0/*flags*/); in doUserTransaction() 104 Status sendAndCallBinder(const sp<IBinder>& binder) override { in sendAndCallBinder() argument 105 ALOGI("Debug log stability: %s", Stability::debugToString(binder).c_str()); in sendAndCallBinder() 106 return Status::fromExceptionCode(BadStableBinder::doUserTransaction(binder)); in sendAndCallBinder() 165 sp<BadStableBinder> binder = BadStableBinder::vintf(); in TEST() local 167 EXPECT_TRUE(Stability::requiresVintfDeclaration(binder)); in TEST() 168 EXPECT_TRUE(server->sendAndCallBinder(binder).isOk()); in TEST() 169 EXPECT_TRUE(binder->gotUserTransaction); in TEST() [all …]
|
D | binderBinderUnitTest.cpp | 32 auto binder = sp<BBinder>::make(); in TEST() local 33 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject1, nullptr, nullptr)); in TEST() 34 EXPECT_EQ(nullptr, binder->attachObject(kObjectId2, kObject2, nullptr, nullptr)); in TEST() 35 EXPECT_EQ(kObject1, binder->attachObject(kObjectId1, kObject3, nullptr, nullptr)); in TEST() 39 auto binder = sp<BBinder>::make(); in TEST() local 40 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject1, nullptr, nullptr)); in TEST() 41 EXPECT_EQ(kObject1, binder->detachObject(kObjectId1)); in TEST() 42 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject2, nullptr, nullptr)); in TEST() 46 auto binder = sp<BBinder>::make(); in TEST() local 48 binder->setExtension(ext); in TEST() [all …]
|
/frameworks/native/include/binder/ |
D | Stability.h | 57 static void forceDowngradeToLocalStability(const sp<IBinder>& binder); 79 static void forceDowngradeToVendorStability(const sp<IBinder>& binder); 85 static void forceDowngradeToSystemStability(const sp<IBinder>& binder); 92 static void markCompilationUnit(IBinder* binder); 99 static void markVintf(IBinder* binder); 102 static std::string debugToString(const sp<IBinder>& binder); 112 static void markVndk(IBinder* binder); 116 static bool requiresVintfDeclaration(const sp<IBinder>& binder); 128 static void tryMarkCompilationUnit(IBinder* binder); 145 static void forceDowngradeToStability(const sp<IBinder>& binder, Level level); [all …]
|
/frameworks/native/libs/binder/include/binder/ |
D | Stability.h | 57 static void forceDowngradeToLocalStability(const sp<IBinder>& binder); 79 static void forceDowngradeToVendorStability(const sp<IBinder>& binder); 85 static void forceDowngradeToSystemStability(const sp<IBinder>& binder); 92 static void markCompilationUnit(IBinder* binder); 99 static void markVintf(IBinder* binder); 102 static std::string debugToString(const sp<IBinder>& binder); 112 static void markVndk(IBinder* binder); 116 static bool requiresVintfDeclaration(const sp<IBinder>& binder); 128 static void tryMarkCompilationUnit(IBinder* binder); 145 static void forceDowngradeToStability(const sp<IBinder>& binder, Level level); [all …]
|
/frameworks/native/libs/binder/rust/tests/ |
D | integration.rs | 19 use binder::{declare_binder_enum, declare_binder_interface}; 20 use binder::{BinderFeatures, Interface, StatusCode, ThreadState}; 23 use binder::binder_impl::{ 43 binder::ProcessState::set_thread_pool_max_thread_count(0); in main() 44 binder::ProcessState::start_thread_pool(); in main() 67 binder::add_service(&service_name, service.as_binder()) in main() 71 binder::ProcessState::join_thread_pool(); in main() 149 Ok(binder::is_handling_transaction()) in get_is_handling_transaction() 171 fn test(&self) -> binder::BoxFuture<'static, Result<String, StatusCode>>; in test() 174 fn get_dump_args(&self) -> binder::BoxFuture<'static, Result<Vec<String>, StatusCode>>; in get_dump_args() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/transport/ |
D | BackupTransportClientTest.java | 71 TestFuturesFakeTransportBinder binder = new TestFuturesFakeTransportBinder(); in testName_completesImmediately_returnsName() local 72 binder.mNameCompletedImmediately = "fake name"; in testName_completesImmediately_returnsName() 74 BackupTransportClient client = new BackupTransportClient(binder); in testName_completesImmediately_returnsName() 82 TestFuturesFakeTransportBinder binder = new TestFuturesFakeTransportBinder(); in testTransportDirName_completesLater_returnsName() local 83 BackupTransportClient client = new BackupTransportClient(binder); in testTransportDirName_completesLater_returnsName() 96 synchronized (binder.mLock) { in testTransportDirName_completesLater_returnsName() 97 while (binder.mNameCompletedInFuture == null) { in testTransportDirName_completesLater_returnsName() 98 binder.mLock.wait(); in testTransportDirName_completesLater_returnsName() 100 assertThat(binder.mNameCompletedInFuture.complete("fake name")).isTrue(); in testTransportDirName_completesLater_returnsName() 108 TestFuturesFakeTransportBinder binder = new TestFuturesFakeTransportBinder(); in testTransportDirName_canceledBeforeCompletion_throwsException() local [all …]
|
/frameworks/av/services/audiopolicy/service/ |
D | AudioPolicyService.h | 83 binder::Status onNewAudioModulesAvailable() override; 84 binder::Status setDeviceConnectionState( 88 binder::Status getDeviceConnectionState(const AudioDevice& device, 90 binder::Status handleDeviceConfigChange( 94 binder::Status setPhoneState(AudioMode state, int32_t uid) override; 95 binder::Status setForceUse(media::AudioPolicyForceUse usage, 97 binder::Status getForceUse(media::AudioPolicyForceUse usage, 99 binder::Status getOutput(AudioStreamType stream, int32_t* _aidl_return) override; 100 binder::Status getOutputForAttr(const media::AudioAttributesInternal& attr, int32_t session, 105 binder::Status startOutput(int32_t portId) override; [all …]
|
/frameworks/native/cmds/servicemanager/ |
D | ServiceManager.h | 38 binder::Status getService(const std::string& name, sp<IBinder>* outBinder) override; 39 binder::Status checkService(const std::string& name, sp<IBinder>* outBinder) override; 40 binder::Status addService(const std::string& name, const sp<IBinder>& binder, 42 binder::Status listServices(int32_t dumpPriority, std::vector<std::string>* outList) override; 43 binder::Status registerForNotifications(const std::string& name, 45 binder::Status unregisterForNotifications(const std::string& name, 48 binder::Status isDeclared(const std::string& name, bool* outReturn) override; 49 …binder::Status getDeclaredInstances(const std::string& interface, std::vector<std::string>* outRet… 50 binder::Status updatableViaApex(const std::string& name, 52 binder::Status getConnectionInfo(const std::string& name, [all …]
|
/frameworks/native/services/inputflinger/ |
D | InputManager.cpp | 40 return binder::Status::EX_NONE; in exceptionCodeFromStatusT() 42 return binder::Status::EX_UNSUPPORTED_OPERATION; in exceptionCodeFromStatusT() 46 return binder::Status::EX_ILLEGAL_ARGUMENT; in exceptionCodeFromStatusT() 48 return binder::Status::EX_ILLEGAL_STATE; in exceptionCodeFromStatusT() 50 return binder::Status::EX_SECURITY; in exceptionCodeFromStatusT() 52 return binder::Status::EX_TRANSACTION_FAILED; in exceptionCodeFromStatusT() 133 binder::Status InputManager::createInputChannel(const std::string& name, InputChannel* outChannel) { in createInputChannel() 139 return binder::Status::ok(); in createInputChannel() 144 return binder::Status::fromExceptionCode(exceptionCodeFromStatusT(channel.error().code()), in createInputChannel() 148 return binder::Status::ok(); in createInputChannel() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BinderCallsStatsTest.java | 72 Binder binder = new Binder(); in testDetailedOff() local 73 CallSession callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOff() 85 assertEquals(binder.getClass(), callStatsList.get(0).binderClass); in testDetailedOff() 89 callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOff() 97 callSession = bcs.callStarted(binder, 2, WORKSOURCE_UID); in testDetailedOff() 113 Binder binder = new Binder(); in testDetailedOn() local 114 CallSession callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOn() 129 assertEquals(binder.getClass(), callStatsList.get(0).binderClass); in testDetailedOn() 132 callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOn() 142 callSession = bcs.callStarted(binder, 2, WORKSOURCE_UID); in testDetailedOn() [all …]
|