Merge "binderwrapper: Resolve ambiguous base::Closure reference"
am: 979ce0e
* commit '979ce0e33827a9c5bb2b76b2e2557544f8eb0cce':
binderwrapper: Resolve ambiguous base::Closure reference
Change-Id: Iad3fbac9a0636e2ded698557c871ba00cf428276
This commit is contained in:
commit
b0144b5b99
5 changed files with 8 additions and 8 deletions
|
|
@ -70,7 +70,7 @@ class BinderWrapper {
|
||||||
// is currently registered for |binder|, it will be replaced.
|
// is currently registered for |binder|, it will be replaced.
|
||||||
virtual bool RegisterForDeathNotifications(
|
virtual bool RegisterForDeathNotifications(
|
||||||
const sp<IBinder>& binder,
|
const sp<IBinder>& binder,
|
||||||
const base::Closure& callback) = 0;
|
const ::base::Closure& callback) = 0;
|
||||||
|
|
||||||
// Unregisters the callback, if any, for |binder|.
|
// Unregisters the callback, if any, for |binder|.
|
||||||
virtual bool UnregisterForDeathNotifications(const sp<IBinder>& binder) = 0;
|
virtual bool UnregisterForDeathNotifications(const sp<IBinder>& binder) = 0;
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class StubBinderWrapper : public BinderWrapper {
|
||||||
const sp<IBinder>& binder) override;
|
const sp<IBinder>& binder) override;
|
||||||
sp<BBinder> CreateLocalBinder() override;
|
sp<BBinder> CreateLocalBinder() override;
|
||||||
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
||||||
const base::Closure& callback) override;
|
const ::base::Closure& callback) override;
|
||||||
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
||||||
uid_t GetCallingUid() override;
|
uid_t GetCallingUid() override;
|
||||||
pid_t GetCallingPid() 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
|
// Map from binder handle to the callback that should be invoked on binder
|
||||||
// death.
|
// death.
|
||||||
std::map<sp<IBinder>, base::Closure> death_callbacks_;
|
std::map<sp<IBinder>, ::base::Closure> death_callbacks_;
|
||||||
|
|
||||||
// Values to return from GetCallingUid() and GetCallingPid();
|
// Values to return from GetCallingUid() and GetCallingPid();
|
||||||
uid_t calling_uid_;
|
uid_t calling_uid_;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ namespace android {
|
||||||
// be awkward.
|
// be awkward.
|
||||||
class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
|
class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
|
||||||
public:
|
public:
|
||||||
explicit DeathRecipient(const base::Closure& callback)
|
explicit DeathRecipient(const ::base::Closure& callback)
|
||||||
: callback_(callback) {}
|
: callback_(callback) {}
|
||||||
~DeathRecipient() = default;
|
~DeathRecipient() = default;
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Callback to run in response to binder death.
|
// Callback to run in response to binder death.
|
||||||
base::Closure callback_;
|
::base::Closure callback_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(DeathRecipient);
|
DISALLOW_COPY_AND_ASSIGN(DeathRecipient);
|
||||||
};
|
};
|
||||||
|
|
@ -85,7 +85,7 @@ sp<BBinder> RealBinderWrapper::CreateLocalBinder() {
|
||||||
|
|
||||||
bool RealBinderWrapper::RegisterForDeathNotifications(
|
bool RealBinderWrapper::RegisterForDeathNotifications(
|
||||||
const sp<IBinder>& binder,
|
const sp<IBinder>& binder,
|
||||||
const base::Closure& callback) {
|
const ::base::Closure& callback) {
|
||||||
sp<DeathRecipient> recipient(new DeathRecipient(callback));
|
sp<DeathRecipient> recipient(new DeathRecipient(callback));
|
||||||
if (binder->linkToDeath(recipient) != OK) {
|
if (binder->linkToDeath(recipient) != OK) {
|
||||||
LOG(ERROR) << "Failed to register for death notifications on "
|
LOG(ERROR) << "Failed to register for death notifications on "
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class RealBinderWrapper : public BinderWrapper {
|
||||||
const sp<IBinder>& binder) override;
|
const sp<IBinder>& binder) override;
|
||||||
sp<BBinder> CreateLocalBinder() override;
|
sp<BBinder> CreateLocalBinder() override;
|
||||||
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
bool RegisterForDeathNotifications(const sp<IBinder>& binder,
|
||||||
const base::Closure& callback) override;
|
const ::base::Closure& callback) override;
|
||||||
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
|
||||||
uid_t GetCallingUid() override;
|
uid_t GetCallingUid() override;
|
||||||
pid_t GetCallingPid() override;
|
pid_t GetCallingPid() override;
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ sp<BBinder> StubBinderWrapper::CreateLocalBinder() {
|
||||||
|
|
||||||
bool StubBinderWrapper::RegisterForDeathNotifications(
|
bool StubBinderWrapper::RegisterForDeathNotifications(
|
||||||
const sp<IBinder>& binder,
|
const sp<IBinder>& binder,
|
||||||
const base::Closure& callback) {
|
const ::base::Closure& callback) {
|
||||||
death_callbacks_[binder] = callback;
|
death_callbacks_[binder] = callback;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue