Lines Matching refs:userId

153                     final int userId = users.get(user).id;
155 String ownerInfo = Settings.Secure.getStringForUser(cr, OWNER_INFO, userId);
157 setString(OWNER_INFO, ownerInfo, userId);
158 Settings.Secure.putStringForUser(cr, ownerInfo, "", userId);
167 int ivalue = Settings.Secure.getIntForUser(cr, OWNER_INFO_ENABLED, userId);
169 setLong(OWNER_INFO_ENABLED, enabled ? 1 : 0, userId);
173 setLong(OWNER_INFO_ENABLED, 1, userId);
176 Settings.Secure.putIntForUser(cr, OWNER_INFO_ENABLED, 0, userId);
187 private final void checkWritePermission(int userId) {
191 private final void checkPasswordReadPermission(int userId) {
195 private final void checkReadPermission(String requestedKey, int userId) {
203 + requestedKey + " for user " + userId);
209 public void setBoolean(String key, boolean value, int userId) throws RemoteException {
210 checkWritePermission(userId);
211 setStringUnchecked(key, userId, value ? "1" : "0");
215 public void setLong(String key, long value, int userId) throws RemoteException {
216 checkWritePermission(userId);
217 setStringUnchecked(key, userId, Long.toString(value));
221 public void setString(String key, String value, int userId) throws RemoteException {
222 checkWritePermission(userId);
223 setStringUnchecked(key, userId, value);
226 private void setStringUnchecked(String key, int userId, String value) {
227 mStorage.writeKeyValue(key, value, userId);
231 public boolean getBoolean(String key, boolean defaultValue, int userId) throws RemoteException {
232 checkReadPermission(key, userId);
234 String value = mStorage.readKeyValue(key, null, userId);
240 public long getLong(String key, long defaultValue, int userId) throws RemoteException {
241 checkReadPermission(key, userId);
243 String value = mStorage.readKeyValue(key, null, userId);
248 public String getString(String key, String defaultValue, int userId) throws RemoteException {
249 checkReadPermission(key, userId);
251 return mStorage.readKeyValue(key, defaultValue, userId);
255 public boolean havePassword(int userId) throws RemoteException {
258 return mStorage.hasPassword(userId);
262 public boolean havePattern(int userId) throws RemoteException {
265 return mStorage.hasPattern(userId);
294 public void setLockPattern(String pattern, int userId) throws RemoteException {
295 checkWritePermission(userId);
297 maybeUpdateKeystore(pattern, userId);
301 mStorage.writePatternHash(hash, userId);
305 public void setLockPassword(String password, int userId) throws RemoteException {
306 checkWritePermission(userId);
308 maybeUpdateKeystore(password, userId);
310 mStorage.writePasswordHash(mLockPatternUtils.passwordToHash(password, userId), userId);
314 public boolean checkPattern(String pattern, int userId) throws RemoteException {
315 checkPasswordReadPermission(userId);
317 byte[] storedHash = mStorage.readPatternHash(userId);
325 maybeUpdateKeystore(pattern, userId);
331 public boolean checkPassword(String password, int userId) throws RemoteException {
332 checkPasswordReadPermission(userId);
334 byte[] hash = mLockPatternUtils.passwordToHash(password, userId);
335 byte[] storedHash = mStorage.readPasswordHash(userId);
343 maybeUpdateKeystore(password, userId);
349 public boolean checkVoldPassword(int userId) throws RemoteException {
355 checkPasswordReadPermission(userId);
374 if (checkPattern(password, userId)) {
383 if (checkPassword(password, userId)) {
394 public void removeUser(int userId) {
395 checkWritePermission(userId);
397 mStorage.removeUser(userId);
400 final int userUid = UserHandle.getUid(userId, Process.SYSTEM_UID);