summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-10-07 19:51:23 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-10-07 19:51:23 +0000
commit8dcab7cb0c301166ea55a1cebd9086212a6a166a (patch)
tree8880a02b4c7cf0928cb5587d568b3b255f73d473
parent607d594c705a0491ae78b550a36d8cbbe0e13577 (diff)
parentf267c377bdd975b433e445c23383d8ba03d62634 (diff)
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>
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 7170773edca4..2888b9a2d3cc 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -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) {