Loading include/android/imagedecoder.h +5 −0 Original line number Diff line number Diff line Loading @@ -739,6 +739,9 @@ int32_t AImageDecoder_getRepeatCount(AImageDecoder* _Nonnull decoder) * skipping frames in an image with such frames may not produce the correct * results. * * Only supported by {@link ANDROID_BITMAP_FORMAT_RGBA_8888} and * {@link ANDROID_BITMAP_FORMAT_RGBA_F16}. * * @param decoder an {@link AImageDecoder} object. * @return {@link ANDROID_IMAGE_DECODER_SUCCESS} on success or a value * indicating the reason for the failure. Loading @@ -747,6 +750,8 @@ int32_t AImageDecoder_getRepeatCount(AImageDecoder* _Nonnull decoder) * - {@link ANDROID_IMAGE_DECODER_BAD_PARAMETER}: The AImageDecoder * represents an image that is not animated (see * {@link AImageDecoder_isAnimated}) or the AImageDecoder is null. * - {@link ANDROID_IMAGE_DECODER_INVALID_STATE): The requested * {@link AndroidBitmapFormat} does not support animation. * - {@link ANDROID_IMAGE_DECODER_INCOMPLETE}: The input appears * to be truncated. The client must call {@link AImageDecoder_rewind} * before calling {@link AImageDecoder_decodeImage} again. Loading include/android/surface_control.h +5 −4 Original line number Diff line number Diff line Loading @@ -534,11 +534,12 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction, * * \param compatibility The frame rate compatibility of this surface. The compatibility value may * influence the system's choice of display frame rate. To specify a compatibility use the * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. This parameter is ignored when frameRate is 0. * * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless. * A seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. * \param changeFrameRateStrategy Whether display refresh rate transitions caused by this * surface should be seamless. A seamless transition is one that doesn't have any visual * interruptions, such as a black screen for a second or two. See the * ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. This parameter is ignored when frameRate is 0. * * Available since API level 31. */ Loading libs/binder/PermissionCache.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -109,5 +109,10 @@ bool PermissionCache::checkPermission( return granted; } void PermissionCache::purgeCache() { PermissionCache& pc(PermissionCache::getInstance()); pc.purge(); } // --------------------------------------------------------------------------- } // namespace android libs/binder/RpcConnection.cpp +15 −18 Original line number Diff line number Diff line Loading @@ -130,24 +130,21 @@ bool RpcConnection::addVsockClient(unsigned int cid, unsigned int port) { #endif // __BIONIC__ class SocketAddressImpl : public RpcConnection::SocketAddress { class InetSocketAddress : public RpcConnection::SocketAddress { public: SocketAddressImpl(const sockaddr* addr, size_t size, const String8& desc) : mAddr(addr), mSize(size), mDesc(desc) {} InetSocketAddress(const sockaddr* sockAddr, size_t size, const char* addr, unsigned int port) : mSockAddr(sockAddr), mSize(size), mAddr(addr), mPort(port) {} [[nodiscard]] std::string toString() const override { return std::string(mDesc.c_str(), mDesc.size()); return String8::format("%s:%u", mAddr, mPort).c_str(); } [[nodiscard]] const sockaddr* addr() const override { return mAddr; } [[nodiscard]] const sockaddr* addr() const override { return mSockAddr; } [[nodiscard]] size_t addrSize() const override { return mSize; } void set(const sockaddr* addr, size_t size) { mAddr = addr; mSize = size; } private: const sockaddr* mAddr = nullptr; size_t mSize = 0; String8 mDesc; const sockaddr* mSockAddr; size_t mSize; const char* mAddr; unsigned int mPort; }; AddrInfo GetAddrInfo(const char* addr, unsigned int port) { Loading @@ -170,14 +167,15 @@ AddrInfo GetAddrInfo(const char* addr, unsigned int port) { } bool RpcConnection::setupInetServer(unsigned int port) { auto aiStart = GetAddrInfo("127.0.0.1", port); const char* kAddr = "127.0.0.1"; auto aiStart = GetAddrInfo(kAddr, port); if (aiStart == nullptr) return false; SocketAddressImpl socketAddress(nullptr, 0, String8::format("127.0.0.1:%u", port)); for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) { socketAddress.set(ai->ai_addr, ai->ai_addrlen); InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, kAddr, port); if (setupSocketServer(socketAddress)) return true; } ALOGE("None of the socket address resolved for 127.0.0.1:%u can be set up as inet server.", ALOGE("None of the socket address resolved for %s:%u can be set up as inet server.", kAddr, port); return false; } Loading @@ -185,9 +183,8 @@ bool RpcConnection::setupInetServer(unsigned int port) { bool RpcConnection::addInetClient(const char* addr, unsigned int port) { auto aiStart = GetAddrInfo(addr, port); if (aiStart == nullptr) return false; SocketAddressImpl socketAddress(nullptr, 0, String8::format("%s:%u", addr, port)); for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) { socketAddress.set(ai->ai_addr, ai->ai_addrlen); InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, addr, port); if (addSocketClient(socketAddress)) return true; } ALOGE("None of the socket address resolved for %s:%u can be added as inet client.", addr, port); Loading libs/binder/include/binder/PermissionCache.h +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,8 @@ public: static bool checkPermission(const String16& permission, pid_t pid, uid_t uid); static void purgeCache(); }; // --------------------------------------------------------------------------- Loading Loading
include/android/imagedecoder.h +5 −0 Original line number Diff line number Diff line Loading @@ -739,6 +739,9 @@ int32_t AImageDecoder_getRepeatCount(AImageDecoder* _Nonnull decoder) * skipping frames in an image with such frames may not produce the correct * results. * * Only supported by {@link ANDROID_BITMAP_FORMAT_RGBA_8888} and * {@link ANDROID_BITMAP_FORMAT_RGBA_F16}. * * @param decoder an {@link AImageDecoder} object. * @return {@link ANDROID_IMAGE_DECODER_SUCCESS} on success or a value * indicating the reason for the failure. Loading @@ -747,6 +750,8 @@ int32_t AImageDecoder_getRepeatCount(AImageDecoder* _Nonnull decoder) * - {@link ANDROID_IMAGE_DECODER_BAD_PARAMETER}: The AImageDecoder * represents an image that is not animated (see * {@link AImageDecoder_isAnimated}) or the AImageDecoder is null. * - {@link ANDROID_IMAGE_DECODER_INVALID_STATE): The requested * {@link AndroidBitmapFormat} does not support animation. * - {@link ANDROID_IMAGE_DECODER_INCOMPLETE}: The input appears * to be truncated. The client must call {@link AImageDecoder_rewind} * before calling {@link AImageDecoder_decodeImage} again. Loading
include/android/surface_control.h +5 −4 Original line number Diff line number Diff line Loading @@ -534,11 +534,12 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction, * * \param compatibility The frame rate compatibility of this surface. The compatibility value may * influence the system's choice of display frame rate. To specify a compatibility use the * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. This parameter is ignored when frameRate is 0. * * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless. * A seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. * \param changeFrameRateStrategy Whether display refresh rate transitions caused by this * surface should be seamless. A seamless transition is one that doesn't have any visual * interruptions, such as a black screen for a second or two. See the * ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. This parameter is ignored when frameRate is 0. * * Available since API level 31. */ Loading
libs/binder/PermissionCache.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -109,5 +109,10 @@ bool PermissionCache::checkPermission( return granted; } void PermissionCache::purgeCache() { PermissionCache& pc(PermissionCache::getInstance()); pc.purge(); } // --------------------------------------------------------------------------- } // namespace android
libs/binder/RpcConnection.cpp +15 −18 Original line number Diff line number Diff line Loading @@ -130,24 +130,21 @@ bool RpcConnection::addVsockClient(unsigned int cid, unsigned int port) { #endif // __BIONIC__ class SocketAddressImpl : public RpcConnection::SocketAddress { class InetSocketAddress : public RpcConnection::SocketAddress { public: SocketAddressImpl(const sockaddr* addr, size_t size, const String8& desc) : mAddr(addr), mSize(size), mDesc(desc) {} InetSocketAddress(const sockaddr* sockAddr, size_t size, const char* addr, unsigned int port) : mSockAddr(sockAddr), mSize(size), mAddr(addr), mPort(port) {} [[nodiscard]] std::string toString() const override { return std::string(mDesc.c_str(), mDesc.size()); return String8::format("%s:%u", mAddr, mPort).c_str(); } [[nodiscard]] const sockaddr* addr() const override { return mAddr; } [[nodiscard]] const sockaddr* addr() const override { return mSockAddr; } [[nodiscard]] size_t addrSize() const override { return mSize; } void set(const sockaddr* addr, size_t size) { mAddr = addr; mSize = size; } private: const sockaddr* mAddr = nullptr; size_t mSize = 0; String8 mDesc; const sockaddr* mSockAddr; size_t mSize; const char* mAddr; unsigned int mPort; }; AddrInfo GetAddrInfo(const char* addr, unsigned int port) { Loading @@ -170,14 +167,15 @@ AddrInfo GetAddrInfo(const char* addr, unsigned int port) { } bool RpcConnection::setupInetServer(unsigned int port) { auto aiStart = GetAddrInfo("127.0.0.1", port); const char* kAddr = "127.0.0.1"; auto aiStart = GetAddrInfo(kAddr, port); if (aiStart == nullptr) return false; SocketAddressImpl socketAddress(nullptr, 0, String8::format("127.0.0.1:%u", port)); for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) { socketAddress.set(ai->ai_addr, ai->ai_addrlen); InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, kAddr, port); if (setupSocketServer(socketAddress)) return true; } ALOGE("None of the socket address resolved for 127.0.0.1:%u can be set up as inet server.", ALOGE("None of the socket address resolved for %s:%u can be set up as inet server.", kAddr, port); return false; } Loading @@ -185,9 +183,8 @@ bool RpcConnection::setupInetServer(unsigned int port) { bool RpcConnection::addInetClient(const char* addr, unsigned int port) { auto aiStart = GetAddrInfo(addr, port); if (aiStart == nullptr) return false; SocketAddressImpl socketAddress(nullptr, 0, String8::format("%s:%u", addr, port)); for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) { socketAddress.set(ai->ai_addr, ai->ai_addrlen); InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, addr, port); if (addSocketClient(socketAddress)) return true; } ALOGE("None of the socket address resolved for %s:%u can be added as inet client.", addr, port); Loading
libs/binder/include/binder/PermissionCache.h +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,8 @@ public: static bool checkPermission(const String16& permission, pid_t pid, uid_t uid); static void purgeCache(); }; // --------------------------------------------------------------------------- Loading