Add dump for PointerController.
Just a simple dump to start, but start pushing more PointerController information into bugreports. Bug: 254277939 Test: manually inspect `dumpsys input` Change-Id: I7ca637aa8a8f1cc1188eddcf694f7c4aea7d5821
This commit is contained in:
@@ -22,10 +22,17 @@
|
||||
#include <SkBlendMode.h>
|
||||
#include <SkCanvas.h>
|
||||
#include <SkColor.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/thread_annotations.h>
|
||||
#include <ftl/enum.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include "PointerControllerContext.h"
|
||||
|
||||
#define INDENT " "
|
||||
#define INDENT2 " "
|
||||
|
||||
namespace android {
|
||||
|
||||
namespace {
|
||||
@@ -313,4 +320,12 @@ const ui::Transform& PointerController::getTransformForDisplayLocked(int display
|
||||
return it != di.end() ? it->transform : kIdentityTransform;
|
||||
}
|
||||
|
||||
void PointerController::dump(std::string& dump) {
|
||||
dump += INDENT "PointerController:\n";
|
||||
std::scoped_lock lock(getLock());
|
||||
dump += StringPrintf(INDENT2 "Presentation: %s\n",
|
||||
ftl::enum_string(mLocked.presentation).c_str());
|
||||
dump += StringPrintf(INDENT2 "Pointer Display ID: %" PRIu32 "\n", mLocked.pointerDisplayId);
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
|
||||
Reference in New Issue
Block a user