RUM-6566: Implement touch override#2334
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2334 +/- ##
===========================================
- Coverage 70.41% 70.33% -0.08%
===========================================
Files 739 740 +1
Lines 27536 27591 +55
Branches 4614 4620 +6
===========================================
+ Hits 19388 19405 +17
- Misses 6866 6894 +28
- Partials 1282 1292 +10
|
jonathanmos
force-pushed
the
jmoskovich/rum-6566/override-touch-privacy
branch
4 times, most recently
from
October 21, 2024 11:31
3fb35c6 to
279abf1
Compare
jonathanmos
changed the base branch from
develop
to
jmoskovich/rum-6566/extract-privacy-helper
October 21, 2024 11:32
jonathanmos
marked this pull request as ready for review
October 21, 2024 12:39
ambushwork
reviewed
Oct 21, 2024
jonathanmos
force-pushed
the
jmoskovich/rum-6566/override-touch-privacy
branch
from
October 22, 2024 08:10
279abf1 to
5d21381
Compare
ambushwork
approved these changes
Oct 22, 2024
mariusc83
reviewed
Oct 22, 2024
jonathanmos
force-pushed
the
jmoskovich/rum-6566/override-touch-privacy
branch
from
October 22, 2024 09:41
5d21381 to
191fdd5
Compare
mariusc83
approved these changes
Oct 22, 2024
jonathanmos
force-pushed
the
jmoskovich/rum-6566/override-touch-privacy
branch
from
October 22, 2024 12:37
191fdd5 to
27524eb
Compare
jonathanmos
changed the base branch from
jmoskovich/rum-6566/extract-privacy-helper
to
develop
October 22, 2024 13:48
jonathanmos
force-pushed
the
jmoskovich/rum-6566/override-touch-privacy
branch
from
October 22, 2024 14:01
27524eb to
a168657
Compare
xgouchet
approved these changes
Oct 23, 2024
Comment on lines
+42
to
+44
| fun `M add to nextOverrideAreas W addTouchOverrideArea()`( | ||
| forge: Forge | ||
| ) { |
Contributor
There was a problem hiding this comment.
Note
You can simply use the @Forgery annotation for enums (same applies to all methods in this test class). Doing so means that the Forge extension keeps track of the generated value when a test fails when the value is on an annotated property or function param. E.g.:
@Forgery lateinit var fakeTouchPrivacy: TouchPrivacy
// Test will output `field TouchPrivacyManagerTest::fakeTouchPrivacy = SHOW`
fun `M add to nextOverrideAreas W addTouchOverrideArea()`(
@Forgery fakePrivacyOverride: TouchPrivacy
// Test will output `param fails for any input::arg0 = SHOW`
) {
// …
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implements an api to override touch privacy on views.
Example of the api:
Note:
• Touch privacy is calculated every time an
ACTION_DOWNis performed. In this way we can apply the override to the entire motion.• Views can be overridden to hide touches, but also to show touches (if the general default was hide).
• Webviews are not affected by overrides, aside from
hiddenand touch privacy (so they are affected by this change).• Setting
hiddenon views only affects whether a view is replaced by a placeholder. Hiding the touches on the view requires a separate touch override.• If a touch falls within two override areas, one that has been overridden to
HIDEand another that has been overridden toSHOW,HIDEwill take priority.Motivation
Part of the fine grained masking effort.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)