summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-09-13 21:16:43 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-13 21:16:43 +0000
commit56645753f5f5e1a023ad1b18ca85cd5a14e79832 (patch)
tree2a0d7f9a2e4c04227ec7da2261260897fa7c9be8
parent1385c581d739db4bf59f62309314cb4184363c63 (diff)
parent35d70d06232eacb6e3411386257972b7a7552eed (diff)
Merge "Remove PointerIcon frame size checks for animated drawables" into main
-rw-r--r--core/java/android/view/PointerIcon.java8
1 files changed, 0 insertions, 8 deletions
diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index c30212657c57..3e1d93c3133c 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -521,8 +521,6 @@ public final class PointerIcon implements Parcelable {
// Assumes they have the exact duration.
mDurationPerFrame = animationDrawable.getDuration(0);
mBitmapFrames = new Bitmap[frames - 1];
- final int width = drawable.getIntrinsicWidth();
- final int height = drawable.getIntrinsicHeight();
final boolean isVectorAnimation = drawable instanceof VectorDrawable;
mDrawNativeDropShadow = isVectorAnimation;
for (int i = 1; i < frames; ++i) {
@@ -537,12 +535,6 @@ public final class PointerIcon implements Parcelable {
+ "is a different type from the others. All frames should be the "
+ "same type.");
}
- if (drawableFrame.getIntrinsicWidth() != width ||
- drawableFrame.getIntrinsicHeight() != height) {
- throw new IllegalArgumentException("The bitmap size of " + i + "-th frame "
- + "is different. All frames should have the exact same size and "
- + "share the same hotspot.");
- }
if (isVectorAnimation) {
drawableFrame = getBitmapDrawableFromVectorDrawable(resources,
(VectorDrawable) drawableFrame, pointerScale);