Drop support for legacy USB restrictor
* Doesn't compile after 14 QPR2 / AP1A * Has always been an issue for CTS [CIRCULAR REFERENCE: com.android.tools.r8.internal.h: Library class vendor.lineage.trust.V1_0.IUsbRestrict implements program class android.hidl.base.V1_0.IBase] Change-Id: Id2a4ccc60d7cae6bca02e302725d982d50311278
This commit is contained in:
committed by
Bruno Martins
parent
360d9508c9
commit
dcbd8deae6
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2018-2023 The LineageOS Project
|
||||
// Copyright (C) 2018-2024 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.
|
||||
@@ -70,7 +70,6 @@ lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [
|
||||
"vendor.lineage.livedisplay-V2.0-java",
|
||||
"vendor.lineage.livedisplay-V2.1-java",
|
||||
"vendor.lineage.touch-V1.0-java",
|
||||
"vendor.lineage.trust-V1.0-java",
|
||||
]
|
||||
|
||||
// READ ME: ########################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 The LineageOS Project
|
||||
* Copyright (C) 2018-2024 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.
|
||||
@@ -27,7 +27,6 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SELinux;
|
||||
import android.os.SystemProperties;
|
||||
import android.util.Log;
|
||||
@@ -39,13 +38,10 @@ import lineageos.providers.LineageSettings;
|
||||
import lineageos.trust.ITrustInterface;
|
||||
import lineageos.trust.TrustInterface;
|
||||
|
||||
import vendor.lineage.trust.V1_0.IUsbRestrict;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/** @hide **/
|
||||
public class TrustInterfaceService extends LineageSystemService {
|
||||
@@ -67,8 +63,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
private Context mContext;
|
||||
private NotificationManager mNotificationManager = null;
|
||||
|
||||
private IUsbRestrict mUsbRestrictor = null;
|
||||
|
||||
public TrustInterfaceService(Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
@@ -94,12 +88,6 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
if (phase == PHASE_BOOT_COMPLETED) {
|
||||
mNotificationManager = mContext.getSystemService(NotificationManager.class);
|
||||
|
||||
try {
|
||||
mUsbRestrictor = IUsbRestrict.getService();
|
||||
} catch (NoSuchElementException | RemoteException e) {
|
||||
// ignore, the hal is not available
|
||||
}
|
||||
|
||||
// Onboard
|
||||
if (!hasOnboardedUser()) {
|
||||
postOnBoardingNotification();
|
||||
@@ -165,8 +153,7 @@ public class TrustInterfaceService extends LineageSystemService {
|
||||
|
||||
private boolean hasUsbRestrictorInternal() {
|
||||
DevicePolicyManager policyManager = mContext.getSystemService(DevicePolicyManager.class);
|
||||
return mUsbRestrictor != null ||
|
||||
(policyManager != null && policyManager.canUsbDataSignalingBeDisabled());
|
||||
return policyManager != null && policyManager.canUsbDataSignalingBeDisabled();
|
||||
}
|
||||
|
||||
private boolean postOnBoardingNotification() {
|
||||
|
||||
Reference in New Issue
Block a user