Merge "Allow Android Auto to move to trusted." into tm-qpr-dev am: f267c377bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20124955 Change-Id: I9472e417bc55e8c8a7a57075704dcccc2355bd02 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -602,9 +602,12 @@ public class TrustManagerService extends SystemService {
|
|||||||
synchronized (mUserTrustState) {
|
synchronized (mUserTrustState) {
|
||||||
wasTrusted = (mUserTrustState.get(userId) == TrustState.TRUSTED);
|
wasTrusted = (mUserTrustState.get(userId) == TrustState.TRUSTED);
|
||||||
wasTrustable = (mUserTrustState.get(userId) == TrustState.TRUSTABLE);
|
wasTrustable = (mUserTrustState.get(userId) == TrustState.TRUSTABLE);
|
||||||
|
boolean isAutomotive = getContext().getPackageManager().hasSystemFeature(
|
||||||
|
PackageManager.FEATURE_AUTOMOTIVE);
|
||||||
boolean renewingTrust = wasTrustable && (
|
boolean renewingTrust = wasTrustable && (
|
||||||
(flags & TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE) != 0);
|
(flags & TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE) != 0);
|
||||||
boolean canMoveToTrusted = alreadyUnlocked || isFromUnlock || renewingTrust;
|
boolean canMoveToTrusted =
|
||||||
|
alreadyUnlocked || isFromUnlock || renewingTrust || isAutomotive;
|
||||||
boolean upgradingTrustForCurrentUser = (userId == mCurrentUser);
|
boolean upgradingTrustForCurrentUser = (userId == mCurrentUser);
|
||||||
|
|
||||||
if (trustedByAtLeastOneAgent && wasTrusted) {
|
if (trustedByAtLeastOneAgent && wasTrusted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user