Merge "Clean up USER_OWNER in TrustManagerService"
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 43f4047..2a12aac 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -122,7 +122,7 @@
     private final SparseBooleanArray mUserHasAuthenticatedSinceBoot = new SparseBooleanArray();
 
     private boolean mTrustAgentsCanRun = false;
-    private int mCurrentUser = UserHandle.USER_OWNER;
+    private int mCurrentUser = UserHandle.USER_SYSTEM;
 
     public TrustManagerService(Context context) {
         super(context);
@@ -150,7 +150,7 @@
             mTrustAgentsCanRun = true;
             refreshAgentList(UserHandle.USER_ALL);
         } else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
-            maybeEnableFactoryTrustAgents(mLockPatternUtils, UserHandle.USER_OWNER);
+            maybeEnableFactoryTrustAgents(mLockPatternUtils, UserHandle.USER_SYSTEM);
         }
     }
 
@@ -205,7 +205,7 @@
         if (!mTrustAgentsCanRun) {
             return;
         }
-        if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_OWNER) {
+        if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_SYSTEM) {
             Log.e(TAG, "refreshAgentList(userId=" + userId + "): Invalid user handle,"
                     + " must be USER_ALL or a specific user.", new Throwable("here"));
             userId = UserHandle.USER_ALL;
@@ -296,7 +296,7 @@
     }
 
     private void refreshDeviceLockedForUser(int userId) {
-        if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_OWNER) {
+        if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_SYSTEM) {
             Log.e(TAG, "refreshDeviceLockedForUser(userId=" + userId + "): Invalid user handle,"
                     + " must be USER_ALL or a specific user.", new Throwable("here"));
             userId = UserHandle.USER_ALL;
@@ -689,7 +689,7 @@
         @Override
         public void reportRequireCredentialEntry(int userId) throws RemoteException {
             enforceReportPermission();
-            if (userId == UserHandle.USER_ALL || userId >= UserHandle.USER_OWNER) {
+            if (userId == UserHandle.USER_ALL || userId >= UserHandle.USER_SYSTEM) {
                 mHandler.obtainMessage(MSG_REQUIRE_CREDENTIAL_ENTRY, userId, 0).sendToTarget();
             } else {
                 throw new IllegalArgumentException(