diff options
| author | 2020-08-27 10:51:39 -0700 | |
|---|---|---|
| committer | 2020-09-03 16:39:49 +0000 | |
| commit | 0e9afe60a35cfea362919d7748c98a6596af52d2 (patch) | |
| tree | 8488ec14ee5d543fe9536623812bc8588c5a26b9 | |
| parent | 9f77031d9cf37e3c0aec6e925bba6df999d83b22 (diff) | |
Retrieve unlockProfile attribute with private namespace
Bug: 167105906
Bug: 155663736
Test: Attribute value is correctly parsed from
packages/apps/Car/CompanionDeviceSupport/res/xml/car_trust_agent.xml
Change-Id: If1d89607718462d8e073dee7c6482bf12c3f84c7
| -rw-r--r-- | services/core/java/com/android/server/trust/TrustManagerService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index 2394bafc09de..26103d5d6c8c 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -123,6 +123,8 @@ public class TrustManagerService extends SystemService { private static final String TRUST_TIMEOUT_ALARM_TAG = "TrustManagerService.trustTimeoutForUser"; private static final long TRUST_TIMEOUT_IN_MILLIS = 4 * 60 * 60 * 1000; + private static final String PRIV_NAMESPACE = "http://schemas.android.com/apk/prv/res/android"; + private final ArraySet<AgentInfo> mActiveAgents = new ArraySet<>(); private final ArrayList<ITrustListener> mTrustListeners = new ArrayList<>(); private final Receiver mReceiver = new Receiver(); @@ -808,8 +810,8 @@ public class TrustManagerService extends SystemService { TypedArray sa = res .obtainAttributes(attrs, com.android.internal.R.styleable.TrustAgent); cn = sa.getString(com.android.internal.R.styleable.TrustAgent_settingsActivity); - canUnlockProfile = sa.getBoolean( - com.android.internal.R.styleable.TrustAgent_unlockProfile, false); + canUnlockProfile = attrs.getAttributeBooleanValue( + PRIV_NAMESPACE, "unlockProfile", false); sa.recycle(); } catch (PackageManager.NameNotFoundException e) { caughtException = e; |