Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87fd51e3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11206181 from 3dfc1735 to 24Q1-release

Change-Id: I31c67e691390d6c079b7aa4aadc704b98d48bb66
parents 4d37daed 3dfc1735
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);
    }
};

+8 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <map>
#include <optional>
#include <set>
#include <sstream>
#include <string>
#include <vector>

@@ -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);
+13 −0
Original line number Diff line number Diff line
@@ -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=.*
+9 −2
Original line number Diff line number Diff line
@@ -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);
}

+55 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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