Loading core/java/android/view/ViewGroup.java +4 −1 Original line number Diff line number Diff line Loading @@ -2043,7 +2043,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager final float x = event.getXDispatchLocation(pointerIndex); final float y = event.getYDispatchLocation(pointerIndex); if (isOnScrollbarThumb(x, y) || isDraggingScrollBar()) { return PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_ARROW); // Return null here so that it fallbacks to the default PointerIcon for the source // device. For mouse, the default PointerIcon is PointerIcon.TYPE_ARROW. // For stylus, the default PointerIcon is PointerIcon.TYPE_NULL. return null; } // Check what the child under the pointer says about the pointer. final int childrenCount = mChildrenCount; Loading core/java/android/widget/AbsListView.java +1 −1 Original line number Diff line number Diff line Loading @@ -4703,7 +4703,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (mFastScroll != null) { if (mFastScroll != null && event.isFromSource(InputDevice.SOURCE_MOUSE)) { PointerIcon pointerIcon = mFastScroll.onResolvePointerIcon(event, pointerIndex); if (pointerIcon != null) { return pointerIcon; Loading core/java/android/widget/Button.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.widget; import android.content.Context; import android.util.AttributeSet; import android.view.InputDevice; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.PointerIcon; Loading Loading @@ -173,7 +174,8 @@ public class Button extends TextView { @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (getPointerIcon() == null && isClickable() && isEnabled()) { if (getPointerIcon() == null && isClickable() && isEnabled() && event.isFromSource(InputDevice.SOURCE_MOUSE)) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } return super.onResolvePointerIcon(event, pointerIndex); Loading core/java/android/widget/ImageButton.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.widget; import android.content.Context; import android.util.AttributeSet; import android.view.InputDevice; import android.view.MotionEvent; import android.view.PointerIcon; import android.widget.RemoteViews.RemoteView; Loading Loading @@ -99,7 +100,8 @@ public class ImageButton extends ImageView { @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (getPointerIcon() == null && isClickable() && isEnabled()) { if (getPointerIcon() == null && isClickable() && isEnabled() && event.isFromSource(InputDevice.SOURCE_MOUSE)) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } return super.onResolvePointerIcon(event, pointerIndex); Loading core/java/android/widget/RadialTimePickerView.java +6 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.util.MathUtils; import android.util.StateSet; import android.util.TypedValue; import android.view.HapticFeedbackConstants; import android.view.InputDevice; import android.view.MotionEvent; import android.view.PointerIcon; import android.view.View; Loading Loading @@ -1060,10 +1061,12 @@ public class RadialTimePickerView extends View { if (!isEnabled()) { return null; } if (event.isFromSource(InputDevice.SOURCE_MOUSE)) { final int degrees = getDegreesFromXY(event.getX(), event.getY(), false); if (degrees != -1) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } } return super.onResolvePointerIcon(event, pointerIndex); } Loading Loading
core/java/android/view/ViewGroup.java +4 −1 Original line number Diff line number Diff line Loading @@ -2043,7 +2043,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager final float x = event.getXDispatchLocation(pointerIndex); final float y = event.getYDispatchLocation(pointerIndex); if (isOnScrollbarThumb(x, y) || isDraggingScrollBar()) { return PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_ARROW); // Return null here so that it fallbacks to the default PointerIcon for the source // device. For mouse, the default PointerIcon is PointerIcon.TYPE_ARROW. // For stylus, the default PointerIcon is PointerIcon.TYPE_NULL. return null; } // Check what the child under the pointer says about the pointer. final int childrenCount = mChildrenCount; Loading
core/java/android/widget/AbsListView.java +1 −1 Original line number Diff line number Diff line Loading @@ -4703,7 +4703,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (mFastScroll != null) { if (mFastScroll != null && event.isFromSource(InputDevice.SOURCE_MOUSE)) { PointerIcon pointerIcon = mFastScroll.onResolvePointerIcon(event, pointerIndex); if (pointerIcon != null) { return pointerIcon; Loading
core/java/android/widget/Button.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.widget; import android.content.Context; import android.util.AttributeSet; import android.view.InputDevice; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.PointerIcon; Loading Loading @@ -173,7 +174,8 @@ public class Button extends TextView { @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (getPointerIcon() == null && isClickable() && isEnabled()) { if (getPointerIcon() == null && isClickable() && isEnabled() && event.isFromSource(InputDevice.SOURCE_MOUSE)) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } return super.onResolvePointerIcon(event, pointerIndex); Loading
core/java/android/widget/ImageButton.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.widget; import android.content.Context; import android.util.AttributeSet; import android.view.InputDevice; import android.view.MotionEvent; import android.view.PointerIcon; import android.widget.RemoteViews.RemoteView; Loading Loading @@ -99,7 +100,8 @@ public class ImageButton extends ImageView { @Override public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { if (getPointerIcon() == null && isClickable() && isEnabled()) { if (getPointerIcon() == null && isClickable() && isEnabled() && event.isFromSource(InputDevice.SOURCE_MOUSE)) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } return super.onResolvePointerIcon(event, pointerIndex); Loading
core/java/android/widget/RadialTimePickerView.java +6 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.util.MathUtils; import android.util.StateSet; import android.util.TypedValue; import android.view.HapticFeedbackConstants; import android.view.InputDevice; import android.view.MotionEvent; import android.view.PointerIcon; import android.view.View; Loading Loading @@ -1060,10 +1061,12 @@ public class RadialTimePickerView extends View { if (!isEnabled()) { return null; } if (event.isFromSource(InputDevice.SOURCE_MOUSE)) { final int degrees = getDegreesFromXY(event.getX(), event.getY(), false); if (degrees != -1) { return PointerIcon.getSystemIcon(getContext(), PointerIcon.TYPE_HAND); } } return super.onResolvePointerIcon(event, pointerIndex); } Loading