diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2021-01-08 00:59:53 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-01-08 00:59:53 +0000 |
commit | a3907312f47a904c563d806bc05d7ddda7d3d753 (patch) | |
tree | d375f0fc18eeca6cc8ecf17701928c00f2a1e7c8 | |
parent | 4beaf18565f8ee664387b4aaffba541772af69f8 (diff) | |
parent | ab6ce8b0648834bd11752d868f2fbb3a022b5a7f (diff) | |
download | ndk-release-r21.tar.gz |
Merge "Merge cherrypicks of [1543567, 1543568, 1543569, 1543744, 1543745, 1543764, 1543312, 1543570] into ndk-release-r21" into ndk-release-r21ndk-r21endk-release-r21
9 files changed, 21 insertions, 4 deletions
diff --git a/platform/sysroot/usr/include/aaudio/AAudio.h b/platform/sysroot/usr/include/aaudio/AAudio.h index a47f189a9..7aaf908a2 100644 --- a/platform/sysroot/usr/include/aaudio/AAudio.h +++ b/platform/sysroot/usr/include/aaudio/AAudio.h @@ -29,6 +29,8 @@ #ifndef AAUDIO_AAUDIO_H #define AAUDIO_AAUDIO_H +#include <stdbool.h> +#include <stdint.h> #include <time.h> #ifdef __cplusplus diff --git a/platform/sysroot/usr/include/android/NeuralNetworks.h b/platform/sysroot/usr/include/android/NeuralNetworks.h index 8911eaf52..35658ff38 100644 --- a/platform/sysroot/usr/include/android/NeuralNetworks.h +++ b/platform/sysroot/usr/include/android/NeuralNetworks.h @@ -43,6 +43,7 @@ */ #include <android/hardware_buffer.h> +#include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <sys/cdefs.h> diff --git a/platform/sysroot/usr/include/android/binder_ibinder.h b/platform/sysroot/usr/include/android/binder_ibinder.h index 4560f222c..13dbec182 100644 --- a/platform/sysroot/usr/include/android/binder_ibinder.h +++ b/platform/sysroot/usr/include/android/binder_ibinder.h @@ -26,6 +26,7 @@ #pragma once +#include <stdbool.h> #include <stdint.h> #include <sys/cdefs.h> #include <sys/types.h> diff --git a/platform/sysroot/usr/include/android/binder_interface_utils.h b/platform/sysroot/usr/include/android/binder_interface_utils.h index 33e458613..f44ce0c63 100644 --- a/platform/sysroot/usr/include/android/binder_interface_utils.h +++ b/platform/sysroot/usr/include/android/binder_interface_utils.h @@ -88,13 +88,21 @@ class SharedRefBase { static void operator delete(void* p) { std::free(p); } - private: - std::once_flag mFlagThis; - std::weak_ptr<SharedRefBase> mThis; - + // Once minSdkVersion is 30, we are guaranteed to be building with the + // Android 11 AIDL compiler which supports the SharedRefBase::make API. + // // Use 'SharedRefBase::make<T>(...)' to make. SharedRefBase has implicit // ownership. Making this operator private to avoid double-ownership. +#if !defined(__ANDROID_API__) || __ANDROID_API__ >= 30 + private: +#else + [[deprecated("Prefer SharedRefBase::make<T>(...) if possible.")]] +#endif static void* operator new(size_t s) { return std::malloc(s); } + + private: + std::once_flag mFlagThis; + std::weak_ptr<SharedRefBase> mThis; }; /** diff --git a/platform/sysroot/usr/include/android/binder_parcel.h b/platform/sysroot/usr/include/android/binder_parcel.h index 86b75b8c6..a031e2973 100644 --- a/platform/sysroot/usr/include/android/binder_parcel.h +++ b/platform/sysroot/usr/include/android/binder_parcel.h @@ -26,6 +26,7 @@ #pragma once +#include <stdbool.h> #include <stddef.h> #include <sys/cdefs.h> diff --git a/platform/sysroot/usr/include/android/binder_status.h b/platform/sysroot/usr/include/android/binder_status.h index ab9a144c5..3a55f9480 100644 --- a/platform/sysroot/usr/include/android/binder_status.h +++ b/platform/sysroot/usr/include/android/binder_status.h @@ -26,6 +26,7 @@ #pragma once #include <errno.h> +#include <stdbool.h> #include <stdint.h> #include <sys/cdefs.h> diff --git a/platform/sysroot/usr/include/camera/NdkCameraMetadata.h b/platform/sysroot/usr/include/camera/NdkCameraMetadata.h index 072bb0249..a840bd19d 100644 --- a/platform/sysroot/usr/include/camera/NdkCameraMetadata.h +++ b/platform/sysroot/usr/include/camera/NdkCameraMetadata.h @@ -36,6 +36,7 @@ #ifndef _NDK_CAMERA_METADATA_H #define _NDK_CAMERA_METADATA_H +#include <stdbool.h> #include <stdint.h> #include <sys/cdefs.h> diff --git a/platform/sysroot/usr/include/media/NdkMediaExtractor.h b/platform/sysroot/usr/include/media/NdkMediaExtractor.h index 14319c424..a1cd9e360 100644 --- a/platform/sysroot/usr/include/media/NdkMediaExtractor.h +++ b/platform/sysroot/usr/include/media/NdkMediaExtractor.h @@ -36,6 +36,7 @@ #ifndef _NDK_MEDIA_EXTRACTOR_H #define _NDK_MEDIA_EXTRACTOR_H +#include <stdbool.h> #include <sys/cdefs.h> #include <sys/types.h> diff --git a/platform/sysroot/usr/include/media/NdkMediaFormat.h b/platform/sysroot/usr/include/media/NdkMediaFormat.h index 49d8b4a6a..f861a7272 100644 --- a/platform/sysroot/usr/include/media/NdkMediaFormat.h +++ b/platform/sysroot/usr/include/media/NdkMediaFormat.h @@ -36,6 +36,7 @@ #ifndef _NDK_MEDIA_FORMAT_H #define _NDK_MEDIA_FORMAT_H +#include <stdbool.h> #include <sys/cdefs.h> #include <sys/types.h> |