Fix Usb Restrictor if USB HAL 1.3+ is not present
Change-Id: Ic80f07161b24676e1697d29fea00219267a6fe81
This commit is contained in:
committed by
Łukasz Patron
parent
6528cae926
commit
ae4d409d98
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 The LineageOS Project
|
||||
* Copyright (C) 2018-2022 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -95,6 +95,11 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
|
||||
try {
|
||||
mUsb = IUsb.getService();
|
||||
} catch (NoSuchElementException | RemoteException e) {
|
||||
// ignore, the hal is not available
|
||||
}
|
||||
|
||||
try {
|
||||
mUsbRestrictor = IUsbRestrict.getService();
|
||||
} catch (NoSuchElementException | RemoteException e) {
|
||||
// ignore, the hal is not available
|
||||
|
||||
Reference in New Issue
Block a user