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

Check SDK version before calling StorageManager.getStorageVolumes. #23

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

ksooo
Copy link
Member

@ksooo ksooo commented Apr 7, 2021

StorageManager.getStorageVolumes is available since API level 24. Kodi baseline currently is API level 21.

https://developer.android.com/reference/android/os/storage/StorageManager#getStorageVolumes()

@ksooo
Copy link
Member Author

ksooo commented Apr 7, 2021

@koying good to go? Not quite sure about contruction of the CNJNIList instance with an jhobject(nullptr).

@ksooo
Copy link
Member Author

ksooo commented Apr 8, 2021

Not quite sure about contruction of the CNJNIList instance with an jhobject(nullptr).

I did a runtime test where I enforced this and it worked as expected.

@koying
Copy link
Contributor

koying commented Apr 8, 2021

It's been a while, but I think jhobject(), i.e. an empty object, is preferable to the jhobject(nullptr) construct.

@ksooo ksooo force-pushed the getstoragevolumes-api-check branch from fb0a228 to f376281 Compare April 8, 2021 11:04
@ksooo
Copy link
Member Author

ksooo commented Apr 8, 2021

jhobject(), i.e. an empty object, is preferable

Changed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants