diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/Android.bp | 37 | ||||
| -rw-r--r-- | libs/binder/IBatteryStats.cpp | 2 | ||||
| -rw-r--r-- | libs/binder/include_batterystats/batterystats/IBatteryStats.h (renamed from libs/binder/include/binder/IBatteryStats.h) | 0 | ||||
| -rw-r--r-- | libs/binder/ndk/include_platform/android/binder_manager.h | 8 | ||||
| -rw-r--r-- | libs/binder/ndk/include_platform/android/binder_stability.h | 6 |
5 files changed, 41 insertions, 12 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index 0bce6f7692..728a8c4376 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -58,13 +58,13 @@ cc_library_headers { // transport itself and should be moved to AIDL or in domain-specific libs. // // Currently, these are only on system android (not vendor, not host) +// TODO(b/183654927) - move these into separate libraries libbinder_device_interface_sources = [ "ActivityManager.cpp", "AppOpsManager.cpp", "IActivityManager.cpp", "IAppOpsCallback.cpp", "IAppOpsService.cpp", - "IBatteryStats.cpp", "IMediaResourceMonitor.cpp", "IPermissionController.cpp", "IProcessInfoService.cpp", @@ -73,6 +73,7 @@ libbinder_device_interface_sources = [ "PermissionController.cpp", "ProcessInfoService.cpp", "IpPrefix.cpp", + ":activity_manager_procstate_aidl", ] cc_library { @@ -133,6 +134,7 @@ cc_library { "Status.cpp", "TextOutput.cpp", "Utils.cpp", + ":packagemanager_aidl", ":libbinder_aidl", ], @@ -234,9 +236,6 @@ cc_library { filegroup { name: "libbinder_aidl", srcs: [ - "aidl/android/content/pm/IPackageChangeObserver.aidl", - "aidl/android/content/pm/IPackageManagerNative.aidl", - "aidl/android/content/pm/PackageChangeEvent.aidl", "aidl/android/os/IClientCallback.aidl", "aidl/android/os/IServiceCallback.aidl", "aidl/android/os/IServiceManager.aidl", @@ -245,6 +244,16 @@ filegroup { path: "aidl", } +filegroup { + name: "packagemanager_aidl", + srcs: [ + "aidl/android/content/pm/IPackageChangeObserver.aidl", + "aidl/android/content/pm/IPackageManagerNative.aidl", + "aidl/android/content/pm/PackageChangeEvent.aidl", + ], + path: "aidl", +} + aidl_interface { name: "libbinder_aidl_test_stub", unstable: true, @@ -257,3 +266,23 @@ aidl_interface { }, }, } + +// libbinder historically contained additional interfaces that provided specific +// functionality in the platform but have nothing to do with binder itself. These +// are moved out of libbinder in order to avoid the overhead of their vtables. +// If you are working on or own one of these interfaces, the responsible things +// to would be: +// - give them a new home +// - convert them to AIDL instead of having manually written parceling code + +cc_library { + name: "libbatterystats_aidl", + srcs: [ + "IBatteryStats.cpp", + ], + export_include_dirs: ["include_batterystats"], + shared_libs: [ + "libbinder", + "libutils", + ], +} diff --git a/libs/binder/IBatteryStats.cpp b/libs/binder/IBatteryStats.cpp index d0085dfa45..0de804c3c2 100644 --- a/libs/binder/IBatteryStats.cpp +++ b/libs/binder/IBatteryStats.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include <binder/IBatteryStats.h> +#include <batterystats/IBatteryStats.h> #include <utils/Log.h> #include <binder/Parcel.h> diff --git a/libs/binder/include/binder/IBatteryStats.h b/libs/binder/include_batterystats/batterystats/IBatteryStats.h index 6defc7fb0b..6defc7fb0b 100644 --- a/libs/binder/include/binder/IBatteryStats.h +++ b/libs/binder/include_batterystats/batterystats/IBatteryStats.h diff --git a/libs/binder/ndk/include_platform/android/binder_manager.h b/libs/binder/ndk/include_platform/android/binder_manager.h index 0668472240..55169140df 100644 --- a/libs/binder/ndk/include_platform/android/binder_manager.h +++ b/libs/binder/ndk/include_platform/android/binder_manager.h @@ -26,7 +26,7 @@ __BEGIN_DECLS * This registers the service with the default service manager under this instance name. This does * not take ownership of binder. * - * WARNING: when using this API across an APEX boundary, it should only be used with stable + * WARNING: when using this API across an APEX boundary, do not use with unstable * AIDL services. TODO(b/139325195) * * \param binder object to register globally with the service manager. @@ -42,7 +42,7 @@ __attribute__((warn_unused_result)) binder_exception_t AServiceManager_addServic * service is not available This also implicitly calls AIBinder_incStrong (so the caller of this * function is responsible for calling AIBinder_decStrong). * - * WARNING: when using this API across an APEX boundary, it should only be used with stable + * WARNING: when using this API across an APEX boundary, do not use with unstable * AIDL services. TODO(b/139325195) * * \param instance identifier of the service used to lookup the service. @@ -54,7 +54,7 @@ __attribute__((warn_unused_result)) AIBinder* AServiceManager_checkService(const * it. This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible * for calling AIBinder_decStrong). * - * WARNING: when using this API across an APEX boundary, it should only be used with stable + * WARNING: when using this API across an APEX boundary, do not use with unstable * AIDL services. TODO(b/139325195) * * \param instance identifier of the service used to lookup the service. @@ -87,7 +87,7 @@ binder_status_t AServiceManager_registerLazyService(AIBinder* binder, const char * This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible * for calling AIBinder_decStrong). * - * WARNING: when using this API across an APEX boundary, it should only be used with stable + * WARNING: when using this API across an APEX boundary, do not use with unstable * AIDL services. TODO(b/139325195) * * \param instance identifier of the service used to lookup the service. diff --git a/libs/binder/ndk/include_platform/android/binder_stability.h b/libs/binder/ndk/include_platform/android/binder_stability.h index f5e8bf60ef..ce7255e174 100644 --- a/libs/binder/ndk/include_platform/android/binder_stability.h +++ b/libs/binder/ndk/include_platform/android/binder_stability.h @@ -30,7 +30,7 @@ enum { FLAG_PRIVATE_VENDOR = 0x10000000, }; -#if defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) +#if defined(__ANDROID_VENDOR__) enum { FLAG_PRIVATE_LOCAL = FLAG_PRIVATE_VENDOR, @@ -45,7 +45,7 @@ static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { AIBinder_markVendorStability(binder); } -#else // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) +#else // defined(__ANDROID_VENDOR__) enum { FLAG_PRIVATE_LOCAL = 0, @@ -62,7 +62,7 @@ static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) { AIBinder_markSystemStability(binder); } -#endif // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__) +#endif // defined(__ANDROID_VENDOR__) /** * This interface has system<->vendor stability |