Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Handle special case when injecting AppWidgetManager with @SystemService#1380

Merged
WonderCsabo merged 3 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
WonderCsabo:1377_specialServiceInjectionsWonderCsabo/androidannotations:1377_specialServiceInjectionsCopy head branch name to clipboard
Apr 28, 2015
Merged

Handle special case when injecting AppWidgetManager with @SystemService#1380
WonderCsabo merged 3 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
WonderCsabo:1377_specialServiceInjectionsWonderCsabo/androidannotations:1377_specialServiceInjectionsCopy head branch name to clipboard

Conversation

@WonderCsabo

Copy link
Copy Markdown
Member

Fixes #1377.

@dodgex

dodgex commented Apr 24, 2015

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

dodgex commented Apr 24, 2015

Copy link
Copy Markdown
Member

@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
Copy Markdown
Contributor

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

@WonderCsabo

Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@yDelouis

Copy link
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.