Remove getButtonState/setButtonState from PointerController
These APIs are not being used. Bug: 217579815 Test: m libinputservice_test Change-Id: I47fb5478caff7d77217c1da600c37556e6a288a8
This commit is contained in:
@@ -53,8 +53,6 @@ MouseCursorController::MouseCursorController(PointerControllerContext& context)
|
||||
mLocked.resolvedPointerType = PointerIconStyle::TYPE_NOT_SPECIFIED;
|
||||
|
||||
mLocked.resourcesLoaded = false;
|
||||
|
||||
mLocked.buttonState = 0;
|
||||
}
|
||||
|
||||
MouseCursorController::~MouseCursorController() {
|
||||
@@ -95,22 +93,6 @@ void MouseCursorController::move(float deltaX, float deltaY) {
|
||||
setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY);
|
||||
}
|
||||
|
||||
void MouseCursorController::setButtonState(int32_t buttonState) {
|
||||
#if DEBUG_MOUSE_CURSOR_UPDATES
|
||||
ALOGD("Set button state 0x%08x", buttonState);
|
||||
#endif
|
||||
std::scoped_lock lock(mLock);
|
||||
|
||||
if (mLocked.buttonState != buttonState) {
|
||||
mLocked.buttonState = buttonState;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t MouseCursorController::getButtonState() const {
|
||||
std::scoped_lock lock(mLock);
|
||||
return mLocked.buttonState;
|
||||
}
|
||||
|
||||
void MouseCursorController::setPosition(float x, float y) {
|
||||
#if DEBUG_MOUSE_CURSOR_UPDATES
|
||||
ALOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y);
|
||||
|
||||
@@ -45,8 +45,6 @@ public:
|
||||
|
||||
std::optional<FloatRect> getBounds() const;
|
||||
void move(float deltaX, float deltaY);
|
||||
void setButtonState(int32_t buttonState);
|
||||
int32_t getButtonState() const;
|
||||
void setPosition(float x, float y);
|
||||
FloatPoint getPosition() const;
|
||||
int32_t getDisplayId() const;
|
||||
@@ -96,8 +94,6 @@ private:
|
||||
PointerIconStyle requestedPointerType;
|
||||
PointerIconStyle resolvedPointerType;
|
||||
|
||||
int32_t buttonState;
|
||||
|
||||
bool animating{false};
|
||||
|
||||
} mLocked GUARDED_BY(mLock);
|
||||
|
||||
@@ -136,14 +136,6 @@ void PointerController::move(float deltaX, float deltaY) {
|
||||
mCursorController.move(transformed.x, transformed.y);
|
||||
}
|
||||
|
||||
void PointerController::setButtonState(int32_t buttonState) {
|
||||
mCursorController.setButtonState(buttonState);
|
||||
}
|
||||
|
||||
int32_t PointerController::getButtonState() const {
|
||||
return mCursorController.getButtonState();
|
||||
}
|
||||
|
||||
void PointerController::setPosition(float x, float y) {
|
||||
const int32_t displayId = mCursorController.getDisplayId();
|
||||
vec2 transformed;
|
||||
|
||||
@@ -50,21 +50,19 @@ public:
|
||||
|
||||
~PointerController() override;
|
||||
|
||||
virtual std::optional<FloatRect> getBounds() const;
|
||||
virtual void move(float deltaX, float deltaY);
|
||||
virtual void setButtonState(int32_t buttonState);
|
||||
virtual int32_t getButtonState() const;
|
||||
virtual void setPosition(float x, float y);
|
||||
virtual FloatPoint getPosition() const;
|
||||
virtual int32_t getDisplayId() const;
|
||||
virtual void fade(Transition transition);
|
||||
virtual void unfade(Transition transition);
|
||||
virtual void setDisplayViewport(const DisplayViewport& viewport);
|
||||
std::optional<FloatRect> getBounds() const override;
|
||||
void move(float deltaX, float deltaY) override;
|
||||
void setPosition(float x, float y) override;
|
||||
FloatPoint getPosition() const override;
|
||||
int32_t getDisplayId() const override;
|
||||
void fade(Transition transition) override;
|
||||
void unfade(Transition transition) override;
|
||||
void setDisplayViewport(const DisplayViewport& viewport) override;
|
||||
|
||||
virtual void setPresentation(Presentation presentation);
|
||||
virtual void setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex,
|
||||
BitSet32 spotIdBits, int32_t displayId);
|
||||
virtual void clearSpots();
|
||||
void setPresentation(Presentation presentation) override;
|
||||
void setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex,
|
||||
BitSet32 spotIdBits, int32_t displayId) override;
|
||||
void clearSpots() override;
|
||||
|
||||
void updatePointerIcon(PointerIconStyle iconId);
|
||||
void setCustomPointerIcon(const SpriteIcon& icon);
|
||||
|
||||
Reference in New Issue
Block a user