mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
safeguard for UsbService nullability
because of the Java interface implying it
This commit is contained in:
parent
f97bc21719
commit
8de116bb01
1 changed files with 1 additions and 1 deletions
|
|
@ -9,4 +9,4 @@ import android.hardware.usb.UsbManager
|
|||
*/
|
||||
val Context.bluetoothManager: BluetoothManager? get() = getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager?
|
||||
|
||||
val Context.usbManager: UsbManager get() = requireNotNull(getSystemService(Context.USB_SERVICE) as? UsbManager) { "USB_SERVICE is not available"}
|
||||
val Context.usbManager: UsbManager get() = requireNotNull(getSystemService(Context.USB_SERVICE) as? UsbManager?) { "USB_SERVICE is not available"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue