8000 Handle special case when injecting AppWidgetManager with @SystemService by WonderCsabo · Pull Request #1380 · androidannotations/androidannotations · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Conversation

@WonderCsabo
Copy link
Member

Fixes #1377.

@dodgex
Copy link
Member
dodgex commented Apr 24, 2015

Looks good. +1 for checking the sdk & current Plattform to decide how to inject.

I think you verified the results, but is there a way to add a test?

@WonderCsabo
Copy link
Member Author

Thanks for checking the PRs!

I wanted to add tests, but unfortunately there is no way to test this, because we do not have the API 21 classes at compile time. Actually we could just provide a dummy class, but we cannot add a new field to Build.VERSION_CODES.

@WonderCsabo
Copy link
Member Author

Hmm, i just thought about the compile time test (because this should be done there), but maybe we could do it in the functional test with the help of Robolectric.

Actually it is a pain that we still depend on Android 4.x. I tend to create a solution like creating a script which installs the Android dependency to the local maven repo, as lots of Android projects the (this is needed for the compilation of Robolectric itself, for example).

@WonderCsabo
Copy link
Member Author

@dodgex i added a commit which tests one case of injection (when only the old method is available). It would be nice to do it in compile time test and check test the other cases, but we cannot do that currently.

@dodgex
Copy link
Member
dodgex commented Apr 24, 2015

@WonderCsabo i assumed that it would be hard to get proper tests for that. lets hope no one breaks that accidently :D

@WonderCsabo WonderCsabo force-pushed the 1377_specialServiceInjections branch from d7f9b76 to 36dbfe2 Compare April 28, 2015 09:47
@yDelouis
Copy link
Contributor

I'm okay with the code but the Travis build has failed. Could you fix this ?

@WonderCsabo
Copy link
Member Author

Thanks for checking!

The Travis failure is not related to this PR, this passed. For some reason, Travis fails while unzipping the Gradle distribution. I am seeing these problems lately. I try to investigate.

@WonderCsabo
Copy link
Member Author

Maybe Travis is unstable now. I also see other errors, like build freezing while downloading Maven deps.

@yDelouis
Copy link
Contributor

OK. Feel free to merge this PR if it builds locally.

@WonderCsabo WonderCsabo force-pushed the 1377_specialServiceInjections branch from 36dbfe2 to d8557a2 Compare April 28, 2015 13:32
WonderCsabo added a commit that referenced this pull request Apr 28, 2015
Handle special case when injecting AppWidgetManager with @SystemService
@WonderCsabo WonderCsabo merged commit 2753d39 into androidannotations:develop Apr 28, 2015
@WonderCsabo WonderCsabo deleted the 1377_specialServiceInjections branch April 28, 2015 13:46
@WonderCsabo WonderCsabo added this to the 3.3 milestone Apr 28, 2015
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.

@SystemService & android.appwidget.AppWidgetManager

3 participants

0