binderwrapper: Resolve ambiguous base::Closure reference
Disambiguate between base and android::base namespaces. This matters when headers from libbase are indirectly included. Bug: 27804373 Test: Compiles in that referenced situation. Change-Id: Icb26595bb0013733aa8c03971c9f4a950c8b2ab1
This commit is contained in:
parent
22399089ef
commit
09910f4baa
5 changed files with 8 additions and 8 deletions
|
@ -70,7 +70,7 @@ class BinderWrapper {
|
|||
// is currently registered for |binder|, it will be replaced.
|
||||
virtual bool RegisterForDeathNotifications(
|
||||
const sp<IBinder>& binder,
|
||||
const base::Closure& callback) = 0;
|
||||
const ::base::Closure& callback) = 0;
|
||||
|
||||
// Unregisters the callback, if any, for |binder|.
|
||||
virtual bool UnregisterForDeathNotifications(const sp<IBinder>& binder) = 0;
|
||||
|
|
|
@ -98,7 +98,7 @@ class StubBinderWrapper : public BinderWrapper {
|
|||
const sp<IBinder>& binder) override;
|
||||
sp<BBinder> CreateLocalBinder() override;
|
||||
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
||||
const base::Closure& callback) override;
|
||||
const ::base::Closure& callback) override;
|
||||
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
||||
uid_t GetCallingUid() override;
|
||||
pid_t GetCallingPid() override;
|
||||
|
@ -119,7 +119,7 @@ class StubBinderWrapper : public BinderWrapper {
|
|||
|
||||
// Map from binder handle to the callback that should be invoked on binder
|
||||
// death.
|
||||
std::map<sp<IBinder>, base::Closure> death_callbacks_;
|
||||
std::map<sp<IBinder>, ::base::Closure> death_callbacks_;
|
||||
|
||||
// Values to return from GetCallingUid() and GetCallingPid();
|
||||
uid_t calling_uid_;
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace android {
|
|||
// be awkward.
|
||||
class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
|
||||
public:
|
||||
explicit DeathRecipient(const base::Closure& callback)
|
||||
explicit DeathRecipient(const ::base::Closure& callback)
|
||||
: callback_(callback) {}
|
||||
~DeathRecipient() = default;
|
||||
|
||||
|
@ -40,7 +40,7 @@ class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
|
|||
|
||||
private:
|
||||
// Callback to run in response to binder death.
|
||||
base::Closure callback_;
|
||||
::base::Closure callback_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DeathRecipient);
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ sp<BBinder> RealBinderWrapper::CreateLocalBinder() {
|
|||
|
||||
bool RealBinderWrapper::RegisterForDeathNotifications(
|
||||
const sp<IBinder>& binder,
|
||||
const base::Closure& callback) {
|
||||
const ::base::Closure& callback) {
|
||||
sp<DeathRecipient> recipient(new DeathRecipient(callback));
|
||||
if (binder->linkToDeath(recipient) != OK) {
|
||||
LOG(ERROR) << "Failed to register for death notifications on "
|
||||
|
|
|
@ -36,7 +36,7 @@ class RealBinderWrapper : public BinderWrapper {
|
|||
const sp<IBinder>& binder) override;
|
||||
sp<BBinder> CreateLocalBinder() override;
|
||||
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
||||
const base::Closure& callback) override;
|
||||
const ::base::Closure& callback) override;
|
||||
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
||||
uid_t GetCallingUid() override;
|
||||
pid_t GetCallingPid() override;
|
||||
|
|
|
@ -64,7 +64,7 @@ sp<BBinder> StubBinderWrapper::CreateLocalBinder() {
|
|||
|
||||
bool StubBinderWrapper::RegisterForDeathNotifications(
|
||||
const sp<IBinder>& binder,
|
||||
const base::Closure& callback) {
|
||||
const ::base::Closure& callback) {
|
||||
death_callbacks_[binder] = callback;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue