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

Change request: using non null types for system services #29

Closed
jakubvimn opened this issue Apr 12, 2017 · 3 comments
Closed

Change request: using non null types for system services #29

jakubvimn opened this issue Apr 12, 2017 · 3 comments

Comments

@jakubvimn
Copy link

From the getSystemService method documentation:
"@return The service or null if the name does not exist"

So, if a name constant is used (and not a random string), the API guarantees to return a non-null object. So I think that the returned objects should have non-null types.

@pawegio
Copy link
Owner

pawegio commented Apr 12, 2017

It can return null if service is not available on the device from incompatible hardware or API level reasons, e.g. JOB_SCHEDULER_SERVICE is accessible since API level 21.

@jakubvimn
Copy link
Author

That's true. But what about the services available from API 1?

@pawegio
Copy link
Owner

pawegio commented Apr 26, 2017

See #3

@pawegio pawegio closed this as completed Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants