Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5221e926 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use RoSystemFeatures API where appropriate" into main am: f5e39c22 am: 008b1fc3

parents 723b4199 008b1fc3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.internal.notification.SystemNotificationChannels;
import com.android.internal.pm.RoSystemFeatures;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
@@ -1325,7 +1326,7 @@ public class LockSettingsService extends ILockSettings.Stub {
        mContext.enforceCallingOrSelfPermission(
                Manifest.permission.MANAGE_WEAK_ESCROW_TOKEN,
                "Requires MANAGE_WEAK_ESCROW_TOKEN permission.");
        if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
        if (!RoSystemFeatures.hasFeatureAutomotive(mContext)) {
            throw new IllegalArgumentException(
                    "Weak escrow token are only for automotive devices.");
        }
@@ -3613,7 +3614,7 @@ public class LockSettingsService extends ILockSettings.Stub {
        }

        // Escrow tokens are enabled on automotive builds.
        if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
        if (RoSystemFeatures.hasFeatureAutomotive(mContext)) {
            return;
        }