summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2016-05-13 17:44:16 +0100
committerMichael Wright <michaelwr@google.com>2016-06-04 02:20:21 +0100
commite051f6f1fdb5e21cbed394d29dfcab5c642e4129 (patch)
treee2123dbc463184c51e72e416a1363e14e1f9f233 /libs/input/PointerController.cpp
parentf5e5c3a72ac8d8ebd5cfbbdceb533a125190b610 (diff)
Rename PointerIcon and Pointer Capture APIs
This is a response to API council feedback. Bug: 26830970 Change-Id: I1be541a53e3943d06640169671824f7daea15462
Diffstat (limited to 'libs/input/PointerController.cpp')
-rw-r--r--libs/input/PointerController.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 212c6a0d2c3c..ad9e2d7b6e16 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -84,7 +84,7 @@ PointerController::PointerController(const sp<PointerControllerPolicyInterface>&
mLocked.pointerAlpha = 0.0f; // pointer is initially faded
mLocked.pointerSprite = mSpriteController->createSprite();
mLocked.pointerIconChanged = false;
- mLocked.requestedPointerShape = mPolicy->getDefaultPointerIconId();
+ mLocked.requestedPointerType = mPolicy->getDefaultPointerIconId();
mLocked.animationFrameIndex = 0;
mLocked.lastFrameUpdatedTime = 0;
@@ -459,10 +459,10 @@ void PointerController::setDisplayViewport(int32_t width, int32_t height, int32_
updatePointerLocked();
}
-void PointerController::updatePointerShape(int32_t iconId) {
+void PointerController::updatePointerIcon(int32_t iconId) {
AutoMutex _l(mLock);
- if (mLocked.requestedPointerShape != iconId) {
- mLocked.requestedPointerShape = iconId;
+ if (mLocked.requestedPointerType != iconId) {
+ mLocked.requestedPointerType = iconId;
mLocked.presentationChanged = true;
updatePointerLocked();
}
@@ -473,7 +473,7 @@ void PointerController::setCustomPointerIcon(const SpriteIcon& icon) {
const int32_t iconId = mPolicy->getCustomPointerIconId();
mLocked.additionalMouseResources[iconId] = icon;
- mLocked.requestedPointerShape = iconId;
+ mLocked.requestedPointerType = iconId;
mLocked.presentationChanged = true;
updatePointerLocked();
@@ -574,7 +574,7 @@ bool PointerController::doFadingAnimationLocked(nsecs_t timestamp) {
bool PointerController::doBitmapAnimationLocked(nsecs_t timestamp) {
std::map<int32_t, PointerAnimation>::const_iterator iter = mLocked.animationResources.find(
- mLocked.requestedPointerShape);
+ mLocked.requestedPointerType);
if (iter == mLocked.animationResources.end()) {
return false;
}
@@ -636,14 +636,14 @@ void PointerController::updatePointerLocked() {
if (mLocked.pointerIconChanged || mLocked.presentationChanged) {
if (mLocked.presentation == PRESENTATION_POINTER) {
- if (mLocked.requestedPointerShape == mPolicy->getDefaultPointerIconId()) {
+ if (mLocked.requestedPointerType == mPolicy->getDefaultPointerIconId()) {
mLocked.pointerSprite->setIcon(mLocked.pointerIcon);
} else {
std::map<int32_t, SpriteIcon>::const_iterator iter =
- mLocked.additionalMouseResources.find(mLocked.requestedPointerShape);
+ mLocked.additionalMouseResources.find(mLocked.requestedPointerType);
if (iter != mLocked.additionalMouseResources.end()) {
std::map<int32_t, PointerAnimation>::const_iterator anim_iter =
- mLocked.animationResources.find(mLocked.requestedPointerShape);
+ mLocked.animationResources.find(mLocked.requestedPointerType);
if (anim_iter != mLocked.animationResources.end()) {
mLocked.animationFrameIndex = 0;
mLocked.lastFrameUpdatedTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -651,7 +651,7 @@ void PointerController::updatePointerLocked() {
}
mLocked.pointerSprite->setIcon(iter->second);
} else {
- ALOGW("Can't find the resource for icon id %d", mLocked.requestedPointerShape);
+ ALOGW("Can't find the resource for icon id %d", mLocked.requestedPointerType);
mLocked.pointerSprite->setIcon(mLocked.pointerIcon);
}
}