Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.server.pm; |
| 18 | |
| 19 | import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; |
| 20 | import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED; |
| 21 | import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED; |
| 22 | |
Dianne Hackborn | d4ac8d7 | 2012-09-27 23:20:10 -0700 | [diff] [blame] | 23 | import android.content.pm.ApplicationInfo; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 24 | import android.content.pm.PackageUserState; |
| 25 | import android.content.pm.UserInfo; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 26 | import android.util.SparseArray; |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 27 | |
| 28 | import java.io.File; |
| 29 | import java.util.HashSet; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 30 | import java.util.List; |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * Settings base class for pending and resolved classes. |
| 34 | */ |
| 35 | class PackageSettingBase extends GrantedPermissions { |
| 36 | /** |
| 37 | * Indicates the state of installation. Used by PackageManager to figure out |
| 38 | * incomplete installations. Say a package is being installed (the state is |
| 39 | * set to PKG_INSTALL_INCOMPLETE) and remains so till the package |
| 40 | * installation is successful or unsuccessful in which case the |
| 41 | * PackageManager will no longer maintain state information associated with |
| 42 | * the package. If some exception(like device freeze or battery being pulled |
| 43 | * out) occurs during installation of a package, the PackageManager needs |
| 44 | * this information to clean up the previously failed installation. |
| 45 | */ |
| 46 | static final int PKG_INSTALL_COMPLETE = 1; |
| 47 | static final int PKG_INSTALL_INCOMPLETE = 0; |
| 48 | |
| 49 | final String name; |
| 50 | final String realName; |
| 51 | File codePath; |
| 52 | String codePathString; |
| 53 | File resourcePath; |
| 54 | String resourcePathString; |
| 55 | String nativeLibraryPathString; |
| 56 | long timeStamp; |
| 57 | long firstInstallTime; |
| 58 | long lastUpdateTime; |
| 59 | int versionCode; |
| 60 | |
| 61 | boolean uidError; |
| 62 | |
| 63 | PackageSignatures signatures = new PackageSignatures(); |
| 64 | |
| 65 | boolean permissionsFixed; |
| 66 | boolean haveGids; |
| 67 | |
Geremy Condra | f1bcca8 | 2013-01-07 22:35:24 -0800 | [diff] [blame] | 68 | PackageKeySetData keySetData = new PackageKeySetData(); |
| 69 | |
Dianne Hackborn | 4a9f071 | 2012-10-02 15:29:06 -0700 | [diff] [blame] | 70 | private static final PackageUserState DEFAULT_USER_STATE = new PackageUserState(); |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 71 | |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 72 | // Whether this package is currently stopped, thus can not be |
| 73 | // started until explicitly launched by the user. |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 74 | private final SparseArray<PackageUserState> userState = new SparseArray<PackageUserState>(); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 75 | |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 76 | int installStatus = PKG_INSTALL_COMPLETE; |
| 77 | |
| 78 | PackageSettingBase origPackage; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 79 | |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 80 | /* package name of the app that installed this package */ |
| 81 | String installerPackageName; |
| 82 | PackageSettingBase(String name, String realName, File codePath, File resourcePath, |
| 83 | String nativeLibraryPathString, int pVersionCode, int pkgFlags) { |
| 84 | super(pkgFlags); |
| 85 | this.name = name; |
| 86 | this.realName = realName; |
| 87 | init(codePath, resourcePath, nativeLibraryPathString, pVersionCode); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * New instance of PackageSetting with one-level-deep cloning. |
| 92 | */ |
| 93 | @SuppressWarnings("unchecked") |
| 94 | PackageSettingBase(PackageSettingBase base) { |
| 95 | super(base); |
| 96 | |
| 97 | name = base.name; |
| 98 | realName = base.realName; |
| 99 | codePath = base.codePath; |
| 100 | codePathString = base.codePathString; |
| 101 | resourcePath = base.resourcePath; |
| 102 | resourcePathString = base.resourcePathString; |
| 103 | nativeLibraryPathString = base.nativeLibraryPathString; |
| 104 | timeStamp = base.timeStamp; |
| 105 | firstInstallTime = base.firstInstallTime; |
| 106 | lastUpdateTime = base.lastUpdateTime; |
| 107 | versionCode = base.versionCode; |
| 108 | |
| 109 | uidError = base.uidError; |
| 110 | |
| 111 | signatures = new PackageSignatures(base.signatures); |
| 112 | |
| 113 | permissionsFixed = base.permissionsFixed; |
| 114 | haveGids = base.haveGids; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 115 | userState.clear(); |
| 116 | for (int i=0; i<base.userState.size(); i++) { |
| 117 | userState.put(base.userState.keyAt(i), |
| 118 | new PackageUserState(base.userState.valueAt(i))); |
| 119 | } |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 120 | installStatus = base.installStatus; |
| 121 | |
| 122 | origPackage = base.origPackage; |
| 123 | |
| 124 | installerPackageName = base.installerPackageName; |
Geremy Condra | f1bcca8 | 2013-01-07 22:35:24 -0800 | [diff] [blame] | 125 | |
| 126 | keySetData = new PackageKeySetData(base.keySetData); |
| 127 | |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | void init(File codePath, File resourcePath, String nativeLibraryPathString, |
| 131 | int pVersionCode) { |
| 132 | this.codePath = codePath; |
| 133 | this.codePathString = codePath.toString(); |
| 134 | this.resourcePath = resourcePath; |
| 135 | this.resourcePathString = resourcePath.toString(); |
| 136 | this.nativeLibraryPathString = nativeLibraryPathString; |
| 137 | this.versionCode = pVersionCode; |
| 138 | } |
| 139 | |
| 140 | public void setInstallerPackageName(String packageName) { |
| 141 | installerPackageName = packageName; |
| 142 | } |
| 143 | |
| 144 | String getInstallerPackageName() { |
| 145 | return installerPackageName; |
| 146 | } |
| 147 | |
| 148 | public void setInstallStatus(int newStatus) { |
| 149 | installStatus = newStatus; |
| 150 | } |
| 151 | |
| 152 | public int getInstallStatus() { |
| 153 | return installStatus; |
| 154 | } |
| 155 | |
| 156 | public void setTimeStamp(long newStamp) { |
| 157 | timeStamp = newStamp; |
| 158 | } |
| 159 | |
| 160 | /** |
| 161 | * Make a shallow copy of this package settings. |
| 162 | */ |
| 163 | public void copyFrom(PackageSettingBase base) { |
| 164 | grantedPermissions = base.grantedPermissions; |
| 165 | gids = base.gids; |
| 166 | |
| 167 | timeStamp = base.timeStamp; |
| 168 | firstInstallTime = base.firstInstallTime; |
| 169 | lastUpdateTime = base.lastUpdateTime; |
| 170 | signatures = base.signatures; |
| 171 | permissionsFixed = base.permissionsFixed; |
| 172 | haveGids = base.haveGids; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 173 | userState.clear(); |
| 174 | for (int i=0; i<base.userState.size(); i++) { |
| 175 | userState.put(base.userState.keyAt(i), base.userState.valueAt(i)); |
| 176 | } |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 177 | installStatus = base.installStatus; |
Geremy Condra | f1bcca8 | 2013-01-07 22:35:24 -0800 | [diff] [blame] | 178 | keySetData = base.keySetData; |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 179 | } |
| 180 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 181 | private PackageUserState modifyUserState(int userId) { |
| 182 | PackageUserState state = userState.get(userId); |
| 183 | if (state == null) { |
Dianne Hackborn | 4a9f071 | 2012-10-02 15:29:06 -0700 | [diff] [blame] | 184 | state = new PackageUserState(); |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 185 | userState.put(userId, state); |
| 186 | } |
| 187 | return state; |
| 188 | } |
| 189 | |
| 190 | public PackageUserState readUserState(int userId) { |
| 191 | PackageUserState state = userState.get(userId); |
Dianne Hackborn | d4ac8d7 | 2012-09-27 23:20:10 -0700 | [diff] [blame] | 192 | if (state != null) { |
| 193 | return state; |
| 194 | } |
Dianne Hackborn | 4a9f071 | 2012-10-02 15:29:06 -0700 | [diff] [blame] | 195 | return DEFAULT_USER_STATE; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 196 | } |
| 197 | |
Dianne Hackborn | 3fa3c28a | 2013-03-26 16:15:41 -0700 | [diff] [blame] | 198 | void setEnabled(int state, int userId, String callingPackage) { |
| 199 | PackageUserState st = modifyUserState(userId); |
| 200 | st.enabled = state; |
| 201 | st.lastDisableAppCaller = callingPackage; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | int getEnabled(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 205 | return readUserState(userId).enabled; |
| 206 | } |
| 207 | |
Dianne Hackborn | 3fa3c28a | 2013-03-26 16:15:41 -0700 | [diff] [blame] | 208 | String getLastDisabledAppCaller(int userId) { |
| 209 | return readUserState(userId).lastDisableAppCaller; |
| 210 | } |
| 211 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 212 | void setInstalled(boolean inst, int userId) { |
| 213 | modifyUserState(userId).installed = inst; |
| 214 | } |
| 215 | |
| 216 | boolean getInstalled(int userId) { |
| 217 | return readUserState(userId).installed; |
| 218 | } |
| 219 | |
| 220 | boolean isAnyInstalled(int[] users) { |
| 221 | for (int user: users) { |
| 222 | if (readUserState(user).installed) { |
| 223 | return true; |
| 224 | } |
| 225 | } |
| 226 | return false; |
| 227 | } |
| 228 | |
Dianne Hackborn | 786b440 | 2012-08-27 15:14:02 -0700 | [diff] [blame] | 229 | int[] queryInstalledUsers(int[] users, boolean installed) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 230 | int num = 0; |
| 231 | for (int user : users) { |
Dianne Hackborn | 786b440 | 2012-08-27 15:14:02 -0700 | [diff] [blame] | 232 | if (getInstalled(user) == installed) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 233 | num++; |
| 234 | } |
| 235 | } |
| 236 | int[] res = new int[num]; |
| 237 | num = 0; |
| 238 | for (int user : users) { |
Dianne Hackborn | 786b440 | 2012-08-27 15:14:02 -0700 | [diff] [blame] | 239 | if (getInstalled(user) == installed) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 240 | res[num] = user; |
| 241 | num++; |
| 242 | } |
| 243 | } |
| 244 | return res; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | boolean getStopped(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 248 | return readUserState(userId).stopped; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | void setStopped(boolean stop, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 252 | modifyUserState(userId).stopped = stop; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | boolean getNotLaunched(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 256 | return readUserState(userId).notLaunched; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 257 | } |
| 258 | |
| 259 | void setNotLaunched(boolean stop, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 260 | modifyUserState(userId).notLaunched = stop; |
| 261 | } |
| 262 | |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 263 | boolean getBlocked(int userId) { |
| 264 | return readUserState(userId).blocked; |
| 265 | } |
| 266 | |
| 267 | void setBlocked(boolean blocked, int userId) { |
| 268 | modifyUserState(userId).blocked = blocked; |
| 269 | } |
| 270 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 271 | void setUserState(int userId, int enabled, boolean installed, boolean stopped, |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 272 | boolean notLaunched, boolean blocked, |
| 273 | String lastDisableAppCaller, HashSet<String> enabledComponents, |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 274 | HashSet<String> disabledComponents) { |
| 275 | PackageUserState state = modifyUserState(userId); |
| 276 | state.enabled = enabled; |
| 277 | state.installed = installed; |
| 278 | state.stopped = stopped; |
| 279 | state.notLaunched = notLaunched; |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 280 | state.blocked = blocked; |
Dianne Hackborn | 3fa3c28a | 2013-03-26 16:15:41 -0700 | [diff] [blame] | 281 | state.lastDisableAppCaller = lastDisableAppCaller; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 282 | state.enabledComponents = enabledComponents; |
| 283 | state.disabledComponents = disabledComponents; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | HashSet<String> getEnabledComponents(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 287 | return readUserState(userId).enabledComponents; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | HashSet<String> getDisabledComponents(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 291 | return readUserState(userId).disabledComponents; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 292 | } |
| 293 | |
| 294 | void setEnabledComponents(HashSet<String> components, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 295 | modifyUserState(userId).enabledComponents = components; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 296 | } |
| 297 | |
| 298 | void setDisabledComponents(HashSet<String> components, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 299 | modifyUserState(userId).disabledComponents = components; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 300 | } |
| 301 | |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 302 | void setEnabledComponentsCopy(HashSet<String> components, int userId) { |
| 303 | modifyUserState(userId).enabledComponents = components != null |
| 304 | ? new HashSet<String>(components) : null; |
| 305 | } |
| 306 | |
| 307 | void setDisabledComponentsCopy(HashSet<String> components, int userId) { |
| 308 | modifyUserState(userId).disabledComponents = components != null |
| 309 | ? new HashSet<String>(components) : null; |
| 310 | } |
| 311 | |
| 312 | PackageUserState modifyUserStateComponents(int userId, boolean disabled, boolean enabled) { |
| 313 | PackageUserState state = modifyUserState(userId); |
| 314 | if (disabled && state.disabledComponents == null) { |
| 315 | state.disabledComponents = new HashSet<String>(1); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 316 | } |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 317 | if (enabled && state.enabledComponents == null) { |
| 318 | state.enabledComponents = new HashSet<String>(1); |
| 319 | } |
| 320 | return state; |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | void addDisabledComponent(String componentClassName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 324 | modifyUserStateComponents(userId, true, false).disabledComponents.add(componentClassName); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | void addEnabledComponent(String componentClassName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 328 | modifyUserStateComponents(userId, false, true).enabledComponents.add(componentClassName); |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | boolean enableComponentLPw(String componentClassName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 332 | PackageUserState state = modifyUserStateComponents(userId, false, true); |
| 333 | boolean changed = state.disabledComponents != null |
| 334 | ? state.disabledComponents.remove(componentClassName) : false; |
| 335 | changed |= state.enabledComponents.add(componentClassName); |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 336 | return changed; |
| 337 | } |
| 338 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 339 | boolean disableComponentLPw(String componentClassName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 340 | PackageUserState state = modifyUserStateComponents(userId, true, false); |
| 341 | boolean changed = state.enabledComponents != null |
| 342 | ? state.enabledComponents.remove(componentClassName) : false; |
| 343 | changed |= state.disabledComponents.add(componentClassName); |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 344 | return changed; |
| 345 | } |
| 346 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 347 | boolean restoreComponentLPw(String componentClassName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 348 | PackageUserState state = modifyUserStateComponents(userId, true, true); |
| 349 | boolean changed = state.disabledComponents != null |
| 350 | ? state.disabledComponents.remove(componentClassName) : false; |
| 351 | changed |= state.enabledComponents != null |
| 352 | ? state.enabledComponents.remove(componentClassName) : false; |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 353 | return changed; |
| 354 | } |
| 355 | |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 356 | int getCurrentEnabledStateLPr(String componentName, int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 357 | PackageUserState state = readUserState(userId); |
| 358 | if (state.enabledComponents != null && state.enabledComponents.contains(componentName)) { |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 359 | return COMPONENT_ENABLED_STATE_ENABLED; |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 360 | } else if (state.disabledComponents != null |
| 361 | && state.disabledComponents.contains(componentName)) { |
Kenny Root | cf0b38c | 2011-03-22 14:17:59 -0700 | [diff] [blame] | 362 | return COMPONENT_ENABLED_STATE_DISABLED; |
| 363 | } else { |
| 364 | return COMPONENT_ENABLED_STATE_DEFAULT; |
| 365 | } |
| 366 | } |
Amith Yamasani | 1359360 | 2012-03-22 16:16:17 -0700 | [diff] [blame] | 367 | |
| 368 | void removeUser(int userId) { |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 369 | userState.delete(userId); |
Amith Yamasani | 1359360 | 2012-03-22 16:16:17 -0700 | [diff] [blame] | 370 | } |
Amith Yamasani | 483f3b0 | 2012-03-13 16:08:00 -0700 | [diff] [blame] | 371 | } |