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

Commit 60ea5534 authored by Vishwath Mohan's avatar Vishwath Mohan
Browse files

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
parent aa21a4a7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -518,8 +518,11 @@ public class TrustManagerService extends SystemService {
                    agentInfo = mActiveAgents.valueAt(index);
                }

                boolean directUnlock = resolveInfo.serviceInfo.directBootAware
                boolean directUnlock = false;
                if (agentInfo.settings != null) {
                    directUnlock = resolveInfo.serviceInfo.directBootAware
                        && agentInfo.settings.canUnlockProfile;
                }

                if (directUnlock) {
                    if (DEBUG) Slog.d(TAG, "refreshAgentList: trustagent " + name