Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Fix Resource Manager code to use native APIs before reflection #13176

Merged
merged 4 commits into from
Feb 5, 2021

Conversation

PureWeen
Copy link
Contributor

Description of Change

Fix Resource Manager to use native APIS to retrieve IDs before falling back to reflection. At some point the Resource.designer.cs class will most likely vanish so reflection will stop working (dotnet/android#5317). That's why this PR is targeting 4.8 so we can get this code in a little bit earlier than 5.0.

API Changes

Added:

  • int ResourceManager.GetDrawableId(this Context context, string title)
  • int ResourceManager.GetResource(this Context context, string title)

Platforms Affected

  • Android

Testing Procedure

  • UI Tests all pass
  • Whatever additional testing you feel is missing from the UI Tests

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jsuarezruiz
Copy link
Contributor

The failing tests seems to be unrelated (CarouselViewPositionFromVisibilityChangeTest_google_pixel_2_8_1_0).

@PureWeen PureWeen added this to In progress in v5.0.1 via automation Dec 30, 2020
@PureWeen PureWeen added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Dec 30, 2020
@PureWeen PureWeen added this to the 5.0.1 milestone Dec 30, 2020
@PureWeen PureWeen moved this from In progress to Review in progress in v5.0.1 Dec 30, 2020
@PureWeen PureWeen added this to To do in vNext+1 (5.0.0) via automation Jan 14, 2021
@PureWeen PureWeen removed this from Review in progress in v5.0.1 Jan 14, 2021
@PureWeen PureWeen modified the milestones: 5.0.1, 5.0.0 Jan 14, 2021
@rmarinho rmarinho moved this from To do to In Review in vNext+1 (5.0.0) Jan 15, 2021
@hartez hartez added this to To Fix in 5.0.0 SR 3 via automation Feb 2, 2021
@hartez hartez removed this from In Review in vNext+1 (5.0.0) Feb 2, 2021
@hartez hartez moved this from To Fix to PR Needs Review in 5.0.0 SR 3 Feb 2, 2021
@PureWeen
Copy link
Contributor Author

PureWeen commented Feb 5, 2021

Test failures are unrelated

@PureWeen PureWeen merged commit e5604ee into 4.8.0 Feb 5, 2021
5.0.0 SR 3 automation moved this from PR Needs Review to Done Feb 5, 2021
@PureWeen PureWeen deleted the fix_resource_getbyidentifier branch February 5, 2021 16:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. ControlGallery p/Android
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants