Fix support for Android 10 (#92)
Users report that the method `waitForService` doesn't exist on Android 10. Close #90 as completed.
This commit is contained in:
@@ -354,7 +354,7 @@ object ConfigurationManager {
|
||||
|
||||
/** Waits for a system service to become available, with retries. */
|
||||
private fun waitForSystemService(name: String): IBinder? {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
return ServiceManager.waitForService(name)
|
||||
}
|
||||
// Fallback for older Android versions.
|
||||
|
||||
Reference in New Issue
Block a user