Lines Matching refs:targetUserId
229 * @return TRUE if the calling user can access {@code targetUserId}. FALSE if not *but
235 private boolean canAccessProfile(String callingPackage, int targetUserId, String message) {
238 if (targetUserId == callingUserId) return true;
245 + targetUserId + " from " + callingUserId);
249 UserInfo targetUserInfo = mUm.getUserInfo(targetUserId);
253 throw new SecurityException(message + " for unrelated profile " + targetUserId);
485 int targetUserId) {
487 if (!canAccessProfile(callingPackage, targetUserId, "Cannot access shortcuts")) {
490 if (!isUserEnabled(targetUserId)) {
495 callingPackage, packageName, id, targetUserId);
500 String packageName, String id, int targetUserId) {
502 if (!canAccessProfile(callingPackage, targetUserId, "Cannot access shortcuts")) {
505 if (!isUserEnabled(targetUserId)) {
510 callingPackage, packageName, id, targetUserId);
522 Rect sourceBounds, Bundle startActivityOptions, int targetUserId) {
524 if (!canAccessProfile(callingPackage, targetUserId, "Cannot start activity")) {
527 if (!isUserEnabled(targetUserId)) {
529 + targetUserId);
534 callingPackage, packageName, shortcutId, targetUserId)) {
539 getCallingUserId(), callingPackage, packageName, shortcutId, targetUserId);
549 intents, packageName, startActivityOptions, targetUserId);