Loading include/input/KeyCharacterMap.h +10 −14 Original line number Diff line number Diff line Loading @@ -26,9 +26,9 @@ #include <android-base/result.h> #include <input/Input.h> #include <utils/Errors.h> #include <utils/KeyedVector.h> #include <utils/Tokenizer.h> #include <utils/Unicode.h> #include <map> // Maximum number of keys supported by KeyCharacterMaps #define MAX_KEYS 8192 Loading Loading @@ -152,13 +152,9 @@ public: void writeToParcel(Parcel* parcel) const; #endif bool operator==(const KeyCharacterMap& other) const; bool operator==(const KeyCharacterMap& other) const = default; bool operator!=(const KeyCharacterMap& other) const; KeyCharacterMap(const KeyCharacterMap& other); virtual ~KeyCharacterMap(); KeyCharacterMap(const KeyCharacterMap& other) = default; private: struct Behavior { Loading @@ -173,17 +169,18 @@ private: /* The replacement keycode if the key has to be replaced outright. */ int32_t replacementKeyCode = 0; bool operator==(const Behavior&) const = default; }; struct Key { Key(); Key(const Key& other); bool operator==(const Key&) const = default; /* The single character label printed on the key, or 0 if none. */ char16_t label; char16_t label = 0; /* The number or symbol character generated by the key, or 0 if none. */ char16_t number; char16_t number = 0; /* The list of key behaviors sorted from most specific to least specific * meta key binding. */ Loading Loading @@ -218,7 +215,6 @@ private: public: Parser(KeyCharacterMap* map, Tokenizer* tokenizer, Format format); ~Parser(); status_t parse(); private: Loading @@ -232,8 +228,8 @@ private: status_t parseCharacterLiteral(char16_t* outCharacter); }; KeyedVector<int32_t, Key*> mKeys; KeyboardType mType; std::map<int32_t, Key> mKeys; KeyboardType mType = KeyboardType::UNKNOWN; std::string mLoadFileName; bool mLayoutOverlayApplied = false; Loading libs/binder/RpcState.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -928,7 +928,7 @@ processTransactInternalTailCall: transactionData.size() - offsetof(RpcWireTransaction, data)}; Span<const uint32_t> objectTableSpan; if (session->getProtocolVersion().value() > if (session->getProtocolVersion().value() >= RPC_WIRE_PROTOCOL_VERSION_RPC_HEADER_FEATURE_EXPLICIT_PARCEL_SIZE) { std::optional<Span<const uint8_t>> objectTableBytes = parcelSpan.splitOff(transaction->parcelDataSize); Loading libs/binder/include/binder/RpcSession.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,9 +37,9 @@ class RpcState; class RpcTransport; class FdTrigger; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_NEXT = 1; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_NEXT = 2; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL = 0xF0000000; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION = RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION = 1; // Starting with this version: // Loading libs/binder/tests/binderRpcWireProtocolTest.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -237,14 +237,25 @@ TEST(RpcWire, V0) { checkRepr(kCurrentRepr, 0); } TEST(RpcWire, V1) { checkRepr(kCurrentRepr, 1); } TEST(RpcWire, CurrentVersion) { checkRepr(kCurrentRepr, RPC_WIRE_PROTOCOL_VERSION); } static_assert(RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL, static_assert(RPC_WIRE_PROTOCOL_VERSION == 1, "If the binder wire protocol is updated, this test should test additional versions. " "The binder wire protocol should only be updated on upstream AOSP."); TEST(RpcWire, NextIsPlusOneReminder) { if (RPC_WIRE_PROTOCOL_VERSION != RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL) { EXPECT_EQ(RPC_WIRE_PROTOCOL_VERSION + 1, RPC_WIRE_PROTOCOL_VERSION_NEXT) << "Make sure to note what the next version should be."; } } TEST(RpcWire, ReleaseBranchHasFrozenRpcWireProtocol) { if (RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL) { EXPECT_FALSE(base::GetProperty("ro.build.version.codename", "") == "REL") Loading libs/gui/BufferQueueConsumer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <gui/BufferQueueCore.h> #include <gui/IConsumerListener.h> #include <gui/IProducerListener.h> #include <gui/TraceUtils.h> #include <private/gui/BufferQueueThreadState.h> #ifndef __ANDROID_VNDK__ Loading Loading @@ -646,7 +647,7 @@ status_t BufferQueueConsumer::setMaxBufferCount(int bufferCount) { status_t BufferQueueConsumer::setMaxAcquiredBufferCount( int maxAcquiredBuffers) { ATRACE_CALL(); ATRACE_FORMAT("%s(%d)", __func__, maxAcquiredBuffers); if (maxAcquiredBuffers < 1 || maxAcquiredBuffers > BufferQueueCore::MAX_MAX_ACQUIRED_BUFFERS) { Loading Loading
include/input/KeyCharacterMap.h +10 −14 Original line number Diff line number Diff line Loading @@ -26,9 +26,9 @@ #include <android-base/result.h> #include <input/Input.h> #include <utils/Errors.h> #include <utils/KeyedVector.h> #include <utils/Tokenizer.h> #include <utils/Unicode.h> #include <map> // Maximum number of keys supported by KeyCharacterMaps #define MAX_KEYS 8192 Loading Loading @@ -152,13 +152,9 @@ public: void writeToParcel(Parcel* parcel) const; #endif bool operator==(const KeyCharacterMap& other) const; bool operator==(const KeyCharacterMap& other) const = default; bool operator!=(const KeyCharacterMap& other) const; KeyCharacterMap(const KeyCharacterMap& other); virtual ~KeyCharacterMap(); KeyCharacterMap(const KeyCharacterMap& other) = default; private: struct Behavior { Loading @@ -173,17 +169,18 @@ private: /* The replacement keycode if the key has to be replaced outright. */ int32_t replacementKeyCode = 0; bool operator==(const Behavior&) const = default; }; struct Key { Key(); Key(const Key& other); bool operator==(const Key&) const = default; /* The single character label printed on the key, or 0 if none. */ char16_t label; char16_t label = 0; /* The number or symbol character generated by the key, or 0 if none. */ char16_t number; char16_t number = 0; /* The list of key behaviors sorted from most specific to least specific * meta key binding. */ Loading Loading @@ -218,7 +215,6 @@ private: public: Parser(KeyCharacterMap* map, Tokenizer* tokenizer, Format format); ~Parser(); status_t parse(); private: Loading @@ -232,8 +228,8 @@ private: status_t parseCharacterLiteral(char16_t* outCharacter); }; KeyedVector<int32_t, Key*> mKeys; KeyboardType mType; std::map<int32_t, Key> mKeys; KeyboardType mType = KeyboardType::UNKNOWN; std::string mLoadFileName; bool mLayoutOverlayApplied = false; Loading
libs/binder/RpcState.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -928,7 +928,7 @@ processTransactInternalTailCall: transactionData.size() - offsetof(RpcWireTransaction, data)}; Span<const uint32_t> objectTableSpan; if (session->getProtocolVersion().value() > if (session->getProtocolVersion().value() >= RPC_WIRE_PROTOCOL_VERSION_RPC_HEADER_FEATURE_EXPLICIT_PARCEL_SIZE) { std::optional<Span<const uint8_t>> objectTableBytes = parcelSpan.splitOff(transaction->parcelDataSize); Loading
libs/binder/include/binder/RpcSession.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,9 +37,9 @@ class RpcState; class RpcTransport; class FdTrigger; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_NEXT = 1; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_NEXT = 2; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL = 0xF0000000; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION = RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL; constexpr uint32_t RPC_WIRE_PROTOCOL_VERSION = 1; // Starting with this version: // Loading
libs/binder/tests/binderRpcWireProtocolTest.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -237,14 +237,25 @@ TEST(RpcWire, V0) { checkRepr(kCurrentRepr, 0); } TEST(RpcWire, V1) { checkRepr(kCurrentRepr, 1); } TEST(RpcWire, CurrentVersion) { checkRepr(kCurrentRepr, RPC_WIRE_PROTOCOL_VERSION); } static_assert(RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL, static_assert(RPC_WIRE_PROTOCOL_VERSION == 1, "If the binder wire protocol is updated, this test should test additional versions. " "The binder wire protocol should only be updated on upstream AOSP."); TEST(RpcWire, NextIsPlusOneReminder) { if (RPC_WIRE_PROTOCOL_VERSION != RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL) { EXPECT_EQ(RPC_WIRE_PROTOCOL_VERSION + 1, RPC_WIRE_PROTOCOL_VERSION_NEXT) << "Make sure to note what the next version should be."; } } TEST(RpcWire, ReleaseBranchHasFrozenRpcWireProtocol) { if (RPC_WIRE_PROTOCOL_VERSION == RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL) { EXPECT_FALSE(base::GetProperty("ro.build.version.codename", "") == "REL") Loading
libs/gui/BufferQueueConsumer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <gui/BufferQueueCore.h> #include <gui/IConsumerListener.h> #include <gui/IProducerListener.h> #include <gui/TraceUtils.h> #include <private/gui/BufferQueueThreadState.h> #ifndef __ANDROID_VNDK__ Loading Loading @@ -646,7 +647,7 @@ status_t BufferQueueConsumer::setMaxBufferCount(int bufferCount) { status_t BufferQueueConsumer::setMaxAcquiredBufferCount( int maxAcquiredBuffers) { ATRACE_CALL(); ATRACE_FORMAT("%s(%d)", __func__, maxAcquiredBuffers); if (maxAcquiredBuffers < 1 || maxAcquiredBuffers > BufferQueueCore::MAX_MAX_ACQUIRED_BUFFERS) { Loading