TrustInterfaceService: Simplify hasUsbRestrictorInternal code
Change-Id: I4cb05e3749b0939207cd0dc2da1002bf0ceedf7b
This commit is contained in:
committed by
Łukasz Patron
parent
ab6e0410f5
commit
67a10447b3
@@ -165,11 +165,8 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
|
||||
private boolean hasUsbRestrictorInternal() {
|
||||
DevicePolicyManager policyManager = mContext.getSystemService(DevicePolicyManager.class);
|
||||
if (policyManager != null) {
|
||||
return policyManager.canUsbDataSignalingBeDisabled() || mUsbRestrictor != null;
|
||||
} else {
|
||||
return mUsbRestrictor != null;
|
||||
}
|
||||
return mUsbRestrictor != null ||
|
||||
(policyManager != null && policyManager.canUsbDataSignalingBeDisabled());
|
||||
}
|
||||
|
||||
private boolean postOnBoardingNotification() {
|
||||
|
||||
Reference in New Issue
Block a user