Loading include/input/DisplayViewport.h +3 −3 Original line number Diff line number Diff line Loading @@ -130,9 +130,9 @@ struct DisplayViewport { "isActive=[%d]", ftl::enum_string(type).c_str(), displayId, uniqueId.c_str(), physicalPort ? ftl::to_string(*physicalPort).c_str() : "<none>", orientation, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); static_cast<int>(orientation), logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); } }; Loading include/input/PrintTools.h +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <map> #include <optional> #include <set> #include <sstream> #include <string> #include <vector> Loading @@ -33,6 +34,13 @@ std::string bitsetToString(const std::bitset<N>& bitset) { return bitset.to_string(); } template <class T> std::string streamableToString(const T& streamable) { std::stringstream out; out << streamable; return out.str(); } template <typename T> inline std::string constToString(const T& v) { return std::to_string(v); Loading libs/binder/rust/libbinder_ndk_bindgen_flags.txt +13 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,17 @@ --allowlist-type=AIBinder_DeathRecipient --allowlist-type=AParcel --allowlist-type=binder_status_t --blocklist-function="vprintf" --blocklist-function="strtold" --blocklist-function="_vtlog" --blocklist-function="vscanf" --blocklist-function="vfprintf_worker" --blocklist-function="vsprintf" --blocklist-function="vsnprintf" --blocklist-function="vsnprintf_filtered" --blocklist-function="vfscanf" --blocklist-function="vsscanf" --blocklist-function="vdprintf" --blocklist-function="vasprintf" --blocklist-function="strtold_l" --allowlist-function=.* libs/gui/SurfaceComposerClient.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -2782,9 +2782,16 @@ status_t SurfaceComposerClient::getHdrOutputConversionSupport(bool* isSupported) return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setOverrideFrameRate(uid_t uid, float frameRate) { status_t SurfaceComposerClient::setGameModeFrameRateOverride(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setOverrideFrameRate(uid, frameRate); ComposerServiceAIDL::getComposerService()->setGameModeFrameRateOverride(uid, frameRate); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setGameDefaultFrameRateOverride(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setGameDefaultFrameRateOverride(uid, frameRate); return statusTFromBinderStatus(status); } Loading libs/gui/WindowInfo.cpp +55 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,41 @@ namespace android::gui { namespace { std::ostream& operator<<(std::ostream& out, const sp<IBinder>& binder) { if (binder == nullptr) { out << "<null>"; } else { out << binder.get(); } return out; } std::ostream& operator<<(std::ostream& out, const Region& region) { if (region.isEmpty()) { out << "<empty>"; return out; } bool first = true; Region::const_iterator cur = region.begin(); Region::const_iterator const tail = region.end(); while (cur != tail) { if (first) { first = false; } else { out << "|"; } out << "[" << cur->left << "," << cur->top << "][" << cur->right << "," << cur->bottom << "]"; cur++; } return out; } } // namespace void WindowInfo::setInputConfig(ftl::Flags<InputConfig> config, bool value) { if (value) { inputConfig |= config; Loading Loading @@ -222,4 +257,24 @@ sp<IBinder> WindowInfoHandle::getToken() const { void WindowInfoHandle::updateFrom(sp<WindowInfoHandle> handle) { mInfo = handle->mInfo; } std::ostream& operator<<(std::ostream& out, const WindowInfoHandle& window) { const WindowInfo& info = *window.getInfo(); std::string transform; info.transform.dump(transform, "transform", " "); out << "name=" << info.name << ", id=" << info.id << ", displayId=" << info.displayId << ", inputConfig=" << info.inputConfig.string() << ", alpha=" << info.alpha << ", frame=[" << info.frame.left << "," << info.frame.top << "][" << info.frame.right << "," << info.frame.bottom << "], globalScale=" << info.globalScaleFactor << ", applicationInfo.name=" << info.applicationInfo.name << ", applicationInfo.token=" << info.applicationInfo.token << ", touchableRegion=" << info.touchableRegion << ", ownerPid=" << info.ownerPid.toString() << ", ownerUid=" << info.ownerUid.toString() << ", dispatchingTimeout=" << std::chrono::duration_cast<std::chrono::milliseconds>(info.dispatchingTimeout).count() << "ms, token=" << info.token.get() << ", touchOcclusionMode=" << ftl::enum_string(info.touchOcclusionMode) << "\n" << transform; return out; } } // namespace android::gui Loading
include/input/DisplayViewport.h +3 −3 Original line number Diff line number Diff line Loading @@ -130,9 +130,9 @@ struct DisplayViewport { "isActive=[%d]", ftl::enum_string(type).c_str(), displayId, uniqueId.c_str(), physicalPort ? ftl::to_string(*physicalPort).c_str() : "<none>", orientation, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); static_cast<int>(orientation), logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); } }; Loading
include/input/PrintTools.h +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <map> #include <optional> #include <set> #include <sstream> #include <string> #include <vector> Loading @@ -33,6 +34,13 @@ std::string bitsetToString(const std::bitset<N>& bitset) { return bitset.to_string(); } template <class T> std::string streamableToString(const T& streamable) { std::stringstream out; out << streamable; return out.str(); } template <typename T> inline std::string constToString(const T& v) { return std::to_string(v); Loading
libs/binder/rust/libbinder_ndk_bindgen_flags.txt +13 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,17 @@ --allowlist-type=AIBinder_DeathRecipient --allowlist-type=AParcel --allowlist-type=binder_status_t --blocklist-function="vprintf" --blocklist-function="strtold" --blocklist-function="_vtlog" --blocklist-function="vscanf" --blocklist-function="vfprintf_worker" --blocklist-function="vsprintf" --blocklist-function="vsnprintf" --blocklist-function="vsnprintf_filtered" --blocklist-function="vfscanf" --blocklist-function="vsscanf" --blocklist-function="vdprintf" --blocklist-function="vasprintf" --blocklist-function="strtold_l" --allowlist-function=.*
libs/gui/SurfaceComposerClient.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -2782,9 +2782,16 @@ status_t SurfaceComposerClient::getHdrOutputConversionSupport(bool* isSupported) return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setOverrideFrameRate(uid_t uid, float frameRate) { status_t SurfaceComposerClient::setGameModeFrameRateOverride(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setOverrideFrameRate(uid, frameRate); ComposerServiceAIDL::getComposerService()->setGameModeFrameRateOverride(uid, frameRate); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setGameDefaultFrameRateOverride(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setGameDefaultFrameRateOverride(uid, frameRate); return statusTFromBinderStatus(status); } Loading
libs/gui/WindowInfo.cpp +55 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,41 @@ namespace android::gui { namespace { std::ostream& operator<<(std::ostream& out, const sp<IBinder>& binder) { if (binder == nullptr) { out << "<null>"; } else { out << binder.get(); } return out; } std::ostream& operator<<(std::ostream& out, const Region& region) { if (region.isEmpty()) { out << "<empty>"; return out; } bool first = true; Region::const_iterator cur = region.begin(); Region::const_iterator const tail = region.end(); while (cur != tail) { if (first) { first = false; } else { out << "|"; } out << "[" << cur->left << "," << cur->top << "][" << cur->right << "," << cur->bottom << "]"; cur++; } return out; } } // namespace void WindowInfo::setInputConfig(ftl::Flags<InputConfig> config, bool value) { if (value) { inputConfig |= config; Loading Loading @@ -222,4 +257,24 @@ sp<IBinder> WindowInfoHandle::getToken() const { void WindowInfoHandle::updateFrom(sp<WindowInfoHandle> handle) { mInfo = handle->mInfo; } std::ostream& operator<<(std::ostream& out, const WindowInfoHandle& window) { const WindowInfo& info = *window.getInfo(); std::string transform; info.transform.dump(transform, "transform", " "); out << "name=" << info.name << ", id=" << info.id << ", displayId=" << info.displayId << ", inputConfig=" << info.inputConfig.string() << ", alpha=" << info.alpha << ", frame=[" << info.frame.left << "," << info.frame.top << "][" << info.frame.right << "," << info.frame.bottom << "], globalScale=" << info.globalScaleFactor << ", applicationInfo.name=" << info.applicationInfo.name << ", applicationInfo.token=" << info.applicationInfo.token << ", touchableRegion=" << info.touchableRegion << ", ownerPid=" << info.ownerPid.toString() << ", ownerUid=" << info.ownerUid.toString() << ", dispatchingTimeout=" << std::chrono::duration_cast<std::chrono::milliseconds>(info.dispatchingTimeout).count() << "ms, token=" << info.token.get() << ", touchOcclusionMode=" << ftl::enum_string(info.touchOcclusionMode) << "\n" << transform; return out; } } // namespace android::gui