Make public pointer icon API with custom icons.

BUG: 25778347, 23804184
Change-Id: If138b97c750c912e9848412c27b65004899961eb
This commit is contained in:
Jun Mukai
2015-10-30 15:54:33 -07:00
parent 40aa9f1b98
commit d4eaef7f4c
18 changed files with 269 additions and 165 deletions

View File

@@ -439,6 +439,17 @@ void PointerController::updatePointerShape(int32_t iconId) {
}
}
void PointerController::setCustomPointerIcon(const SpriteIcon& icon) {
AutoMutex _l(mLock);
const int32_t iconId = mPolicy->getCustomPointerIconId();
mLocked.additionalMouseResources[iconId] = icon;
mLocked.requestedPointerShape = iconId;
mLocked.presentationChanged = true;
updatePointerLocked();
}
void PointerController::handleMessage(const Message& message) {
switch (message.what) {
case MSG_INACTIVITY_TIMEOUT: