summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Yeabkal Wubshit <yeabkal@google.com> 2024-01-24 11:50:08 -0800
committer Yeabkal Wubshit <yeabkal@google.com> 2024-02-01 12:49:06 -0800
commitc5766da60cd2d6b3812e1ab5f13665824ba4ec98 (patch)
tree1f085a97e594445a5c96f636634feba2dc4d47b0 /libs/androidfw/FileStream.cpp
parent04d99941db7784fe918cee104535ccb33c6a3e77 (diff)
Create InputDevice ViewBehavior
ViewBehavior will be a static inner class for InputDevice, providing View-related behaviors pertaining to an InputDevice. We have added an API in InputDevice to return its ViewBehavior. This will be helpful if different InputDevice properties affect the way an input- generated MotionEvent should be handled by a View. For example, we have implemented a "shouldSmoothScroll" API in this change. This API is to tell Views processing motions generated by the InputDevice to prefer animating scrolls caused by such motions, to deliver a better quality scrolling UX than compared to a regular scroll that jumps by X pixels in a single frame. Note that, a single ViewBehavior instance contains all behaviors for a single InputDevice. This is unlike the other inner static class of InputDevice: MotionRange. This decision of making a single ViewBehavior contain all behaviors is made because not all View behaviors may depend on source+axis (e.g. there could be a behavior that is globally applicable to the whole InputDevice). Bug: 246946631 Test: unit tests, manual Change-Id: I65cf7d6556e26d199c9021f53bdae183f21d3c6d
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions