diff options
| -rw-r--r-- | libs/binder/ndk/include_ndk/android/binder_auto_utils.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h index 80773f36be..c6868b07ef 100644 --- a/libs/binder/ndk/include_ndk/android/binder_auto_utils.h +++ b/libs/binder/ndk/include_ndk/android/binder_auto_utils.h @@ -109,6 +109,8 @@ class SpAIBinder { AIBinder* mBinder = nullptr; }; +namespace impl { + /** * This baseclass owns a single object, used to make various classes RAII. */ @@ -169,10 +171,12 @@ class ScopedAResource { T mT; }; +} // namespace impl + /** * Convenience wrapper. See AParcel. */ -class ScopedAParcel : public ScopedAResource<AParcel*, void, AParcel_delete, nullptr> { +class ScopedAParcel : public impl::ScopedAResource<AParcel*, void, AParcel_delete, nullptr> { public: /** * Takes ownership of a. @@ -185,7 +189,7 @@ class ScopedAParcel : public ScopedAResource<AParcel*, void, AParcel_delete, nul /** * Convenience wrapper. See AStatus. */ -class ScopedAStatus : public ScopedAResource<AStatus*, void, AStatus_delete, nullptr> { +class ScopedAStatus : public impl::ScopedAResource<AStatus*, void, AStatus_delete, nullptr> { public: /** * Takes ownership of a. @@ -209,8 +213,8 @@ class ScopedAStatus : public ScopedAResource<AStatus*, void, AStatus_delete, nul * Convenience wrapper. See AIBinder_DeathRecipient. */ class ScopedAIBinder_DeathRecipient - : public ScopedAResource<AIBinder_DeathRecipient*, void, AIBinder_DeathRecipient_delete, - nullptr> { + : public impl::ScopedAResource<AIBinder_DeathRecipient*, void, AIBinder_DeathRecipient_delete, + nullptr> { public: /** * Takes ownership of a. @@ -225,7 +229,7 @@ class ScopedAIBinder_DeathRecipient * Convenience wrapper. See AIBinder_Weak. */ class ScopedAIBinder_Weak - : public ScopedAResource<AIBinder_Weak*, void, AIBinder_Weak_delete, nullptr> { + : public impl::ScopedAResource<AIBinder_Weak*, void, AIBinder_Weak_delete, nullptr> { public: /** * Takes ownership of a. @@ -243,7 +247,7 @@ class ScopedAIBinder_Weak /** * Convenience wrapper for a file descriptor. */ -class ScopedFileDescriptor : public ScopedAResource<int, int, close, -1> { +class ScopedFileDescriptor : public impl::ScopedAResource<int, int, close, -1> { public: /** * Takes ownership of a. |