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

Commit f2514664 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge changes from topics "display-dump", "presentation-dump"

* changes:
  Add dump to DisplayInfo.
  Add ftl_last to PointerControllerInterface::Presentation
parents 324b35fc c9e53047
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -20,8 +20,13 @@
#include <gui/DisplayInfo.h>
#include <private/gui/ParcelUtils.h>

#include <android-base/stringprintf.h>
#include <log/log.h>

#include <inttypes.h>

#define INDENT "  "

namespace android::gui {

// --- DisplayInfo ---
@@ -67,4 +72,17 @@ status_t DisplayInfo::writeToParcel(android::Parcel* parcel) const {
    return OK;
}

void DisplayInfo::dump(std::string& out, const char* prefix) const {
    using android::base::StringAppendF;

    out += prefix;
    StringAppendF(&out, "DisplayViewport[id=%" PRId32 "]\n", displayId);
    out += prefix;
    StringAppendF(&out, INDENT "Width=%" PRId32 ", Height=%" PRId32 "\n", logicalWidth,
                  logicalHeight);
    std::string transformPrefix(prefix);
    transformPrefix.append(INDENT);
    transform.dump(out, "Transform", transformPrefix.c_str());
}

} // namespace android::gui
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ struct DisplayInfo : public Parcelable {
    status_t writeToParcel(android::Parcel*) const override;

    status_t readFromParcel(const android::Parcel*) override;

    void dump(std::string& result, const char* prefix = "") const;
};

} // namespace android::gui
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ public:
        POINTER,
        // Show spots and a spot anchor in place of the mouse pointer.
        SPOT,

        ftl_last = SPOT,
    };

    /* Sets the mode of the pointer controller. */