diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index 063a08d1397f3..7dcad68616692 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -149,9 +149,9 @@ public final class PointerIcon implements Parcelable {
* Creates a custom pointer from the given bitmap and hotspot information.
*
* @param bitmap The bitmap for the icon.
- * @param hotspotX The X offset of the pointer icon hotspot in the bitmap.
+ * @param hotSpotX The X offset of the pointer icon hotspot in the bitmap.
* Must be within the [0, bitmap.getWidth()) range.
- * @param hotspotY The Y offset of the pointer icon hotspot in the bitmap.
+ * @param hotSpotY The Y offset of the pointer icon hotspot in the bitmap.
* Must be within the [0, bitmap.getHeight()) range.
* @return A pointer icon for this bitmap.
*
@@ -374,18 +374,18 @@ public final class PointerIcon implements Parcelable {
}
private void loadResource(Context context, Resources resources, int resourceId) {
- XmlResourceParser parser = resources.getXml(resourceId);
+ final XmlResourceParser parser = resources.getXml(resourceId);
final int bitmapRes;
final float hotSpotX;
final float hotSpotY;
try {
XmlUtils.beginDocument(parser, "pointer-icon");
- TypedArray a = resources.obtainAttributes(
+ final TypedArray a = resources.obtainAttributes(
parser, com.android.internal.R.styleable.PointerIcon);
bitmapRes = a.getResourceId(com.android.internal.R.styleable.PointerIcon_bitmap, 0);
- hotSpotX = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotX, 0);
- hotSpotY = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotY, 0);
+ hotSpotX = a.getDimension(com.android.internal.R.styleable.PointerIcon_hotSpotX, 0);
+ hotSpotY = a.getDimension(com.android.internal.R.styleable.PointerIcon_hotSpotY, 0);
a.recycle();
} catch (Exception ex) {
throw new IllegalArgumentException("Exception parsing pointer icon resource.", ex);
diff --git a/core/res/res/drawable-hdpi/pointer_spot_anchor.png b/core/res/res/drawable-hdpi/pointer_spot_anchor.png
index d7aca3677085b..bdb5311d5f212 100644
Binary files a/core/res/res/drawable-hdpi/pointer_spot_anchor.png and b/core/res/res/drawable-hdpi/pointer_spot_anchor.png differ
diff --git a/core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml b/core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml
deleted file mode 100644
index 2222b8e023e2c..0000000000000
--- a/core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/core/res/res/drawable-hdpi/pointer_spot_hover.png b/core/res/res/drawable-hdpi/pointer_spot_hover.png
index 5041aa3a022f4..e7f2a0ca27c97 100644
Binary files a/core/res/res/drawable-hdpi/pointer_spot_hover.png and b/core/res/res/drawable-hdpi/pointer_spot_hover.png differ
diff --git a/core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml b/core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml
deleted file mode 100644
index dc62a696eb3b8..0000000000000
--- a/core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/core/res/res/drawable-hdpi/pointer_spot_touch.png b/core/res/res/drawable-hdpi/pointer_spot_touch.png
index 64a42a18f2c37..0326f91bdb00a 100644
Binary files a/core/res/res/drawable-hdpi/pointer_spot_touch.png and b/core/res/res/drawable-hdpi/pointer_spot_touch.png differ
diff --git a/core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml b/core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml
deleted file mode 100644
index 4bffee6ab58ba..0000000000000
--- a/core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/core/res/res/drawable-mdpi/pointer_arrow_icon.xml b/core/res/res/drawable-mdpi/pointer_arrow_icon.xml
deleted file mode 100644
index 2f5676f38aed4..0000000000000
--- a/core/res/res/drawable-mdpi/pointer_arrow_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/core/res/res/drawable-mdpi/pointer_spot_anchor.png b/core/res/res/drawable-mdpi/pointer_spot_anchor.png
index d7aca3677085b..4e282e7f14cde 100644
Binary files a/core/res/res/drawable-mdpi/pointer_spot_anchor.png and b/core/res/res/drawable-mdpi/pointer_spot_anchor.png differ
diff --git a/core/res/res/drawable-mdpi/pointer_spot_hover.png b/core/res/res/drawable-mdpi/pointer_spot_hover.png
index 5041aa3a022f4..67d0b066341b4 100644
Binary files a/core/res/res/drawable-mdpi/pointer_spot_hover.png and b/core/res/res/drawable-mdpi/pointer_spot_hover.png differ
diff --git a/core/res/res/drawable-mdpi/pointer_spot_touch.png b/core/res/res/drawable-mdpi/pointer_spot_touch.png
index 64a42a18f2c37..45dc5c08f9328 100644
Binary files a/core/res/res/drawable-mdpi/pointer_spot_touch.png and b/core/res/res/drawable-mdpi/pointer_spot_touch.png differ
diff --git a/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml b/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml
deleted file mode 100644
index 2fbe45a2e9f22..0000000000000
--- a/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_anchor.png b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
index ad41c9785db48..fa9226e943ad5 100644
Binary files a/core/res/res/drawable-xhdpi/pointer_spot_anchor.png and b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_hover.png b/core/res/res/drawable-xhdpi/pointer_spot_hover.png
index e9b98f6d4b900..f09a778e6b936 100644
Binary files a/core/res/res/drawable-xhdpi/pointer_spot_hover.png and b/core/res/res/drawable-xhdpi/pointer_spot_hover.png differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_touch.png b/core/res/res/drawable-xhdpi/pointer_spot_touch.png
index e10d99809161b..53d7a20406f71 100644
Binary files a/core/res/res/drawable-xhdpi/pointer_spot_touch.png and b/core/res/res/drawable-xhdpi/pointer_spot_touch.png differ
diff --git a/core/res/res/drawable-hdpi/pointer_arrow_icon.xml b/core/res/res/drawable/pointer_arrow_icon.xml
similarity index 73%
rename from core/res/res/drawable-hdpi/pointer_arrow_icon.xml
rename to core/res/res/drawable/pointer_arrow_icon.xml
index a4cce5c631c01..8f7d658c9f3ad 100644
--- a/core/res/res/drawable-hdpi/pointer_arrow_icon.xml
+++ b/core/res/res/drawable/pointer_arrow_icon.xml
@@ -1,5 +1,5 @@
+ android:hotSpotX="6dp"
+ android:hotSpotY="6dp" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml b/core/res/res/drawable/pointer_spot_anchor_icon.xml
similarity index 73%
rename from core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml
rename to core/res/res/drawable/pointer_spot_anchor_icon.xml
index 2222b8e023e2c..73c0c11d99fa6 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml
+++ b/core/res/res/drawable/pointer_spot_anchor_icon.xml
@@ -1,5 +1,5 @@
+ android:hotSpotX="22dp"
+ android:hotSpotY="22dp" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml b/core/res/res/drawable/pointer_spot_hover_icon.xml
similarity index 73%
rename from core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml
rename to core/res/res/drawable/pointer_spot_hover_icon.xml
index dc62a696eb3b8..1d7440b3f6d99 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml
+++ b/core/res/res/drawable/pointer_spot_hover_icon.xml
@@ -1,5 +1,5 @@
+ android:hotSpotX="22dp"
+ android:hotSpotY="22dp" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml b/core/res/res/drawable/pointer_spot_touch_icon.xml
similarity index 73%
rename from core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml
rename to core/res/res/drawable/pointer_spot_touch_icon.xml
index 4bffee6ab58ba..f4f0639d49d8f 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml
+++ b/core/res/res/drawable/pointer_spot_touch_icon.xml
@@ -1,5 +1,5 @@
+ android:hotSpotX="16dp"
+ android:hotSpotY="16dp" />
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a798d2e78a871..ce2bc85267139 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -7112,9 +7112,9 @@
-
+
-
+