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

Commit 8a4f3230 authored by Ram Periathiruvadi's avatar Ram Periathiruvadi Committed by Android (Google) Code Review
Browse files

Merge "Resolve trust agents on USER_STARTED in addition to USER_ADDED." into qt-qpr1-dev

parents 42e5ebf0 29c75abf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1389,7 +1389,8 @@ public class TrustManagerService extends SystemService {
            if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(action)) {
                refreshAgentList(getSendingUserId());
                updateDevicePolicyFeatures();
            } else if (Intent.ACTION_USER_ADDED.equals(action)) {
            } else if (Intent.ACTION_USER_ADDED.equals(action) || Intent.ACTION_USER_STARTED.equals(
                    action)) {
                int userId = getUserId(intent);
                if (userId > 0) {
                    maybeEnableFactoryTrustAgents(mLockPatternUtils, userId);
@@ -1430,6 +1431,7 @@ public class TrustManagerService extends SystemService {
            filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
            filter.addAction(Intent.ACTION_USER_ADDED);
            filter.addAction(Intent.ACTION_USER_REMOVED);
            filter.addAction(Intent.ACTION_USER_STARTED);
            context.registerReceiverAsUser(this,
                    UserHandle.ALL,
                    filter,