Address comments: Add setPointerIcon for PointerChoreographer

Test: atest inputflinger_tests
Bug: 293587049
Change-Id: I3305518ed00ce3d7dd24ac299c218562dcf7e78b
diff --git a/services/inputflinger/PointerChoreographer.cpp b/services/inputflinger/PointerChoreographer.cpp
index 78ece3b..07a5041 100644
--- a/services/inputflinger/PointerChoreographer.cpp
+++ b/services/inputflinger/PointerChoreographer.cpp
@@ -450,12 +450,13 @@
         DeviceId deviceId) {
     std::scoped_lock _l(mLock);
     if (deviceId < 0) {
-        ALOGW("Invalid device id %d. Cannot set pointer icon.", deviceId);
+        LOG(WARNING) << "Invalid device id " << deviceId << ". Cannot set pointer icon.";
         return false;
     }
     const InputDeviceInfo* info = findInputDeviceLocked(deviceId);
     if (!info) {
-        ALOGW("No input device info found for id %d. Cannot set pointer icon.", deviceId);
+        LOG(WARNING) << "No input device info found for id " << deviceId
+                     << ". Cannot set pointer icon.";
         return false;
     }
     const uint32_t sources = info->getSources();
@@ -485,12 +486,13 @@
                 mousePointerIt->second->updatePointerIcon(std::get<PointerIconStyle>(icon));
             }
         } else {
-            ALOGW("No mouse pointer controller found for display %d, device %d.", displayId,
-                  deviceId);
+            LOG(WARNING) << "No mouse pointer controller found for display " << displayId
+                         << ", device " << deviceId << ".";
             return false;
         }
     } else {
-        ALOGW("Cannot set pointer icon for display %d, device %d.", displayId, deviceId);
+        LOG(WARNING) << "Cannot set pointer icon for display " << displayId << ", device "
+                     << deviceId << ".";
         return false;
     }
     return true;
diff --git a/services/inputflinger/PointerChoreographer.h b/services/inputflinger/PointerChoreographer.h
index ce14adf..9b809a1 100644
--- a/services/inputflinger/PointerChoreographer.h
+++ b/services/inputflinger/PointerChoreographer.h
@@ -60,6 +60,11 @@
     virtual FloatPoint getMouseCursorPosition(int32_t displayId) = 0;
     virtual void setShowTouchesEnabled(bool enabled) = 0;
     virtual void setStylusPointerIconEnabled(bool enabled) = 0;
+    /**
+     * Set the icon that is shown for the given pointer. The request may fail in some cases, such
+     * as if the device or display was removed, or if the cursor was moved to a different display.
+     * Returns true if the icon was changed successfully, false otherwise.
+     */
     virtual bool setPointerIcon(std::variant<std::unique_ptr<SpriteIcon>, PointerIconStyle> icon,
                                 int32_t displayId, DeviceId deviceId) = 0;