OSDN Git Service

Validate hotspot when loading PointerIcon from resource
authorVladislav Kaznacheev <kaznacheev@google.com>
Wed, 20 Dec 2017 20:18:03 +0000 (12:18 -0800)
committerVladislav Kaznacheev <kaznacheev@google.com>
Wed, 20 Dec 2017 20:18:03 +0000 (12:18 -0800)
commit44e7de3a2a3c3459c7004b392dd8de217c34aab0
tree346eeb1c14780a356ea31fdb97214a56564b932a
parent57365515d5d19574b37914adc321807f13d0caf5
Validate hotspot when loading PointerIcon from resource

Currently PointerIcon.load and PointerIcon.getSystemIcon do not
check if the hotspot position is within the bounds of the underlying
bitmap. The check is performed only in PointerIcon.createFromParcel
which is called in the system server process and the resulting
exception might be hard to trace to the root cause.

Bug: 70862454
Test: android.widget.cts.PointerIconTest
Change-Id: I7f19cc9fc60b7bf72ad53403c203087201a5810c
core/java/android/view/PointerIcon.java