Check when trust agents do not declare a settings activity.
Trust agents are allowed to optionally specify a settings Activity in the meta-data file. This CL fixes the logic that parses the file to ensure that a missing settings activity does cause a NullPointerException. Bug: 133557168 Test: Registering a trust agent without a settings Activity works Change-Id: I0736a105fee77032acf2ac4b098717b6d49b4099
This commit is contained in:
@@ -518,8 +518,11 @@ public class TrustManagerService extends SystemService {
|
||||
agentInfo = mActiveAgents.valueAt(index);
|
||||
}
|
||||
|
||||
boolean directUnlock = resolveInfo.serviceInfo.directBootAware
|
||||
&& agentInfo.settings.canUnlockProfile;
|
||||
boolean directUnlock = false;
|
||||
if (agentInfo.settings != null) {
|
||||
directUnlock = resolveInfo.serviceInfo.directBootAware
|
||||
&& agentInfo.settings.canUnlockProfile;
|
||||
}
|
||||
|
||||
if (directUnlock) {
|
||||
if (DEBUG) Slog.d(TAG, "refreshAgentList: trustagent " + name
|
||||
|
||||
Reference in New Issue
Block a user