summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/pm/UserManagerService.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-12-14 12:09:36 -0800
committerAmith Yamasani <yamasani@google.com>2013-03-06 09:49:44 -0800
commit67df64b3a48a8157d08a98fa90135d0ac0ee621c (patch)
treed390d5c537c976a14688e24c1f9a8a213840ff29 /services/java/com/android/server/pm/UserManagerService.java
parent0ffc81c1ada65b4ef4febaacf044e9fa62309b87 (diff)
Shared accounts and sharing of apps
API and preliminary implementation for sharing primary user accounts with a secondary user. AbstractAccountAuthenticator has new methods to retrieve and apply a bundle of credentials to clone an account from the primary to a restricted secondary user. The AccountManagerService initiates the account clone when it starts up the user and detects that the user has a shared account registered that hasn't been converted to a real account. AccountManager also has new hidden APIs to add/remove/get shared accounts. There might be further improvements to this API to make shared accounts hidden/visible to select apps. AccountManagerService has a new table to store the shared account information. Added ability in PackageManager to install and uninstall packages for a secondary user. This is required when the primary user selects a few apps to share with a restricted user. Remove shared accounts from secondary users when primary user removes the account. Change-Id: I9378ed0d8c1cc66baf150a4bec0ede56f6f8b06b
Diffstat (limited to 'services/java/com/android/server/pm/UserManagerService.java')
-rw-r--r--services/java/com/android/server/pm/UserManagerService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java
index c3f4256099b3..1414cbd8c14f 100644
--- a/services/java/com/android/server/pm/UserManagerService.java
+++ b/services/java/com/android/server/pm/UserManagerService.java
@@ -542,16 +542,16 @@ public class UserManagerService extends IUserManager.Stub {
private void fallbackToSingleUserLocked() {
// Create the primary user
- UserInfo primary = new UserInfo(0,
+ UserInfo primary = new UserInfo(UserHandle.USER_OWNER,
mContext.getResources().getString(com.android.internal.R.string.owner_name), null,
UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY | UserInfo.FLAG_INITIALIZED);
mUsers.put(0, primary);
mNextSerialNumber = MIN_USER_ID;
-
+
Bundle restrictions = new Bundle();
initRestrictionsToDefaults(restrictions);
- mUserRestrictions.append(0, restrictions);
-
+ mUserRestrictions.append(UserHandle.USER_OWNER, restrictions);
+
updateUserIdsLocked();
writeUserListLocked();