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

[Hilt] Usage of deprecated APIs #2100

Closed
ansman opened this issue Sep 17, 2020 · 0 comments
Closed

[Hilt] Usage of deprecated APIs #2100

ansman opened this issue Sep 17, 2020 · 0 comments

Comments

@ansman
Copy link

ansman commented Sep 17, 2020

Hilt currently overrides a deprecated method (Fragment.onAttach(Activity)) leading to a deprecation warning when compiling:

Note: /com/example/Hilt_ExampleFragment.java uses or overrides a deprecated API.

Either the warning should be suppressed or the method should not be overridden.

copybara-service bot pushed a commit that referenced this issue Sep 21, 2020
Hilt generated Fragment classes override the deprecated method onAttach(Activity). This is done for backwards compatibility but causes a compile warning. To avoid causing builder failure for those with warning as error, the processors will now add a @SuppressWarnings annotation to the generated class to suppress the warning.

Fixes: #2100
RELNOTES=Suppress deprecation warning in Hilt generated Fragment class.
PiperOrigin-RevId: 332555993
copybara-service bot pushed a commit that referenced this issue Sep 21, 2020
Hilt generated Fragment classes override the deprecated method onAttach(Activity). This is done for backwards compatibility but causes a compile warning. To avoid causing builder failure for those with warning as error, the processors will now add a @SuppressWarnings annotation to the generated class to suppress the warning.

Fixes: #2100
RELNOTES=Suppress deprecation warning in Hilt generated Fragment class.
PiperOrigin-RevId: 332555993
copybara-service bot pushed a commit that referenced this issue Sep 21, 2020
Hilt generated Fragment classes override the deprecated method onAttach(Activity). This is done for backwards compatibility but causes a compile warning. To avoid causing builder failure for those with warning as error, the processors will now add a @SuppressWarnings annotation to the generated class to suppress the warning.

Fixes: #2100
RELNOTES=Suppress deprecation warning in Hilt generated Fragment class.
PiperOrigin-RevId: 332555993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants