Hide android auto sensor section from devices that do not support it (#3657)

This commit is contained in:
Daniel Shokouhi 2023-07-14 12:34:22 -07:00 committed by GitHub
parent 9d64260e1f
commit 8e55e57897
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,10 @@ class AndroidAutoSensorManager : SensorManager, Observer<Int> {
}
}
override fun hasSensor(context: Context): Boolean {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
}
override fun requiredPermissions(sensorId: String): Array<String> {
return emptyArray()
}