/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 …]
|
/frameworks/native/libs/binder/ndk/ |
D | ibinder.cpp | 52 static void attach(const sp<IBinder>& binder) { in attach() argument 53 auto alreadyAttached = binder->attachObject(kId, kValue, nullptr /*cookie*/, clean); in attach() 56 static bool has(const sp<IBinder>& binder) { in has() argument 57 return binder != nullptr && binder->findObject(kId) == kValue; in has() 66 wp<ABpBinder> binder; member 275 ABpBinder::ABpBinder(const ::android::sp<::android::IBinder>& binder) in ABpBinder() argument 276 : AIBinder(nullptr /*clazz*/), mRemote(binder) { in ABpBinder() 277 LOG_ALWAYS_FATAL_IF(binder == nullptr, "binder == nullptr"); in ABpBinder() 289 sp<AIBinder> ABpBinder::lookupOrCreateFromBinder(const ::android::sp<::android::IBinder>& binder) { in lookupOrCreateFromBinder() argument 290 if (binder == nullptr) { in lookupOrCreateFromBinder() [all …]
|
D | stability.cpp | 39 extern "C" void AIBinder_markVendorStability(AIBinder* binder) { in AIBinder_markVendorStability() argument 40 Stability::markVndk(binder->getBinder().get()); in AIBinder_markVendorStability() 43 void AIBinder_markSystemStability(AIBinder* binder) { in AIBinder_markSystemStability() argument 44 Stability::markCompilationUnit(binder->getBinder().get()); in AIBinder_markSystemStability() 47 void AIBinder_markVintfStability(AIBinder* binder) { in AIBinder_markVintfStability() argument 48 Stability::markVintf(binder->getBinder().get()); in AIBinder_markVintfStability() 52 extern "C" void AIBinder_forceDowngradeToVendorStability(AIBinder* binder) { in AIBinder_forceDowngradeToVendorStability() argument 53 Stability::forceDowngradeToVendorStability(binder->getBinder()); in AIBinder_forceDowngradeToVendorStability() 56 void AIBinder_forceDowngradeToSystemStability(AIBinder* binder) { in AIBinder_forceDowngradeToSystemStability() argument 57 Stability::forceDowngradeToSystemStability(binder->getBinder()); in AIBinder_forceDowngradeToSystemStability()
|
D | service_manager.cpp | 33 binder_exception_t AServiceManager_addService(AIBinder* binder, const char* instance) { in AServiceManager_addService() argument 34 if (binder == nullptr || instance == nullptr) { in AServiceManager_addService() 39 status_t exception = sm->addService(String16(instance), binder->getBinder()); in AServiceManager_addService() 43 binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const char* instance, in AServiceManager_addServiceWithFlags() argument 45 if (binder == nullptr || instance == nullptr) { in AServiceManager_addServiceWithFlags() 69 sm->addService(String16(instance), binder->getBinder(), allowIsolated, dumpFlags); in AServiceManager_addServiceWithFlags() 80 sp<IBinder> binder = sm->checkService(String16(instance)); in AServiceManager_checkService() local 82 sp<AIBinder> ret = ABpBinder::lookupOrCreateFromBinder(binder); in AServiceManager_checkService() 92 sp<IBinder> binder = sm->getService(String16(instance)); in AServiceManager_getService() local 94 sp<AIBinder> ret = ABpBinder::lookupOrCreateFromBinder(binder); in AServiceManager_getService() [all …]
|
/frameworks/native/libs/binder/ndk/include_platform/android/ |
D | binder_stability.h | 40 void AIBinder_markVendorStability(AIBinder* binder); 42 static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { in AIBinder_markCompilationUnitStability() argument 43 AIBinder_markVendorStability(binder); in AIBinder_markCompilationUnitStability() 61 void AIBinder_forceDowngradeToVendorStability(AIBinder* binder); 63 static inline void AIBinder_forceDowngradeToLocalStability(AIBinder* binder) { in AIBinder_forceDowngradeToLocalStability() argument 64 AIBinder_forceDowngradeToVendorStability(binder); in AIBinder_forceDowngradeToLocalStability() 76 __attribute__((weak)) void AIBinder_markSystemStability(AIBinder* binder); 78 static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { in AIBinder_markCompilationUnitStability() argument 81 AIBinder_markSystemStability(binder); in AIBinder_markCompilationUnitStability() 99 void AIBinder_forceDowngradeToSystemStability(AIBinder* binder); [all …]
|
/frameworks/av/services/camera/libcameraservice/tests/ |
D | CameraPermissionsTest.cpp | 42 virtual binder::Status onStatusChanged(int32_t , const std::string&, int32_t) { in onStatusChanged() 43 return binder::Status::ok(); in onStatusChanged() 46 virtual binder::Status onPhysicalCameraStatusChanged(int32_t /*status*/, in onPhysicalCameraStatusChanged() 50 return binder::Status::ok(); in onPhysicalCameraStatusChanged() 53 virtual binder::Status onTorchStatusChanged(int32_t /*status*/, in onTorchStatusChanged() 55 return binder::Status::ok(); in onTorchStatusChanged() 58 virtual binder::Status onCameraAccessPrioritiesChanged() { in onCameraAccessPrioritiesChanged() 60 return binder::Status::ok(); in onCameraAccessPrioritiesChanged() 63 virtual binder::Status onCameraOpened(const std::string& /*cameraId*/, in onCameraOpened() 66 return binder::Status::ok(); in onCameraOpened() [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/libs/binder/tests/ |
D | binderBinderUnitTest.cpp | 33 auto binder = sp<BBinder>::make(); in TEST() local 34 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject1, nullptr, nullptr)); in TEST() 35 EXPECT_EQ(nullptr, binder->attachObject(kObjectId2, kObject2, nullptr, nullptr)); in TEST() 36 EXPECT_EQ(kObject1, binder->attachObject(kObjectId1, kObject3, nullptr, nullptr)); in TEST() 40 auto binder = sp<BBinder>::make(); in TEST() local 41 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject1, nullptr, nullptr)); in TEST() 42 EXPECT_EQ(kObject1, binder->detachObject(kObjectId1)); in TEST() 43 EXPECT_EQ(nullptr, binder->attachObject(kObjectId1, kObject2, nullptr, nullptr)); in TEST() 47 auto binder = sp<BBinder>::make(); in TEST() local 49 binder->setExtension(ext); in TEST() [all …]
|
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() 168 sp<BadStableBinder> binder = BadStableBinder::vintf(); in TEST() local 170 EXPECT_TRUE(Stability::requiresVintfDeclaration(binder)); in TEST() 171 EXPECT_TRUE(server->sendAndCallBinder(binder).isOk()); in TEST() 172 EXPECT_TRUE(binder->gotUserTransaction); in TEST() [all …]
|
/frameworks/native/libs/binder/ndk/tests/ |
D | iface.cpp | 46 binder_status_t IFoo_Class_onTransact(AIBinder* binder, transaction_code_t code, const AParcel* in, in IFoo_Class_onTransact() argument 50 sp<IFoo> foo = static_cast<IFoo_Class_Data*>(AIBinder_getUserData(binder))->foo; in IFoo_Class_onTransact() 83 explicit BpFoo(AIBinder* binder) : mBinder(binder) {} in BpFoo() argument 128 AIBinder* binder = nullptr; in getBinder() local 132 binder = AIBinder_Weak_promote(mWeakBinder); in getBinder() 134 if (binder == nullptr) { in getBinder() 136 binder = AIBinder_new(IFoo::kClass, static_cast<void*>(new IFoo_Class_Data{this})); in getBinder() 140 mWeakBinder = AIBinder_Weak_new(binder); in getBinder() 147 return binder; in getBinder() 151 AIBinder* binder = getBinder(); in addService() local [all …]
|
D | libbinder_ndk_unit_test.cpp | 149 auto binder = service->asBinder(); in generatedService() local 151 AIBinder_setRequestingSid(binder.get(), true); in generatedService() 154 AServiceManager_addService(binder.get(), kBinderNdkUnitTestService); in generatedService() 169 auto binder = service->asBinder(); in generatedFlaggedService() local 172 AServiceManager_addServiceWithFlags(binder.get(), instance, flags); in generatedFlaggedService() 241 auto binder = service->asBinder(); in lazyService() local 243 binder_status_t status = AServiceManager_registerLazyService(binder.get(), instance); in lazyService() 254 AIBinder* binder = AServiceManager_checkService(serviceName); in isServiceRunning() local 255 if (binder == nullptr) { in isServiceRunning() 258 AIBinder_decStrong(binder); in isServiceRunning() [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/native/cmds/installd/ |
D | InstalldNativeService.h | 47 binder::Status authenticate(const android::os::ParcelFileDescriptor& authFd, int32_t uid); 62 binder::Status createUserData(const std::optional<std::string>& uuid, int32_t userId, 64 binder::Status destroyUserData(const std::optional<std::string>& uuid, int32_t userId, 67 binder::Status createAppData(const std::optional<std::string>& uuid, 73 binder::Status createAppData( 76 binder::Status createAppDataBatched( 80 binder::Status reconcileSdkData(const android::os::ReconcileSdkDataArgs& args); 82 binder::Status restoreconAppData(const std::optional<std::string>& uuid, 86 binder::Status migrateAppData(const std::optional<std::string>& uuid, 88 binder::Status clearAppData(const std::optional<std::string>& uuid, [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, int32_t mode, [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, 277 bool AIBinder_isRemote(const AIBinder* binder) __INTRODUCED_IN(29); 292 bool AIBinder_isAlive(const AIBinder* binder) __INTRODUCED_IN(29); 305 binder_status_t AIBinder_ping(AIBinder* binder) __INTRODUCED_IN(29); 321 binder_status_t AIBinder_dump(AIBinder* binder, int fd, const char** args, uint32_t numArgs) 343 binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, 368 binder_status_t AIBinder_unlinkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, 421 void AIBinder_incStrong(AIBinder* binder) __INTRODUCED_IN(29); 430 void AIBinder_decStrong(AIBinder* binder) __INTRODUCED_IN(29); [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() 65 binder::add_service(&service_name, service.as_binder()) in main() 69 binder::ProcessState::join_thread_pool(); in main() 145 Ok(binder::is_handling_transaction()) in get_is_handling_transaction() 167 fn test(&self) -> binder::BoxFuture<'static, Result<String, StatusCode>>; in test() 170 fn get_dump_args(&self) -> binder::BoxFuture<'static, Result<Vec<String>, StatusCode>>; in get_dump_args() [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | TaskFpsCallbackController.java | 43 IBinder binder = callback.asBinder(); in registerListener() local 44 if (mTaskFpsCallbacks.containsKey(binder)) { in registerListener() 49 mTaskFpsCallbacks.put(binder, nativeListener); in registerListener() 53 binder.linkToDeath(deathRecipient, 0); in registerListener() 54 mDeathRecipients.put(binder, deathRecipient); in registerListener() 65 IBinder binder = callback.asBinder(); in unregisterListener() local 66 if (!mTaskFpsCallbacks.containsKey(binder)) { in unregisterListener() 70 binder.unlinkToDeath(mDeathRecipients.get(binder), 0); in unregisterListener() 71 mDeathRecipients.remove(binder); in unregisterListener() 73 nativeUnregister(mTaskFpsCallbacks.get(binder)); in unregisterListener() [all …]
|
/frameworks/av/services/audiopolicy/service/ |
D | AudioPolicyService.h | 96 binder::Status onNewAudioModulesAvailable() override; 97 binder::Status setDeviceConnectionState( 101 binder::Status getDeviceConnectionState(const AudioDevice& device, 103 binder::Status handleDeviceConfigChange( 107 binder::Status setPhoneState(AudioMode state, int32_t uid) override; 108 binder::Status setForceUse(media::AudioPolicyForceUse usage, 110 binder::Status getForceUse(media::AudioPolicyForceUse usage, 112 binder::Status getOutput(AudioStreamType stream, int32_t* _aidl_return) override; 113 binder::Status getOutputForAttr(const media::audio::common::AudioAttributes& attr, 119 binder::Status startOutput(int32_t portId) override; [all …]
|
/frameworks/native/libs/binder/include/binder/ |
D | Stability.h | 58 LIBBINDER_EXPORTED static void forceDowngradeToLocalStability(const sp<IBinder>& binder); 80 LIBBINDER_EXPORTED static void forceDowngradeToVendorStability(const sp<IBinder>& binder); 86 LIBBINDER_EXPORTED static void forceDowngradeToSystemStability(const sp<IBinder>& binder); 93 LIBBINDER_EXPORTED static void markCompilationUnit(IBinder* binder); 100 LIBBINDER_EXPORTED static void markVintf(IBinder* binder); 103 LIBBINDER_EXPORTED static std::string debugToString(const sp<IBinder>& binder); 113 LIBBINDER_EXPORTED static void markVndk(IBinder* binder); 117 LIBBINDER_EXPORTED static bool requiresVintfDeclaration(const sp<IBinder>& binder); 130 static void tryMarkCompilationUnit(IBinder* binder); 147 static void forceDowngradeToStability(const sp<IBinder>& binder, Level level); [all …]
|
/frameworks/native/include/binder/ |
D | Stability.h | 58 LIBBINDER_EXPORTED static void forceDowngradeToLocalStability(const sp<IBinder>& binder); 80 LIBBINDER_EXPORTED static void forceDowngradeToVendorStability(const sp<IBinder>& binder); 86 LIBBINDER_EXPORTED static void forceDowngradeToSystemStability(const sp<IBinder>& binder); 93 LIBBINDER_EXPORTED static void markCompilationUnit(IBinder* binder); 100 LIBBINDER_EXPORTED static void markVintf(IBinder* binder); 103 LIBBINDER_EXPORTED static std::string debugToString(const sp<IBinder>& binder); 113 LIBBINDER_EXPORTED static void markVndk(IBinder* binder); 117 LIBBINDER_EXPORTED static bool requiresVintfDeclaration(const sp<IBinder>& binder); 130 static void tryMarkCompilationUnit(IBinder* binder); 147 static void forceDowngradeToStability(const sp<IBinder>& binder, Level level); [all …]
|
/frameworks/base/services/tests/mockingservicestests/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/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 getUpdatableNames(const std::string& apexName, [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BinderCallsStatsTest.java | 85 Binder binder = new Binder(); in testDetailedOff() local 86 CallSession callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOff() 98 assertEquals(binder.getClass(), callStatsList.get(0).binderClass); in testDetailedOff() 102 callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOff() 110 callSession = bcs.callStarted(binder, 2, WORKSOURCE_UID); in testDetailedOff() 126 Binder binder = new Binder(); in testDetailedOn() local 127 CallSession callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOn() 142 assertEquals(binder.getClass(), callStatsList.get(0).binderClass); in testDetailedOn() 145 callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID); in testDetailedOn() 155 callSession = bcs.callStarted(binder, 2, WORKSOURCE_UID); in testDetailedOn() [all …]
|