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

Commit 51bd76c2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Allow Android Auto to move to trusted." into tm-qpr-dev am: f267c377 am: 8dcab7cb

parents 3605ebe3 8dcab7cb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -602,9 +602,12 @@ public class TrustManagerService extends SystemService {
        synchronized (mUserTrustState) {
            wasTrusted = (mUserTrustState.get(userId) == TrustState.TRUSTED);
            wasTrustable = (mUserTrustState.get(userId) == TrustState.TRUSTABLE);
            boolean isAutomotive = getContext().getPackageManager().hasSystemFeature(
                    PackageManager.FEATURE_AUTOMOTIVE);
            boolean renewingTrust = wasTrustable && (
                    (flags & TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE) != 0);
            boolean canMoveToTrusted = alreadyUnlocked || isFromUnlock || renewingTrust;
            boolean canMoveToTrusted =
                    alreadyUnlocked || isFromUnlock || renewingTrust || isAutomotive;
            boolean upgradingTrustForCurrentUser = (userId == mCurrentUser);

            if (trustedByAtLeastOneAgent && wasTrusted) {