Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mono.Android] API-R enumification #4710

Merged
merged 2 commits into from
May 28, 2020
Merged

[Mono.Android] API-R enumification #4710

merged 2 commits into from
May 28, 2020

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented May 21, 2020

Enumification for the API-R developer preview 4.

  • Convert constant fields to enums as appropriate.
  • Update methods that take an int constant value to use new enums.

There is some acceptable-breakage because I renamed some of the enums that were added in API-R with auto-generated names that had already been committed in #4468. (Note that our enums are not "API-aware" so all enumifications are added for all API levels. That is, enums added in API-R get added to android-21, android-22, etc..)

@jpobst jpobst force-pushed the dp4-enumification branch 3 times, most recently from 9df73d0 to 076d465 Compare May 21, 2020 22:49
?,30,android/accessibilityservice/AccessibilityService.GESTURE_4_FINGER_TRIPLE_TAP,39,,,,
?,30,android/accessibilityservice/AccessibilityService.GESTURE_DOUBLE_TAP,17,,,,
?,30,android/accessibilityservice/AccessibilityService.GESTURE_DOUBLE_TAP_AND_HOLD,18,,,,
E,30,android/accessibilityservice/AccessibilityService.GESTURE_2_FINGER_DOUBLE_TAP,20,Android.AccessibilityServices.AccessibilityGesture,TwoFingerDoubleTap,remove,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silly Q, but does the map2.csv-parsing code in generator trim whitespace, such that we could make this "nicer" by adding spaces before/after the commas to make things line up "nicely"? Or is that just "crazy"?

E,30,android/accessibilityservice/AccessibilityService.GESTURE_2_FINGER_DOUBLE_TAP_AND_HOLD,40,Android.AccessibilityServices.AccessibilityGesture,TwoFingerDoubleTapAndHold,remove,
E,30,android/accessibilityservice/AccessibilityService.GESTURE_2_FINGER_SINGLE_TAP         ,19,Android.AccessibilityServices.AccessibilityGesture,TwoFingerSingleTap       ,remove,
E,30,android/accessibilityservice/AccessibilityService.GESTURE_2_FINGER_SWIPE_DOWN         ,26,Android.AccessibilityServices.AccessibilityGesture,TwoFingerSwipeDown       ,remove,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does trim, but I don't think it's going to make things nicer to read. You would have to pad to at least the size of the longest line which is 217 characters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wouldn't necessarily need to pad the entire file, just each group of enums. If you don't think it'll be nicer to read, though, there's no point.

@jpobst
Copy link
Contributor Author

jpobst commented May 27, 2020

/azp run

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@jpobst jpobst force-pushed the dp4-enumification branch 2 times, most recently from 8437f9f to ee24f6e Compare May 28, 2020 14:38
@jpobst jpobst force-pushed the dp4-enumification branch from ee24f6e to ad1bbbe Compare May 28, 2020 16:41
@jpobst jpobst marked this pull request as ready for review May 28, 2020 18:34
@jonpryor jonpryor merged commit 379f7cd into master May 28, 2020
@jonpryor jonpryor deleted the dp4-enumification branch May 28, 2020 23:00
jonpryor pushed a commit that referenced this pull request Jun 1, 2020
Enumification for API-R Developer Preview 4 (375e062).

  * Convert constant fields to enums as appropriate.
  * Update methods that take an `int` constant value to use new enums.

There is some "acceptable-breakage" because I renamed some of the enums
that were added in API-R with auto-generated names that had already been
committed in 3ca2a07.

Note that our enums are not "API-aware" so all enumifications are added
for all API levels.  That is, enums added in API-R get added to
`android-21`, `android-22`, etc.…
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants